summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-10-04 19:40:13 +0300
committerMihai Varga <mihai.mv13@gmail.com>2015-10-05 15:02:36 +0300
commitc90c08a65c480a1012182979d5e9218f17a2ba2e (patch)
treeac2e2ca3d07c6ac7c356fd8e503924fe4184d4d8 /sd
parent0326352470aee1a774bb5aa314c4f3625c1372b3 (diff)
LOK: added the button type and key modifier to postMouseEvent()
To get a better functionality we need to know the button type (left, right, middle). We also need the key modifier (ctrl, alt, shift) for actions such as ctrl+click (to open a link) or shift+click to select Change-Id: Iaccb93b276f8a6870dd41cc5132dbb85d2bbf71b
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/unomodel.hxx3
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 6aff89c83444..f3debf8640a2 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -45,6 +45,7 @@
#include <sfx2/sfxbasemodel.hxx>
#include <svx/fmdmod.hxx>
+#include <vcl/event.hxx>
#include <vcl/ITiledRenderable.hxx>
#include <editeng/unoipset.hxx>
@@ -249,7 +250,7 @@ public:
/// @see vcl::ITiledRenderable::postKeyEvent().
virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::postMouseEvent().
- virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
+ virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons = MOUSE_LEFT, int nModifier = 0) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::setTextSelection().
virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::getTextSelection().
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index b12a77050ff0..0d322ea151f8 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2422,7 +2422,7 @@ void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
}
}
-void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
+void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
{
SolarMutexGuard aGuard;
@@ -2430,7 +2430,8 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount)
if (!pViewShell)
return;
- MouseEvent aEvent(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)), nCount, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT);
+ MouseEvent aEvent(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)), nCount,
+ MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
switch (nType)
{