diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-23 19:36:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-24 10:07:39 +0100 |
commit | 00c1d85fabe426efdf6833b8034b041f1263d702 (patch) | |
tree | 9a63bec444a6d9a179b20fd0c68de6edc9418537 /dbaccess | |
parent | 9dd5b8df8f300217fc0d4af6170b0bcc19a70fe8 (diff) |
hide MenuBar details
Change-Id: I409a4df7703300e920511c28263634a00c7c6da7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111432
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-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 |