[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Fri Nov 3 23:42:57 UTC 2017


 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |   15 +++-------
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit d8f0e4144d51ff5709d005d289d71aa32f323913
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 3 16:24:14 2017 +0000

    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/44274
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 9107111302e4..63056255ed1d 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -353,15 +353,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.
@@ -384,7 +376,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());


More information about the Libreoffice-commits mailing list