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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 30 13:44:00 UTC 2018


 include/sfx2/sidebar/SidebarToolBox.hxx |    1 +
 sfx2/source/sidebar/SidebarToolBox.cxx  |    6 ++++++
 2 files changed, 7 insertions(+)

New commits:
commit b9c38b78025c1abd5bf155c66f878d42c0eccb16
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Aug 28 14:18:44 2018 -0800
Commit:     Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Thu Aug 30 15:43:35 2018 +0200

    tdf#119577 Ignore escape key press on sidebar toolboxes not handled by
    
    ...focus manager.
    
    This prevents escape key press on More Options tool box in some panel
    title bars from sending focus to doc view.
    
    Change-Id: Iaac9bf31494e4e35f30350580acaa9f42ead49a0
    Reviewed-on: https://gerrit.libreoffice.org/59783
    Tested-by: Jenkins
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index 32f5106b5eaf..a19c7af4b3b1 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -50,6 +50,7 @@ public:
             ImplToolItems::size_type nPos = APPEND) override;
 
     virtual bool EventNotify(NotifyEvent& rEvent) override;
+    virtual void KeyInput( const KeyEvent& rKEvt ) override;
 
     void SetController(const sal_uInt16 nItemId,
                        const css::uno::Reference<css::frame::XToolbarController>& rxController);
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index ba44d821371e..7182b479e282 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -137,6 +137,12 @@ bool SidebarToolBox::EventNotify (NotifyEvent& rEvent)
     return ToolBox::EventNotify(rEvent);
 }
 
+void SidebarToolBox::KeyInput(const KeyEvent& rKEvt)
+{
+    if (KEY_ESCAPE != rKEvt.GetKeyCode().GetCode())
+        ToolBox::KeyInput(rKEvt);
+}
+
 void SidebarToolBox::CreateController (
     const sal_uInt16 nItemId,
     const css::uno::Reference<css::frame::XFrame>& rxFrame,


More information about the Libreoffice-commits mailing list