From 26ed394abc8cebbb78f0ff69fba9ce35a006a511 Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Tue, 2 Oct 2018 12:54:12 -0800 Subject: tdf#85850 Pass CTRL+F5 event in sidebar to parent classes Change-Id: I86e1fba17402d0a5f06d7942cf0733b0f2c924ba Reviewed-on: https://gerrit.libreoffice.org/61276 Tested-by: Jenkins Reviewed-by: Heiko Tietze Tested-by: Heiko Tietze --- sfx2/source/sidebar/SidebarDockingWindow.cxx | 4 +++- sfx2/source/sidebar/TabBar.cxx | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index fe24d5523ad8..9c1f9c66dc32 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -127,8 +127,10 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent) mpSidebarController->GetResourceManager()->GetPanelDescriptor( "StyleListPanel" ); if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) ) Close(); + return true; } - return true; + if ( !( ( KEY_MOD1 == rKeyCode.GetModifier() ) && ( KEY_F5 == rKeyCode.GetCode() ) ) ) + return true; } else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType) { diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 7930f98ebb72..c69b6b17bb97 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -230,10 +230,14 @@ void TabBar::DataChanged (const DataChangedEvent& rDataChangedEvent) bool TabBar::EventNotify(NotifyEvent& rEvent) { MouseNotifyEvent nType = rEvent.GetType(); - if (MouseNotifyEvent::KEYINPUT == nType) + if(MouseNotifyEvent::KEYINPUT == nType) + { + const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); + if((KEY_MOD1 == rKeyCode.GetModifier()) && (KEY_F5 == rKeyCode.GetCode())) + return vcl::Window::EventNotify(rEvent); return true; - - if(MouseNotifyEvent::COMMAND == nType) + } + else if(MouseNotifyEvent::COMMAND == nType) { const CommandEvent& rCommandEvent = *rEvent.GetCommandEvent(); if(rCommandEvent.GetCommand() == CommandEventId::Wheel) -- cgit