diff options
-rw-r--r-- | include/vcl/menu.hxx | 4 | ||||
-rw-r--r-- | include/vcl/status.hxx | 4 | ||||
-rw-r--r-- | include/vcl/toolbox.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 12 |
7 files changed, 25 insertions, 24 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 38f301d9bc34..f05ee5daf2e1 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -277,8 +277,8 @@ public: void SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ); sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const; - void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ); - const XubString& GetItemCommand( sal_uInt16 nItemId ) const; + void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); + const OUString GetItemCommand( sal_uInt16 nItemId ) const; void SetHelpText( sal_uInt16 nItemId, const XubString& rString ); const XubString& GetHelpText( sal_uInt16 nItemId ) const; diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx index 12bfc19fdf1c..2363cd179807 100644 --- a/include/vcl/status.hxx +++ b/include/vcl/status.hxx @@ -164,8 +164,8 @@ public: void SetItemData( sal_uInt16 nItemId, void* pNewData ); void* GetItemData( sal_uInt16 nItemId ) const; - void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ); - const XubString& GetItemCommand( sal_uInt16 nItemId ); + void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); + const OUString GetItemCommand( sal_uInt16 nItemId ); void SetHelpText( sal_uInt16 nItemId, const XubString& rText ); const XubString& GetHelpText( sal_uInt16 nItemId ) const; diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index ace9ea7233f3..eee14856157f 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -448,8 +448,8 @@ public: sal_Bool IsItemVisible( sal_uInt16 nItemId ) const; sal_Bool IsItemReallyVisible( sal_uInt16 nItemId ) const; - void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ); - const XubString& GetItemCommand( sal_uInt16 nItemId ) const; + void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); + const OUString GetItemCommand( sal_uInt16 nItemId ) const; using Window::SetQuickHelpText; void SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText ); 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; } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index dfbbd93a811f..ae45891b33ad 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1978,7 +1978,7 @@ sal_Bool Menu::GetItemImageMirrorMode( sal_uInt16 nItemId ) const return sal_False; } -void Menu::SetItemCommand( sal_uInt16 nItemId, const String& rCommand ) +void Menu::SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -1987,14 +1987,14 @@ void Menu::SetItemCommand( sal_uInt16 nItemId, const String& rCommand ) pData->aCommandStr = rCommand; } -const XubString& Menu::GetItemCommand( sal_uInt16 nItemId ) const +const OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); - if ( pData ) + if (pData) return pData->aCommandStr; - else - return ImplGetSVEmptyStr(); + + return OUString(); } void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 1d08e8444e6c..2336cc336ae1 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1308,7 +1308,7 @@ const XubString& StatusBar::GetItemText( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -void StatusBar::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) +void StatusBar::SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1323,14 +1323,14 @@ void StatusBar::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) // ----------------------------------------------------------------------- -const XubString& StatusBar::GetItemCommand( sal_uInt16 nItemId ) +const OUString StatusBar::GetItemCommand( sal_uInt16 nItemId ) { sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->maCommand; - return ImplGetSVEmptyStr(); + return OUString(); } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 05afd1a33bd3..1da3f821df8d 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1795,24 +1795,24 @@ sal_Bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -void ToolBox::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) +void ToolBox::SetItemCommand(sal_uInt16 nItemId, const OUString& rCommand) { ImplToolItem* pItem = ImplGetItem( nItemId ); - if ( pItem ) + if (pItem) pItem->maCommandStr = rCommand; } // ----------------------------------------------------------------------- -const XubString& ToolBox::GetItemCommand( sal_uInt16 nItemId ) const +const OUString ToolBox::GetItemCommand( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); - if ( pItem ) + if (pItem) return pItem->maCommandStr; - else - return ImplGetSVEmptyStr(); + + return OUString(); } // ----------------------------------------------------------------------- |