diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:10:36 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-15 10:10:36 +0100 |
commit | 6c0c2fa0178dfdddc530ae4727949aa445567617 (patch) | |
tree | 69d176451ff210aa23e14d10fe60c0d5716c0af2 /cui | |
parent | 97c573036a3071bd03726905e6902979ccd32a47 (diff) |
cui: Use appropriate OUString functions on string constants
Change-Id: I3140945b57decf8ea605c35b11e18d063a5a5c83
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 40 | ||||
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 2 |
2 files changed, 21 insertions, 21 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 77d3afcf4726..6c9b2de01927 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -498,19 +498,19 @@ bool GetMenuItemData( { for ( sal_Int32 i = 0; i < aProp.getLength(); ++i ) { - if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) + if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL ) { aProp[i].Value >>= rCommandURL; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_CONTAINER )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_CONTAINER ) { aProp[i].Value >>= rSubMenu; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL ) { aProp[i].Value >>= rLabel; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_TYPE ) { aProp[i].Value >>= rType; } @@ -543,27 +543,27 @@ bool GetToolbarItemData( { for ( sal_Int32 i = 0; i < aProp.getLength(); ++i ) { - if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) + if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL ) { aProp[i].Value >>= rCommandURL; } - if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_STYLE ) { aProp[i].Value >>= rStyle; } - else if (aProp[i].Name.equalsAscii(ITEM_DESCRIPTOR_CONTAINER)) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_CONTAINER ) { aProp[i].Value >>= rSubMenu; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL ) { aProp[i].Value >>= rLabel; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE )) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_TYPE ) { aProp[i].Value >>= rType; } - else if (aProp[i].Name.equalsAscii(ITEM_DESCRIPTOR_ISVISIBLE)) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_ISVISIBLE ) { aProp[i].Value >>= rIsVisible; } @@ -1111,7 +1111,7 @@ bool MenuSaveInData::LoadSubMenus( { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { - if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) + if ( aPropSeq[i].Name == ITEM_DESCRIPTOR_LABEL ) { aPropSeq[i].Value >>= aLabel; break; @@ -3538,7 +3538,7 @@ void ToolbarSaveInData::SetSystemStyle( { for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { - if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE) ) + if ( aProps[ i ].Name == ITEM_DESCRIPTOR_STYLE ) { aProps[ i ].Value = uno::makeAny( nStyle ); break; @@ -3576,7 +3576,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL ) { for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { - if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE) ) + if ( aProps[ i ].Name == ITEM_DESCRIPTOR_STYLE ) { aProps[i].Value >>= result; break; @@ -3610,7 +3610,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) { for ( sal_Int32 i = 0; i < aProps.getLength(); ++i ) { - if ( aProps[ i ].Name.equalsAscii( ITEM_DESCRIPTOR_UINAME) ) + if ( aProps[ i ].Name == ITEM_DESCRIPTOR_UINAME ) { aProps[ i ].Value >>= result; } @@ -3637,7 +3637,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { - if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) + if ( aPropSeq[i].Name == ITEM_DESCRIPTOR_LABEL ) { aPropSeq[i].Value >>= result; } @@ -3688,12 +3688,12 @@ SvxEntries* ToolbarSaveInData::GetEntries() for ( sal_Int32 j = 0; j < props.getLength(); ++j ) { - if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_RESOURCEURL) ) + if ( props[ j ].Name == ITEM_DESCRIPTOR_RESOURCEURL ) { props[ j ].Value >>= url; systemname = url.copy( url.lastIndexOf( '/' ) + 1 ); } - else if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_UINAME) ) + else if ( props[ j ].Name == ITEM_DESCRIPTOR_UINAME ) { props[ j ].Value >>= uiname; } @@ -3765,12 +3765,12 @@ SvxEntries* ToolbarSaveInData::GetEntries() for ( sal_Int32 j = 0; j < props.getLength(); ++j ) { - if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_RESOURCEURL) ) + if ( props[ j ].Name == ITEM_DESCRIPTOR_RESOURCEURL ) { props[ j ].Value >>= url; systemname = url.copy( url.lastIndexOf( '/' ) + 1 ); } - else if ( props[ j ].Name.equalsAscii( ITEM_DESCRIPTOR_UINAME) ) + else if ( props[ j ].Name == ITEM_DESCRIPTOR_UINAME ) { props[ j ].Value >>= uiname; } @@ -4204,7 +4204,7 @@ bool ToolbarSaveInData::LoadToolbar( { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { - if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) ) + if ( aPropSeq[i].Name == ITEM_DESCRIPTOR_LABEL ) { aPropSeq[i].Value >>= aLabel; break; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 540c7bed398a..843347b95c05 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -226,7 +226,7 @@ void HexColorControl::Paste() OUString aText; aData >>= aText; - if( !aText.isEmpty() && aText.matchAsciiL( "#", 1, 0 ) ) + if( !aText.isEmpty() && aText.startsWith( "#" ) ) aText = aText.copy(1); if( aText.getLength() > 6 ) |