[PATCH] fdo#38838, change String to OUString

Ádám Király (via_Code_Review) gerrit at gerrit.libreoffice.org
Fri Mar 1 10:12:36 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2497

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/97/2497/1

fdo#38838, change String to OUString

Change-Id: I373f5d2f453dff83141a4cdaeed94ce0268bf70c
---
M avmedia/source/framework/mediaplayer.cxx
M avmedia/source/framework/mediatoolbox.cxx
M basctl/source/basicide/basicbox.cxx
M basctl/source/basicide/basicbox.hxx
4 files changed, 16 insertions(+), 16 deletions(-)



diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index bff0a71..77570ea 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -67,7 +67,7 @@
 
     SetPosSizePixel( Point( 0, 0 ), aSize );
     SetMinOutputSizePixel( aSize );
-    SetText( String( AVMEDIA_RESID( AVMEDIA_STR_MEDIAPLAYER ) ) );
+    SetText( OUString( AVMEDIA_RESID( AVMEDIA_STR_MEDIAPLAYER ) ) );
     implInit();
     mpMediaWindow->show();
 }
diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx
index 7524c24..251c59f 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -111,7 +111,7 @@
     if( eState == SFX_ITEM_DISABLED )
     {
         pCtrl->Enable( false, false );
-        pCtrl->SetText( String() );
+        pCtrl->SetText( "" );
 
         const MediaItem aEmptyMediaItem( 0, AVMEDIA_SETMASK_ALL );
         pCtrl->setState( aEmptyMediaItem );
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 0d869ab..fa73b4c 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -175,8 +175,8 @@
     if ( pItem )
     {
         aCurText = pItem->GetValue();
-        if ( aCurText.Len() == 0 )
-            aCurText = String( IDEResId( RID_STR_ALL ) );
+        if ( aCurText.isEmpty() )
+            aCurText = OUString( IDEResId( RID_STR_ALL ) );
     }
 
     if ( GetSelectEntry() != aCurText )
@@ -209,8 +209,8 @@
     ClearBox();
 
     // create list box entries
-    sal_uInt16 nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
-    SetEntryData( nPos, new LibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, String() ) );
+    sal_uInt16 nPos = InsertEntry( OUString( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
+    SetEntryData( nPos, new LibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, "" ) );
     InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER );
     InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_SHARE );
 
@@ -243,11 +243,11 @@
 
     for ( sal_Int32 i = 0 ; i < nLibCount ; ++i )
     {
-        String aLibName = pLibNames[ i ];
+        OUString aLibName = pLibNames[ i ];
         if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
         {
-            String aName( rDocument.getTitle( eLocation ) );
-            String aEntryText( CreateMgrAndLibStr( aName, aLibName ) );
+            OUString aName( rDocument.getTitle( eLocation ) );
+            OUString aEntryText( CreateMgrAndLibStr( aName, aLibName ) );
             sal_uInt16 nPos = InsertEntry( aEntryText, LISTBOX_APPEND );
             SetEntryData( nPos, new LibEntry( rDocument, eLocation, aLibName ) );
         }
@@ -317,7 +317,7 @@
     {
         ScriptDocument aDocument( pEntry->GetDocument() );
         SfxUsrAnyItem aDocumentItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, uno::makeAny( aDocument.getDocumentOrNull() ) );
-        String aLibName = pEntry->GetLibName();
+        OUString aLibName = pEntry->GetLibName();
         SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
         if (SfxDispatcher* pDispatcher = GetDispatcher())
             pDispatcher->Execute(
@@ -417,10 +417,10 @@
             bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
             bool bIsCurrent = localesAreEqual( aCurrentLocale, pLocale[i] );
             LanguageType eLangType = LanguageTag( pLocale[i] ).getLanguageType();
-            String sLanguage = aLangTable.GetString( eLangType );
+            OUString sLanguage = aLangTable.GetString( eLangType );
             if ( bIsDefault )
             {
-                sLanguage += ' ';
+                sLanguage += " ";
                 sLanguage += m_sDefaultLanguageStr;
             }
             sal_uInt16 nPos = InsertEntry( sLanguage );
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index a19ec43..209a6b8 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -76,7 +76,7 @@
 class LibBox : public DocListenerBox
 {
 private:
-    String          aCurText;
+    OUString          aCurText;
     bool            bIgnoreSelect;
     bool            bFillBox;
     com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
@@ -118,9 +118,9 @@
 class LanguageBox : public DocListenerBox
 {
 private:
-    String          m_sNotLocalizedStr;
-    String          m_sDefaultLanguageStr;
-    String          m_sCurrentText;
+    OUString          m_sNotLocalizedStr;
+    OUString          m_sDefaultLanguageStr;
+    OUString          m_sCurrentText;
 
     bool            m_bIgnoreSelect;
 

-- 
To view, visit https://gerrit.libreoffice.org/2497
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I373f5d2f453dff83141a4cdaeed94ce0268bf70c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ádám Király <kiraly.adam.csaba at gmail.com>



More information about the LibreOffice mailing list