diff options
author | Oliver Bolte <obo@openoffice.org> | 2007-06-12 04:32:26 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2007-06-12 04:32:26 +0000 |
commit | 4fa56e1059fe4f0576a8706ff1d113846b316e42 (patch) | |
tree | 0333e020f9799209f8d627c246cff95e54d820bb /dbaccess/source/ui/app/AppControllerGen.cxx | |
parent | 8c486392a9c9c0f1a0c1b35a1001236b2a3c9024 (diff) |
INTEGRATION: CWS dba23ui (1.24.4); FILE MERGED
2006/12/21 08:32:43 fs 1.24.4.1: #i72799# enhanced mnemonics handling, now also for the task pane
Diffstat (limited to 'dbaccess/source/ui/app/AppControllerGen.cxx')
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 07c90cd3d..4f9173cf3 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerGen.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: kz $ $Date: 2006-12-13 16:46:56 $ + * last change: $Author: obo $ $Date: 2007-06-12 05:32:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -96,6 +96,9 @@ #ifndef _SV_SVAPP_HXX //autogen #include <vcl/svapp.hxx> #endif +#ifndef _SV_MNEMONIC_HXX +#include <vcl/mnemonic.hxx> +#endif #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> #endif @@ -645,7 +648,23 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra _xLayoutManager->requestElement( s_sStatusbar ); if ( getContainer() ) - getContainer()->createIconAutoMnemonics(); + { + // we need to share the "mnemonic space": + MnemonicGenerator aMnemonicGenerator; + // - the menu already has mnemonics + SystemWindow* pSystemWindow = getContainer()->GetSystemWindow(); + MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : NULL; + if ( pMenu ) + { + USHORT nMenuItems = pMenu->GetItemCount(); + for ( USHORT i = 0; i < nMenuItems; ++i ) + aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( pMenu->GetItemId( i ) ) ); + } + // - the icons should use automatic ones + getContainer()->createIconAutoMnemonics( aMnemonicGenerator ); + // - as well as the entries in the task pane + getContainer()->setTaskExternalMnemonics( aMnemonicGenerator ); + } Execute( SID_DB_APP_VIEW_FORMS, Sequence< PropertyValue >() ); InvalidateAll(); |