diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-15 15:23:03 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-09-15 20:16:26 +0200 |
commit | 58d0b8f1b2ab67b2e60ad85c1487ba8c17a63fbb (patch) | |
tree | 84ffea44722a56905ce47f66e19e741847ed00d4 /vcl/source/window | |
parent | f08f0d158395be759e31e98cd5469a716d22b5e2 (diff) |
vcl menu: Make MenuBarKeyInput() virtual to eliminate IsMenuBar() call.
Change-Id: I180450b60200bae9e570e6d05d8650660c772661
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/menu.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
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 ); |