summaryrefslogtreecommitdiff
path: root/vcl/source/window/menufloatingwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/menufloatingwindow.cxx')
-rw-r--r--vcl/source/window/menufloatingwindow.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 065b9dcec388..4dbd276a8303 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -19,6 +19,7 @@
#include "menufloatingwindow.hxx"
#include "menuitemlist.hxx"
+#include "menubarwindow.hxx"
#include <svdata.hxx>
#include <vcl/decoview.hxx>
@@ -1108,8 +1109,13 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
sal_Unicode nCharCode = rKEvent.GetCharCode();
sal_uInt16 nPos = 0;
sal_uInt16 nDuplicates = 0;
- MenuItemData* pData = (nCharCode && pMenu) ? pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem ) : NULL;
- if ( pData )
+ MenuItemData* pData = (nCharCode && pMenu) ?
+ pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : NULL;
+ bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
+ Menu *men = pMenu;
+ while (!men->IsMenuBar())
+ men = men->pStartedFrom;
+ if ( pData && (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey () && accel )
{
if ( pData->pSubMenu || nDuplicates > 1 )
{