diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-09-01 21:50:05 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-09-07 00:18:27 +0200 |
commit | 49e00818c6c77ecb5e09008a7379ce4e4e54c60f (patch) | |
tree | 5c66dae14ea23240871499a56d50be5bc9318991 /framework | |
parent | 8c5c8d42d5cee83e00e3ecf00a55c8f42e0b169e (diff) |
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@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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 |