diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-28 14:37:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-29 09:30:18 +0200 |
commit | 35c24f9b6e08ef1328df01b2d3d11ef518897130 (patch) | |
tree | 17efd9777af84854e0f85cba759c92041875f4de /sfx2/source/menu/mnuitem.cxx | |
parent | bdef90e108bdb557dcb207a15862453ec24645e1 (diff) |
convert chunk of sfx internal code from String to OUString
Change-Id: Ibf728d8a80d62cb3b2bfa985d4e685b9749f7ab8
Diffstat (limited to 'sfx2/source/menu/mnuitem.cxx')
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index bce9158f4475..5b3f08447c9b 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -210,18 +210,18 @@ void SfxMenuControl::StateChanged else if ( ( b_ShowStrings || bIsObjMenu ) && pState->ISA(SfxStringItem) ) { // Get MenuText from SfxStringItem - String aStr( ((const SfxStringItem*)pState)->GetValue() ); - if ( aStr.CompareToAscii("($1)",4) == COMPARE_EQUAL ) + OUString aStr( ((const SfxStringItem*)pState)->GetValue() ); + if ( aStr.startsWith("($1)") ) { - String aEntry(SfxResId(STR_UPDATEDOC).toString()); - aEntry += ' '; - aEntry += aStr.Copy(4); + OUString aEntry(SfxResId(STR_UPDATEDOC).toString()); + aEntry += " "; + aEntry += aStr.copy(4); aStr = aEntry; } - else if ( aStr.CompareToAscii("($2)",4) == COMPARE_EQUAL ) + else if ( aStr.startsWith("($2)") ) { - String aEntry(SfxResId(STR_CLOSEDOC_ANDRETURN).toString()); - aEntry += aStr.Copy(4); + OUString aEntry(SfxResId(STR_CLOSEDOC_ANDRETURN).toString()); + aEntry += aStr.copy(4); aStr = aEntry; } @@ -363,8 +363,8 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) } } - String aCmd( pActMenu->GetItemCommand( nItemId ) ); - if ( !bImageSet && aCmd.Len() ) + OUString aCmd( pActMenu->GetItemCommand( nItemId ) ); + if ( !bImageSet && !aCmd.isEmpty() ) { Image aImage = SvFileInformationManager::GetImage( INetURLObject(aCmd), sal_False ); @@ -413,9 +413,9 @@ SfxUnoMenuControl::~SfxUnoMenuControl() long Select_Impl( void* /*pHdl*/, void* pVoid ) { Menu* pMenu = (Menu*)pVoid; - String aURL( pMenu->GetItemCommand( pMenu->GetCurItemId() ) ); + OUString aURL( pMenu->GetItemCommand( pMenu->GetCurItemId() ) ); - if( !aURL.Len() ) + if( aURL.isEmpty() ) return 0; Reference < ::com::sun::star::frame::XDesktop2 > xDesktop = |