summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/uielement/menubarmanager.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 902e277afffb..23178529682f 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1500,7 +1500,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;
}