Blame SOURCES/0175-LOK-added-the-button-type-and-key-modifier-to-postMo.patch

f325b2
From 44f959673e66d68d9933074157a310f2908964fe Mon Sep 17 00:00:00 2001
f325b2
From: Mihai Varga <mihai.varga@collabora.com>
f325b2
Date: Sun, 4 Oct 2015 19:40:13 +0300
f325b2
Subject: [PATCH 175/398] LOK: added the button type and key modifier to
f325b2
 postMouseEvent()
f325b2
f325b2
To get a better functionality we need to know the button type (left,
f325b2
right, middle). We also need the key modifier (ctrl, alt, shift) for
f325b2
actions such as ctrl+click (to open a link) or shift+click to select
f325b2
f325b2
Change-Id: Iaccb93b276f8a6870dd41cc5132dbb85d2bbf71b
f325b2
(cherry picked from commit c90c08a65c480a1012182979d5e9218f17a2ba2e)
f325b2
---
f325b2
 desktop/source/lib/init.cxx                 |  8 ++--
f325b2
 include/LibreOfficeKit/LibreOfficeKit.h     |  4 +-
f325b2
 include/LibreOfficeKit/LibreOfficeKit.hxx   |  4 +-
f325b2
 include/vcl/ITiledRenderable.hxx            |  2 +-
f325b2
 libreofficekit/Library_libreofficekitgtk.mk |  4 ++
f325b2
 libreofficekit/source/gtk/lokdocview.cxx    | 57 ++++++++++++++++++++++++++++-
f325b2
 libreofficekit/source/gtk/tilebuffer.hxx    |  4 ++
f325b2
 sc/inc/docuno.hxx                           |  3 +-
f325b2
 sc/source/ui/unoobj/docuno.cxx              |  5 ++-
f325b2
 sd/source/ui/inc/unomodel.hxx               |  3 +-
f325b2
 sd/source/ui/unoidl/unomodel.cxx            |  5 ++-
f325b2
 sw/inc/unotxdoc.hxx                         |  3 +-
f325b2
 sw/source/uibase/uno/unotxdoc.cxx           |  4 +-
f325b2
 13 files changed, 88 insertions(+), 18 deletions(-)
f325b2
f325b2
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
f325b2
index a1356aa02ca1..29e8e0d12faa 100644
f325b2
--- a/desktop/source/lib/init.cxx
f325b2
+++ b/desktop/source/lib/init.cxx
f325b2
@@ -229,7 +229,9 @@ static void doc_postMouseEvent (LibreOfficeKitDocument* pThis,
f325b2
                                 int nType,
f325b2
                                 int nX,
f325b2
                                 int nY,
f325b2
-                                int nCount);
f325b2
+                                int nCount,
f325b2
+                                int nButtons,
f325b2
+                                int nModifier);
f325b2
 static void doc_postUnoCommand(LibreOfficeKitDocument* pThis,
f325b2
                                const char* pCommand,
f325b2
                                const char* pArguments);
f325b2
@@ -924,7 +926,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* /*pThis*/, const char* pC
f325b2
     }
f325b2
 }
f325b2
 
f325b2
-static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX, int nY, int nCount)
f325b2
+static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
f325b2
 {
f325b2
     ITiledRenderable* pDoc = getTiledRenderable(pThis);
f325b2
     if (!pDoc)
f325b2
@@ -933,7 +935,7 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX,
f325b2
         return;
f325b2
     }
f325b2
 
f325b2
-    pDoc->postMouseEvent(nType, nX, nY, nCount);
f325b2
+    pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier);
f325b2
 }
f325b2
 
f325b2
 static void doc_setTextSelection(LibreOfficeKitDocument* pThis, int nType, int nX, int nY)
f325b2
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
f325b2
index d83dd49f32b5..83dcc9803d8a 100644
f325b2
--- a/include/LibreOfficeKit/LibreOfficeKit.h
f325b2
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
f325b2
@@ -137,7 +137,9 @@ struct _LibreOfficeKitDocumentClass
f325b2
                             int nType,
f325b2
                             int nX,
f325b2
                             int nY,
f325b2
-                            int nCount);
f325b2
+                            int nCount,
f325b2
+                            int nButtons,
f325b2
+                            int nModifier);
f325b2
 
f325b2
     /// @see lok::Document::postUnoCommand
f325b2
     void (*postUnoCommand) (LibreOfficeKitDocument* pThis,
f325b2
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
f325b2
index cd12ad64f245..e9167c510110 100644
f325b2
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
f325b2
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
f325b2
@@ -192,9 +192,9 @@ public:
f325b2
      * @param nY vertical position in document coordinates
f325b2
      * @param nCount number of clicks: 1 for single click, 2 for double click
f325b2
      */
f325b2
-    inline void postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
+    inline void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
f325b2
     {
f325b2
-        mpDoc->pClass->postMouseEvent(mpDoc, nType, nX, nY, nCount);
f325b2
+        mpDoc->pClass->postMouseEvent(mpDoc, nType, nX, nY, nCount, nButtons, nModifier);
f325b2
     }
f325b2
 
f325b2
     /**
f325b2
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
f325b2
index fd336f603296..c294d20dc9cf 100644
f325b2
--- a/include/vcl/ITiledRenderable.hxx
f325b2
+++ b/include/vcl/ITiledRenderable.hxx
f325b2
@@ -112,7 +112,7 @@ public:
f325b2
      *
f325b2
      * @see lok::Document::postMouseEvent().
f325b2
      */
f325b2
-    virtual void postMouseEvent(int nType, int nX, int nY, int nCount) = 0;
f325b2
+    virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) = 0;
f325b2
 
f325b2
     /**
f325b2
      * Sets the start or end of a text selection.
f325b2
diff --git a/libreofficekit/Library_libreofficekitgtk.mk b/libreofficekit/Library_libreofficekitgtk.mk
f325b2
index 71a77e9e36a3..7d25abf944b1 100644
f325b2
--- a/libreofficekit/Library_libreofficekitgtk.mk
f325b2
+++ b/libreofficekit/Library_libreofficekitgtk.mk
f325b2
@@ -16,6 +16,10 @@ $(eval $(call gb_Library_add_exception_objects,libreofficekitgtk,\
f325b2
     libreofficekit/source/gtk/tilebuffer \
f325b2
 ))
f325b2
 
f325b2
+$(eval $(call gb_Library_use_externals,libreofficekitgtk,\
f325b2
+    boost_headers \
f325b2
+))
f325b2
+
f325b2
 $(eval $(call gb_Library_add_cxxflags,libreofficekitgtk,\
f325b2
     $$(GTK3_CFLAGS) \
f325b2
 ))
f325b2
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
index 3aa4cabeb76c..0bd735088586 100644
f325b2
--- a/libreofficekit/source/gtk/lokdocview.cxx
f325b2
+++ b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
@@ -20,6 +20,7 @@
f325b2
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
f325b2
 #include <LibreOfficeKit/LibreOfficeKitGtk.h>
f325b2
 #include <rsc/rsc-vcl-shared-types.hxx>
f325b2
+#include <vcl/event.hxx>
f325b2
 
f325b2
 #include "tilebuffer.hxx"
f325b2
 
f325b2
@@ -66,6 +67,10 @@ struct _LOKDocViewPrivate
f325b2
     guint32 m_nLastButtonPressTime;
f325b2
     /// Time of the last button release.
f325b2
     guint32 m_nLastButtonReleaseTime;
f325b2
+    /// Last pressed button (left, right, middle)
f325b2
+    guint32 m_nLastButtonPressed;
f325b2
+    /// Key modifier (ctrl, atl, shift)
f325b2
+    guint32 m_nKeyModifier;
f325b2
     /// Rectangles of the current text selection.
f325b2
     std::vector<GdkRectangle> m_aTextSelectionRectangles;
f325b2
     /// Position and size of the selection start (as if there would be a cursor caret there).
f325b2
@@ -267,6 +272,7 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
f325b2
         return FALSE;
f325b2
     }
f325b2
 
f325b2
+    priv->m_nKeyModifier = 0;
f325b2
     switch (pEvent->keyval)
f325b2
     {
f325b2
     case GDK_KEY_BackSpace:
f325b2
@@ -296,6 +302,21 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
f325b2
     case GDK_KEY_Right:
f325b2
         nKeyCode = com::sun::star::awt::Key::RIGHT;
f325b2
         break;
f325b2
+    case GDK_KEY_Shift_L:
f325b2
+    case GDK_KEY_Shift_R:
f325b2
+        if (pEvent->type == GDK_KEY_PRESS)
f325b2
+            priv->m_nKeyModifier |= KEY_SHIFT;
f325b2
+        break;
f325b2
+    case GDK_KEY_Control_L:
f325b2
+    case GDK_KEY_Control_R:
f325b2
+        if (pEvent->type == GDK_KEY_PRESS)
f325b2
+            priv->m_nKeyModifier |= KEY_MOD1;
f325b2
+        break;
f325b2
+    case GDK_KEY_Alt_L:
f325b2
+    case GDK_KEY_Alt_R:
f325b2
+        if (pEvent->type == GDK_KEY_PRESS)
f325b2
+            priv->m_nKeyModifier |= KEY_MOD2;
f325b2
+        break;
f325b2
     default:
f325b2
         if (pEvent->keyval >= GDK_KEY_F1 && pEvent->keyval <= GDK_KEY_F26)
f325b2
             nKeyCode = com::sun::star::awt::Key::F1 + (pEvent->keyval - GDK_KEY_F1);
f325b2
@@ -309,7 +330,6 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
f325b2
     if (pEvent->state & GDK_SHIFT_MASK)
f325b2
         nKeyCode |= KEY_SHIFT;
f325b2
 
f325b2
-
f325b2
     if (pEvent->type == GDK_KEY_RELEASE)
f325b2
     {
f325b2
         GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
f325b2
@@ -1060,6 +1080,20 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
f325b2
         pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
f325b2
         pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
f325b2
         pLOEvent->m_nPostMouseEventCount = nCount;
f325b2
+        switch (pEvent->button)
f325b2
+        {
f325b2
+        case 1:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_LEFT;
f325b2
+            break;
f325b2
+        case 2:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_MIDDLE;
f325b2
+            break;
f325b2
+        case 3:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_RIGHT;
f325b2
+            break;
f325b2
+        }
f325b2
+        pLOEvent->m_nPostMouseEventModifier = priv->m_nKeyModifier;
f325b2
+        priv->m_nLastButtonPressed = pLOEvent->m_nPostMouseEventButton;
f325b2
         g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
f325b2
 
f325b2
         g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
f325b2
@@ -1078,6 +1112,20 @@ lok_doc_view_signal_button(GtkWidget* pWidget, GdkEventButton* pEvent)
f325b2
         pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
f325b2
         pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
f325b2
         pLOEvent->m_nPostMouseEventCount = nCount;
f325b2
+        switch (pEvent->button)
f325b2
+        {
f325b2
+        case 1:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_LEFT;
f325b2
+            break;
f325b2
+        case 2:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_MIDDLE;
f325b2
+            break;
f325b2
+        case 3:
f325b2
+            pLOEvent->m_nPostMouseEventButton = MOUSE_RIGHT;
f325b2
+            break;
f325b2
+        }
f325b2
+        pLOEvent->m_nPostMouseEventModifier = priv->m_nKeyModifier;
f325b2
+        priv->m_nLastButtonPressed = pLOEvent->m_nPostMouseEventButton;
f325b2
         g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
f325b2
 
f325b2
         g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
f325b2
@@ -1182,6 +1230,9 @@ lok_doc_view_signal_motion (GtkWidget* pWidget, GdkEventMotion* pEvent)
f325b2
     pLOEvent->m_nPostMouseEventX = pixelToTwip(pEvent->x, priv->m_fZoom);
f325b2
     pLOEvent->m_nPostMouseEventY = pixelToTwip(pEvent->y, priv->m_fZoom);
f325b2
     pLOEvent->m_nPostMouseEventCount = 1;
f325b2
+    pLOEvent->m_nPostMouseEventButton = priv->m_nLastButtonPressed;
f325b2
+    pLOEvent->m_nPostMouseEventModifier = priv->m_nKeyModifier;
f325b2
+
f325b2
     g_task_set_task_data(task, pLOEvent, LOEvent::destroy);
f325b2
 
f325b2
     g_thread_pool_push(priv->lokThreadPool, g_object_ref(task), NULL);
f325b2
@@ -1218,7 +1269,9 @@ postMouseEventInThread(gpointer data)
f325b2
                                               pLOEvent->m_nPostMouseEventType,
f325b2
                                               pLOEvent->m_nPostMouseEventX,
f325b2
                                               pLOEvent->m_nPostMouseEventY,
f325b2
-                                              pLOEvent->m_nPostMouseEventCount);
f325b2
+                                              pLOEvent->m_nPostMouseEventCount,
f325b2
+                                              pLOEvent->m_nPostMouseEventButton,
f325b2
+                                              pLOEvent->m_nPostMouseEventModifier);
f325b2
 }
f325b2
 
f325b2
 static void
f325b2
diff --git a/libreofficekit/source/gtk/tilebuffer.hxx b/libreofficekit/source/gtk/tilebuffer.hxx
f325b2
index fdcdd15eddd7..34b9001e8bc5 100644
f325b2
--- a/libreofficekit/source/gtk/tilebuffer.hxx
f325b2
+++ b/libreofficekit/source/gtk/tilebuffer.hxx
f325b2
@@ -204,6 +204,8 @@ struct LOEvent
f325b2
     int m_nPostMouseEventX;
f325b2
     int m_nPostMouseEventY;
f325b2
     int m_nPostMouseEventCount;
f325b2
+    int m_nPostMouseEventButton;
f325b2
+    int m_nPostMouseEventModifier;
f325b2
     ///@}
f325b2
 
f325b2
     /// @name setGraphicSelection parameters
f325b2
@@ -232,6 +234,8 @@ struct LOEvent
f325b2
         , m_nPostMouseEventX(0)
f325b2
         , m_nPostMouseEventY(0)
f325b2
         , m_nPostMouseEventCount(0)
f325b2
+        , m_nPostMouseEventButton(0)
f325b2
+        , m_nPostMouseEventModifier(0)
f325b2
         , m_nSetGraphicSelectionType(0)
f325b2
         , m_nSetGraphicSelectionX(0)
f325b2
         , m_nSetGraphicSelectionY(0)
f325b2
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
f325b2
index cd6888598f69..cc132278bdf8 100644
f325b2
--- a/sc/inc/docuno.hxx
f325b2
+++ b/sc/inc/docuno.hxx
f325b2
@@ -54,6 +54,7 @@
f325b2
 #include <cppuhelper/implbase5.hxx>
f325b2
 #include <cppuhelper/interfacecontainer.h>
f325b2
 #include <svl/itemprop.hxx>
f325b2
+#include <vcl/event.hxx>
f325b2
 #include <vcl/ITiledRenderable.hxx>
f325b2
 #include "drwlayer.hxx"
f325b2
 
f325b2
@@ -401,7 +402,7 @@ public:
f325b2
     virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE;
f325b2
 
f325b2
     /// @see vcl::ITiledRenderable::postMouseEvent().
f325b2
-    virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
f325b2
+    virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons = MOUSE_LEFT, int nModifier = 0) SAL_OVERRIDE;
f325b2
 
f325b2
     /// @see vcl::ITiledRenderable::setTextSelection().
f325b2
     virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
f325b2
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
f325b2
index 1a59f887b7d7..958495f7ea7b 100644
f325b2
--- a/sc/source/ui/unoobj/docuno.cxx
f325b2
+++ b/sc/source/ui/unoobj/docuno.cxx
f325b2
@@ -591,7 +591,7 @@ void ScModelObj::postKeyEvent(int nType, int nCharCode, int nKeyCode)
f325b2
     }
f325b2
 }
f325b2
 
f325b2
-void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
+void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
f325b2
 {
f325b2
     SolarMutexGuard aGuard;
f325b2
 
f325b2
@@ -607,7 +607,8 @@ void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
     pViewData->SetZoom(Fraction(1, 1), Fraction(1, 1), true);
f325b2
 
f325b2
     // Calc operates in pixels...
f325b2
-    MouseEvent aEvent(Point(nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY()), nCount, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
f325b2
+    MouseEvent aEvent(Point(nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY()), nCount,
f325b2
+            MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
f325b2
 
f325b2
     switch (nType)
f325b2
     {
f325b2
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
f325b2
index 009fb672cf27..4d7314875f0b 100644
f325b2
--- a/sd/source/ui/inc/unomodel.hxx
f325b2
+++ b/sd/source/ui/inc/unomodel.hxx
f325b2
@@ -45,6 +45,7 @@
f325b2
 #include <sfx2/sfxbasemodel.hxx>
f325b2
 #include <svx/fmdmod.hxx>
f325b2
 
f325b2
+#include <vcl/event.hxx>
f325b2
 #include <vcl/ITiledRenderable.hxx>
f325b2
 
f325b2
 #include <editeng/unoipset.hxx>
f325b2
@@ -248,7 +249,7 @@ public:
f325b2
     /// @see vcl::ITiledRenderable::postKeyEvent().
f325b2
     virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::postMouseEvent().
f325b2
-    virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
f325b2
+    virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons = MOUSE_LEFT, int nModifier = 0) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::setTextSelection().
f325b2
     virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::getTextSelection().
f325b2
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
f325b2
index 0e88a099e081..6ae01a28efac 100644
f325b2
--- a/sd/source/ui/unoidl/unomodel.cxx
f325b2
+++ b/sd/source/ui/unoidl/unomodel.cxx
f325b2
@@ -2428,7 +2428,7 @@ void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
f325b2
     }
f325b2
 }
f325b2
 
f325b2
-void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
+void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
f325b2
 {
f325b2
     SolarMutexGuard aGuard;
f325b2
 
f325b2
@@ -2436,7 +2436,8 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
     if (!pViewShell)
f325b2
         return;
f325b2
 
f325b2
-    MouseEvent aEvent(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)), nCount, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
f325b2
+    MouseEvent aEvent(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)), nCount,
f325b2
+            MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
f325b2
 
f325b2
     switch (nType)
f325b2
     {
f325b2
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
f325b2
index 311147eeaaea..346cab63ca02 100644
f325b2
--- a/sw/inc/unotxdoc.hxx
f325b2
+++ b/sw/inc/unotxdoc.hxx
f325b2
@@ -66,6 +66,7 @@
f325b2
 #include <editeng/UnoForbiddenCharsTable.hxx>
f325b2
 #include <cppuhelper/weak.hxx>
f325b2
 #include <cppuhelper/implbase.hxx>
f325b2
+#include <vcl/event.hxx>
f325b2
 #include <vcl/ITiledRenderable.hxx>
f325b2
 #include <com/sun/star/tiledrendering/XTiledRenderable.hpp>
f325b2
 
f325b2
@@ -422,7 +423,7 @@ public:
f325b2
     /// @see vcl::ITiledRenderable::postKeyEvent().
f325b2
     virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::postMouseEvent().
f325b2
-    virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
f325b2
+    virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons = MOUSE_LEFT, int nModifier = 0) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::setTextSelection().
f325b2
     virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::getTextSelection().
f325b2
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
index 26ab19f170b9..fc1c6f411b74 100644
f325b2
--- a/sw/source/uibase/uno/unotxdoc.cxx
f325b2
+++ b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
@@ -3282,12 +3282,12 @@ void SwXTextDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
f325b2
     }
f325b2
 }
f325b2
 
f325b2
-void SwXTextDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
f325b2
+void SwXTextDocument::postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
f325b2
 {
f325b2
     SolarMutexGuard aGuard;
f325b2
 
f325b2
     SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
f325b2
-    MouseEvent aEvent(Point(nX, nY), nCount, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
f325b2
+    MouseEvent aEvent(Point(nX, nY), nCount, MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
f325b2
 
f325b2
     switch (nType)
f325b2
     {
f325b2
-- 
f325b2
2.12.0
f325b2