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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 28 18:55:31 UTC 2018


 sfx2/source/sidebar/SidebarDockingWindow.cxx |   30 +++++++++++++++------------
 1 file changed, 17 insertions(+), 13 deletions(-)

New commits:
commit a21ec77601e2dd15a2281727b827db9310cece6d
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Wed Oct 24 00:22:30 2018 -0800
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Sun Oct 28 19:55:08 2018 +0100

    Fix Sidebar docking key regression
    
    Add back Ctrl+Shift+F10 undocking/docking handling. This regression was
    introduced by me in tdf#115434 Fix key press misbehaviors in sidebar.
    
    Change-Id: I29a563b2eb96be8a6b346454fddc1605dbc4aba6
    Reviewed-on: https://gerrit.libreoffice.org/62268
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>

diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 1ed62e98e5af..141097a70c0c 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -121,22 +121,26 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
     if (MouseNotifyEvent::KEYINPUT == nType)
     {
         const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode();
-        if (!mpAccel)
+        if (!(rKeyCode.GetCode() == KEY_F10 && rKeyCode.GetModifier() &&
+            rKeyCode.IsShift() && rKeyCode.IsMod1()))
         {
-            mpAccel = svt::AcceleratorExecute::createAcceleratorHelper();
-            mpAccel->init(comphelper::getProcessComponentContext(), mpSidebarController->getXFrame());
-        }
-        const OUString aCommand(mpAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode)));
-        if (".uno:DesignerDialog" == aCommand)
-        {
-            std::shared_ptr<PanelDescriptor> xPanelDescriptor =
+            if (!mpAccel)
+            {
+                mpAccel = svt::AcceleratorExecute::createAcceleratorHelper();
+                mpAccel->init(comphelper::getProcessComponentContext(), mpSidebarController->getXFrame());
+            }
+            const OUString aCommand(mpAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode)));
+            if (".uno:DesignerDialog" == aCommand)
+            {
+                std::shared_ptr<PanelDescriptor> xPanelDescriptor =
                     mpSidebarController->GetResourceManager()->GetPanelDescriptor( "StyleListPanel" );
-            if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) )
-                Close();
-            return true;
+                if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) )
+                    Close();
+                return true;
+            }
+            if (".uno:Sidebar" != aCommand)
+                return true;
         }
-        if (".uno:Sidebar" != aCommand)
-            return true;
     }
     else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType)
     {


More information about the Libreoffice-commits mailing list