diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-04-27 12:56:47 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-04-27 13:28:23 +0000 |
commit | 79226e41fc4fa71b1f94bba0c6feaa318852d954 (patch) | |
tree | ff496cd592e3f7306a02ef6bdcb92ddd8b17c2e4 | |
parent | 25da11ef29a749eba4f7c8b0cdcb14f75e1c5831 (diff) |
tdf#99527: show all accelerators in menus of extensions
XCUBasedAcceleratorConfiguration::getPreferredKeyEventsForCommandList() throws
if the command string of a menu entry is empty. Parent entries of sub menus of
extensions are empty. As the method doesn't know about the source of the command
a dummy entry is supplied.
Change-Id: I1d12bbf41c22b66e9ee29f1f05ea216134168795
Reviewed-on: https://gerrit.libreoffice.org/24423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
(cherry picked from commit a4da4cc6602263dc2c14e885ec3a1d72d099253a)
Reviewed-on: https://gerrit.libreoffice.org/24425
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index dd307cc14b10..1c0535fcdefa 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1504,7 +1504,10 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh const sal_uInt32 nCount = aMenuShortCuts.size(); for ( sal_uInt32 i = 0; i < nCount; ++i ) { - aSeq[i] = aMenuShortCuts[i]->aMenuItemURL; + rtl::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; aMenuShortCuts[i]->aKeyCode = aEmptyKeyCode; } |