framework/source/uielement/menubarmanager.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 49e00818c6c77ecb5e09008a7379ce4e4e54c60f Author: Maxim Monastirsky <[email protected]> AuthorDate: Tue Sep 1 21:50:05 2020 +0300 Commit: Maxim Monastirsky <[email protected]> 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 <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
