vcl/source/window/menubarwindow.cxx | 6 +++--- vcl/source/window/menufloatingwindow.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit f097720636fe88c6d36e3a8cac98aa51622dbb6c Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Mar 15 12:02:38 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Mar 15 10:24:17 2024 +0100 tdf#160020: don't hide mnemonics, when auto-accel feature is off Change-Id: I08ee0ba87c5c54403a329100b69e96aac3aded28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164857 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 9fb3552ed17a..d440e7ab3987 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -124,7 +124,7 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) : m_nRolloveredItem = ITEMPOS_INVALID; mbAutoPopup = true; m_bIgnoreFirstMove = true; - SetMBWHideAccel(true); + SetMBWHideAccel(ImplGetSVData()->maNWFData.mbAutoAccel); SetMBWMenuKey(false); m_aCloseBtn->maImage = Image(StockImage::Yes, SV_RESID_BITMAP_CLOSEDOC); @@ -422,7 +422,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if (m_nHighlightedItem != ITEMPOS_INVALID) { bool hide = GetMBWHideAccel(); - SetMBWHideAccel(true); + SetMBWHideAccel(ImplGetSVData()->maNWFData.mbAutoAccel); Invalidate(); //HighlightItem( nRolloveredItem, false ); SetMBWHideAccel(hide); } @@ -466,7 +466,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b return; if (n == ITEMPOS_INVALID) - SetMBWHideAccel(true); + SetMBWHideAccel(ImplGetSVData()->maNWFData.mbAutoAccel); // #57934# close active popup if applicable, as TH's background storage works. MenuItemData* pNextData = m_pMenu->pItemList->GetDataFromPos( n ); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index c46dcede0b53..16af78719e55 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1182,7 +1182,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) if (pMenu && pMenu->pStartedFrom && pMenu->pStartedFrom->IsMenuBar()) { MenuBar *pMenuBar = static_cast<MenuBar*>(pMenu->pStartedFrom.get()); - const bool bShowAccels = nCode != KEY_ESCAPE; + const bool bShowAccels = !autoacc || nCode != KEY_ESCAPE; if (pMenuBar->getMenuBarWindow()->GetMBWMenuKey() != bShowAccels) { pMenuBar->getMenuBarWindow()->SetMBWMenuKey(bShowAccels);