diff options
Diffstat (limited to 'dbaccess/source/ui/app/AppControllerGen.cxx')
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 28b4c4053da3..632523e76977 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -52,7 +52,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> -#include <vcl/menu.hxx> #include <vcl/mnemonic.hxx> #include <vcl/svapp.hxx> #include <vcl/syswin.hxx> @@ -648,14 +647,8 @@ void OApplicationController::onLoadedMenu(const Reference< css::frame::XLayoutMa // we need to share the "mnemonic space": MnemonicGenerator aMnemonicGenerator; // - the menu already has mnemonics - SystemWindow* pSystemWindow = getContainer()->GetSystemWindow(); - MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : nullptr; - if ( pMenu ) - { - sal_uInt16 nMenuItems = pMenu->GetItemCount(); - for ( sal_uInt16 i = 0; i < nMenuItems; ++i ) - aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( pMenu->GetItemId( i ) ) ); - } + if (SystemWindow* pSystemWindow = getContainer()->GetSystemWindow()) + pSystemWindow->CollectMenuBarMnemonics(aMnemonicGenerator); // - the icons should use automatic ones getContainer()->createIconAutoMnemonics( aMnemonicGenerator ); // - as well as the entries in the task pane |