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 /cui | |
parent | fix 32bit build wrt. int vs. sal_Int32 comparison (diff) | |
download | core-df645a2bd8a9b5463c74f261268f0d2de7245ccc.tar.gz core-df645a2bd8a9b5463c74f261268f0d2de7245ccc.zip |
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString.
Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index c033c758d8b5..9575d7257d28 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -256,8 +256,7 @@ generateCustomName( OUString name; OUString placeholder("%n" ); - sal_Int32 pos = prefix.indexOf( - OUString("%n" ) ); + sal_Int32 pos = prefix.indexOf( placeholder ); if ( pos != -1 ) { @@ -822,7 +821,7 @@ SvxConfigDialog::SvxConfigDialog( { OUString text = ((const SfxStringItem*)pItem)->GetValue(); - if (text.indexOf(OUString(ITEM_TOOLBAR_URL)) == 0) + if (text.indexOf( ITEM_TOOLBAR_URL ) == 0) { SetCurPageId( RID_SVXPAGE_TOOLBARS ); } @@ -3153,7 +3152,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( if ( pItem ) { OUString text = ((const SfxStringItem*)pItem)->GetValue(); - if (text.indexOf(OUString(ITEM_TOOLBAR_URL)) == 0) + if (text.indexOf( ITEM_TOOLBAR_URL ) == 0) { m_aURLToSelect = text.copy( 0 ); } @@ -3800,7 +3799,7 @@ void ToolbarSaveInData::SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle ) { - if ( rResourceURL.indexOf( OUString("private" ) ) == 0 && + if ( rResourceURL.indexOf( "private" ) == 0 && m_xPersistentWindowState.is() && m_xPersistentWindowState->hasByName( rResourceURL ) ) { @@ -3839,7 +3838,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL ) { sal_Int32 result = 0; - if ( rResourceURL.indexOf( OUString("private" ) ) == 0 && + if ( rResourceURL.indexOf( "private" ) == 0 && m_xPersistentWindowState.is() && m_xPersistentWindowState->hasByName( rResourceURL ) ) { @@ -3873,7 +3872,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) { OUString result; - if ( rResourceURL.indexOf( OUString("private" ) ) == 0 && + if ( rResourceURL.indexOf( "private" ) == 0 && m_xPersistentWindowState.is() && m_xPersistentWindowState->hasByName( rResourceURL ) ) { @@ -3899,7 +3898,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) } } - if ( rResourceURL.indexOf( OUString(".uno" ) ) == 0 && + if ( rResourceURL.indexOf( ".uno" ) == 0 && m_xCommandToLabelMap.is() && m_xCommandToLabelMap->hasByName( rResourceURL ) ) { |