diff options
-rw-r--r-- | include/vcl/menu.hxx | 5 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index db133e66d3d8..fcd9b7476511 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -193,7 +193,7 @@ protected: virtual sal_uLong DeactivateMenuBar(sal_uLong nFocusId); /// Forward the KeyInput call to the MenuBar. - SAL_DLLPRIVATE void MenuBarKeyInput(const KeyEvent& rEvent); + virtual void MenuBarKeyInput(const KeyEvent& rEvent); public: SAL_DLLPRIVATE void ImplKillLayoutData() const; @@ -426,6 +426,9 @@ public: /// Deactivate the MenuBarWindow. virtual sal_uLong DeactivateMenuBar(sal_uLong nFocusId) SAL_OVERRIDE; + /// Forward the KeyInput call to the MenuBar. + virtual void MenuBarKeyInput(const KeyEvent& rEvent) SAL_OVERRIDE; + void ShowCloseButton( bool bShow = true ); bool HasCloseButton() const { return mbCloseBtnVisible; } bool HasFloatButton() const { return mbFloatBtnVisible; } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 60e2425ba3be..d6191ac99de2 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2268,12 +2268,8 @@ sal_uLong Menu::DeactivateMenuBar(sal_uLong nFocusId) return nFocusId; } -void Menu::MenuBarKeyInput(const KeyEvent& rEvent) +void Menu::MenuBarKeyInput(const KeyEvent&) { - if (!IsMenuBar()) - return; - - ((MenuBarWindow*)(dynamic_cast<MenuBar*>(this))->ImplGetWindow())->KeyInput(rEvent); } void Menu::ImplKillLayoutData() const @@ -2481,6 +2477,11 @@ sal_uLong MenuBar::DeactivateMenuBar(sal_uLong nFocusId) return nFocusId; } +void MenuBar::MenuBarKeyInput(const KeyEvent& rEvent) +{ + ((MenuBarWindow*)(dynamic_cast<MenuBar*>(this))->ImplGetWindow())->KeyInput(rEvent); +} + void MenuBar::ShowCloseButton(bool bShow) { ShowButtons( bShow, mbFloatBtnVisible, mbHideBtnVisible ); |