include/sfx2/sidebar/TabBar.hxx | 2 -- sfx2/source/sidebar/TabBar.cxx | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-)
New commits: commit 0daeee1a7d0e530f1cce40f86a26ed01f07ee7da Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Mon Feb 26 17:22:42 2024 -0900 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Fri Mar 1 00:29:51 2024 +0100 tdf#159837 Drop unneeded TabBar EventNotify KEYINPUT handling code to make qt and windows VCL backends respond to shortcuts when the keyboard focus is on a TabBar tab. commit 51f8e04eaaea50b779e3882e87628a6e625e0fd8 done to make the Shift+Ctrl+F10 short cut, used to dock/undock the sidebar, work from the sidebar tabbar appears no longer necessary. Simply passing the KEYINPUT event on to InterimItemWindow::EventNotify seems to be enough. Change-Id: Idfa8be4260d31e686acf1b49e89549deb9463a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164051 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index 6ef0fc9c3ddd..bdaa442c58ef 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -128,8 +128,6 @@ private: DECL_LINK(OnToolboxClicked, weld::Toggleable&, void); SidebarController* pParentSidebarController; - std::unique_ptr<svt::AcceleratorExecute> mpAccel; - }; diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 9d92d24cd93a..3ccaa7ebd454 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -185,17 +185,7 @@ bool TabBar::EventNotify(NotifyEvent& rEvent) NotifyEventType nType = rEvent.GetType(); if(NotifyEventType::KEYINPUT == nType) { - const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode(); - if (!mpAccel) - { - mpAccel = svt::AcceleratorExecute::createAcceleratorHelper(); - mpAccel->init(comphelper::getProcessComponentContext(), mxFrame); - } - const OUString aCommand(mpAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rKeyCode))); - if (".uno:Sidebar" == aCommand || - (rKeyCode.IsMod1() && rKeyCode.IsShift() && rKeyCode.GetCode() == KEY_F10)) - return InterimItemWindow::EventNotify(rEvent); - return true; + return InterimItemWindow::EventNotify(rEvent); } else if(NotifyEventType::COMMAND == nType) {