diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2012-07-14 18:00:06 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-07-16 11:33:05 +0100 |
commit | df645a2bd8a9b5463c74f261268f0d2de7245ccc (patch) | |
tree | 25d5df125c50111828d1e1f62edd47b716c11489 /framework/source/uielement/toolbarsmenucontroller.cxx | |
parent | 0dde6d4a2d14dcb09187d476c4fbb80b6e008315 (diff) |
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString.
Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
Diffstat (limited to 'framework/source/uielement/toolbarsmenucontroller.cxx')
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 87a80a51a56a..0b728b5a0959 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -182,7 +182,7 @@ void ToolbarsMenuController::addCommand( Reference< awt::XMenuExtended > xMenuExtended( m_xPopupMenu, UNO_QUERY ); xMenuExtended->setCommand( nItemId, rCommandURL ); - bool bInternal = ( rCommandURL.indexOf( rtl::OUString( STATIC_INTERNAL_CMD_PART )) == 0); + bool bInternal = ( rCommandURL.indexOf( STATIC_INTERNAL_CMD_PART ) == 0); if ( !bInternal ) { if ( !getDispatchFromCommandURL( rCommandURL ).is() ) @@ -638,7 +638,7 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); rtl::OUString aCmd( pVCLPopupMenu->GetItemCommand( rEvent.MenuId )); - if ( aCmd.indexOf( rtl::OUString( STATIC_INTERNAL_CMD_PART )) == 0 ) + if ( aCmd.indexOf( STATIC_INTERNAL_CMD_PART ) == 0 ) { // Command to restore the visibility of all context sensitive toolbars Reference< XNameReplace > xNameReplace( xPersistentWindowState, UNO_QUERY ); @@ -719,7 +719,7 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent } } } - else if ( aCmd.indexOf( rtl::OUString( STATIC_CMD_PART )) < 0 ) + else if ( aCmd.indexOf( STATIC_CMD_PART ) < 0 ) { URL aTargetURL; Sequence<PropertyValue> aArgs; @@ -787,7 +787,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr const sal_uInt32 nCount = aCmdVector.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - bool bInternal = ( aCmdVector[i].indexOf( rtl::OUString( STATIC_INTERNAL_CMD_PART )) == 0); + bool bInternal = ( aCmdVector[i].indexOf( STATIC_INTERNAL_CMD_PART ) == 0); if ( !bInternal ) { |