summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-03 16:24:14 +0000
committerMichael Stahl <mstahl@redhat.com>2017-11-06 16:09:13 +0100
commit5b9c9ad69d58d04ae9f29deab894f5a1846cbd63 (patch)
tree37f497c483f76277c880ba78cc8783fdffe23c15
parent0e0274ecb5ec373b39154e4f5bb62bf97ea14565 (diff)
Resolves: rtl: tdf#60315 slide pane context menu misplaced
so use same (slighty crazed) logic as DrawViewShell::Command to get the right place when rtl is enabled Change-Id: Icb4a39310ab98bd186cbafd516ca5f323da8cce1 Reviewed-on: https://gerrit.libreoffice.org/44275 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index dfd07f3de532..a5b2411a9caa 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -356,15 +356,7 @@ bool SlideSorterController::Command (
pWindow->ReleaseMouse();
Point aMenuLocation (0,0);
- if (rEvent.IsMouseEvent())
- {
- // We have to explicitly specify the location of the menu
- // when the slide sorter is placed in an undocked child
- // menu. But when it is docked it does not hurt, so we
- // specify the location always.
- aMenuLocation = rEvent.GetMousePosPixel();
- }
- else
+ if (!rEvent.IsMouseEvent())
{
// The event is not a mouse event. Use the center of the
// focused page as top left position of the context menu.
@@ -388,7 +380,10 @@ bool SlideSorterController::Command (
if (pDispatcher != nullptr)
{
mbContextMenuOpen = true;
- pDispatcher->ExecutePopup( aPopupId, pWindow, &aMenuLocation );
+ if (!rEvent.IsMouseEvent())
+ pDispatcher->ExecutePopup(aPopupId, pWindow, &aMenuLocation);
+ else
+ pDispatcher->ExecutePopup(aPopupId);
mbContextMenuOpen = false;
mrSlideSorter.GetView().UpdatePageUnderMouse();
::rtl::Reference<SelectionFunction> pFunction(GetCurrentSelectionFunction());