[Libreoffice-commits] core.git: framework/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 6 22:19:09 UTC 2020
framework/source/uielement/menubarmanager.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 49e00818c6c77ecb5e09008a7379ce4e4e54c60f
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Tue Sep 1 21:50:05 2020 +0300
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Mon Sep 7 00:18:27 2020 +0200
MenuBarManager: Set command name for addon submenu item
This is the proper fix for tdf#99527, instead of
the workaround that was applied back then.
Change-Id: Ibbcac747e2b0ef421fd71b79eb9e536dc2f31771
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101891
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 413f77fe3ed2..4e2b602306cd 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1246,10 +1246,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< std::unique_ptr<MenuItemHan
const sal_uInt32 nCount = aMenuShortCuts.size();
for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- OUString aItemURL = aMenuShortCuts[i]->aMenuItemURL;
- if( aItemURL.isEmpty() && aMenuShortCuts[i]->xSubMenuManager.is())
- aItemURL = "-"; // tdf#99527 prevent throw in case of empty commands
- aSeq[i] = aItemURL;
+ aSeq[i] = aMenuShortCuts[i]->aMenuItemURL;
aMenuShortCuts[i]->aKeyCode = aEmptyKeyCode;
}
@@ -1661,6 +1658,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame, Menu* pAddonMenu, b
nItemId,
xSubMenuManager,
xDispatch ));
+ pMenuItemHandler->aMenuItemURL = aItemCommand;
m_aMenuItemHandlerVector.push_back( std::move(pMenuItemHandler) );
}
else
More information about the Libreoffice-commits
mailing list