summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.com>2016-03-31 14:47:27 +0530
committerJan Holesovsky <kendy@collabora.com>2016-04-08 09:43:50 +0200
commit610db8d5d0500aed2ca6d4da822cf70746b44d49 (patch)
treededfb47f30a9ee62d3491a09df87a954733cdb3e /sd
parent396ed6ff96c02fccf6b26e983d628a5afce7d656 (diff)
lok context menu: Expose context menu
Change-Id: I0968689630e10f838c075e86357eb36a9a220d0d
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 546f360bba12..a44f12ed6f73 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2438,16 +2438,24 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, i
SolarMutexGuard aGuard;
DrawViewShell* pViewShell = GetViewShell();
+ Window* pWindow = pViewShell->GetActiveWindow();
if (!pViewShell)
return;
- MouseEvent aEvent(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)), nCount,
+ Point aPos(Point(convertTwipToMm100(nX), convertTwipToMm100(nY)));
+ MouseEvent aEvent(aPos, nCount,
MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
switch (nType)
{
case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
pViewShell->LogicMouseButtonDown(aEvent);
+
+ if (nButtons & MOUSE_RIGHT)
+ {
+ const CommandEvent aCEvt(aPos, CommandEventId::ContextMenu, true, nullptr);
+ pViewShell->Command(aCEvt, pWindow);
+ }
break;
case LOK_MOUSEEVENT_MOUSEBUTTONUP:
pViewShell->LogicMouseButtonUp(aEvent);