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 12:49:45 +0200
commit6be044e919d28b93332f04bdc18f6def2925b098 (patch)
treee996b7cfa31c655b7998761394dd9b4d35be4f8d /sd
parent9820da23375d89c26d6feb9d8ee3969916dc0d76 (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 61e2bbc5bb02..57fca72a89bc 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2454,16 +2454,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);