summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
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);