diff options
Diffstat (limited to 'sfx2/source/menu')
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 454ab9372475..005a140f10d9 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -724,7 +724,7 @@ void SfxVirtualMenu::BindControllers() i != rCtrlArr.end(); ++i) { sal_uInt16 nSlotId = i->GetId(); - if ( !pSVMenu->GetItemCommand(nSlotId).Len() ) + if (pSVMenu->GetItemCommand(nSlotId).isEmpty()) { i->ReBind(); } @@ -995,10 +995,11 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu ) return sal_True; } - if ( pMenu->GetItemCommand( nSlotId ).Len() ) - pBindings->ExecuteCommand_Impl( pMenu->GetItemCommand( nSlotId ) ); + OUString sCommand = pMenu->GetItemCommand(nSlotId); + if (!sCommand.isEmpty()) + pBindings->ExecuteCommand_Impl(sCommand); else - pBindings->Execute( nSlotId ); + pBindings->Execute(nSlotId); return sal_True; } |