[Libreoffice-commits] core.git: avmedia/source basctl/source sc/source sd/source sfx2/inc sfx2/source starmath/inc starmath/source svtools/inc svtools/source sw/inc sw/source

Ádám Csaba Király kiraly.adam.csaba at gmail.com
Tue Mar 5 04:48:56 PST 2013


 avmedia/source/viewer/mediawindow.cxx |    2 +-
 basctl/source/basicide/basdoc.cxx     |    2 +-
 basctl/source/basicide/basdoc.hxx     |    6 +++---
 basctl/source/basicide/bastype3.cxx   |   20 ++++++++++----------
 sc/source/ui/docshell/docsh.cxx       |   10 +++++-----
 sc/source/ui/inc/docsh.hxx            |    6 +++---
 sd/source/ui/docshell/docshel4.cxx    |   12 ++++++------
 sd/source/ui/inc/DrawDocShell.hxx     |    2 +-
 sfx2/inc/sfx2/objsh.hxx               |    6 +++---
 sfx2/source/doc/objembed.cxx          |    2 +-
 sfx2/source/doc/objstor.cxx           |    2 +-
 starmath/inc/document.hxx             |    6 +++---
 starmath/source/document.cxx          |    6 +++---
 svtools/inc/svtools/transfer.hxx      |    4 ++--
 svtools/source/misc/transfer.cxx      |    4 ++--
 sw/inc/docsh.hxx                      |    6 +++---
 sw/inc/globdoc.hxx                    |    6 +++---
 sw/inc/wdocsh.hxx                     |    6 +++---
 sw/source/ui/app/docsh2.cxx           |    6 +++---
 sw/source/ui/globdoc/globdoc.cxx      |    6 +++---
 sw/source/ui/web/wdocsh.cxx           |    6 +++---
 21 files changed, 63 insertions(+), 63 deletions(-)

New commits:
commit 10bb5b8e24b90f881ac0ef758bb11a0bbd531a67
Author: Ádám Csaba Király <kiraly.adam.csaba at gmail.com>
Date:   Tue Mar 5 10:35:52 2013 +0100

    fdo#38838, replacement of String with OUString
    
    Replaced String with OUString in mediawindow.cxx, basdoc.cxx,
    basdoc.hxx and bastype3.cxx. In other files I only replaced,
    what was necessary for the changes in basdoc to work.
    
    Change-Id: I1ad0e7e262f8becdf57f182853aaa914a88895a4
    Reviewed-on: https://gerrit.libreoffice.org/2554
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Tested-by: Muthu Subramanian K <muthusuba at gmail.com>

diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 574fa76..a60dd5c 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -288,7 +288,7 @@ bool MediaWindow::executeMediaURLDialog(Window* /* pParent */,
     }
 
     // add filter for all types
-    aDlg.AddFilter( AVMEDIA_RESID( AVMEDIA_STR_ALL_FILES ), String( "*.*"  ) );
+    aDlg.AddFilter( AVMEDIA_RESID( AVMEDIA_STR_ALL_FILES ), OUString( "*.*"  ) );
 
     uno::Reference<ui::dialogs::XFilePicker> const xFP(aDlg.GetFilePicker());
     uno::Reference<ui::dialogs::XFilePickerControlAccess> const xCtrlAcc(xFP,
diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx
index 119657c..d682f4e 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -70,7 +70,7 @@ void DocShell::SetPrinter( SfxPrinter* pPr )
         pPrinter.reset(pPr);
 }
 
-void DocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, String*, sal_Int32, sal_Bool bTemplate) const
+void DocShell::FillClass( SvGlobalName*, sal_uInt32*, OUString*, OUString*, OUString*, sal_Int32, sal_Bool bTemplate) const
 {
     (void)bTemplate;
     DBG_ASSERT( !bTemplate, "No template for Basic" );
diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx
index 19a0ae6..e471545 100644
--- a/basctl/source/basicide/basdoc.hxx
+++ b/basctl/source/basicide/basdoc.hxx
@@ -41,9 +41,9 @@ protected:
                           sal_uInt16 nAspect = ASPECT_CONTENT );
     virtual void    FillClass( SvGlobalName * pClassName,
                                sal_uInt32 * pFormat,
-                               String * pAppName,
-                               String * pFullTypeName,
-                               String * pShortTypeName,
+                               OUString * pAppName,
+                               OUString * pFullTypeName,
+                               OUString * pShortTypeName,
                                sal_Int32 nVersion,
                                sal_Bool bTemplate = false ) const;
 
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index c734642..54c5507 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -204,7 +204,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
             DBG_ASSERT( pLE, "Can not find entry in array" );
             Entry* pBE = static_cast<Entry*>(pLE->GetUserData());
             DBG_ASSERT( pBE, "The data in the entry not found!" );
-            String aName( GetEntryText( pLE ) );
+            OUString aName( GetEntryText( pLE ) );
 
             switch ( pBE->GetType() )
             {
@@ -221,8 +221,8 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
                 // extract the module name from the string like "Sheet1 (Example1)"
                 if( bDocumentObjects )
                 {
-                    sal_uInt16 nIndex = 0;
-                    aName = aName.GetToken( 0, ' ', nIndex );
+                    sal_Int32 nIndex = 0;
+                    aName = aName.getToken( 0, ' ', nIndex );
                 }
                 pVar = static_cast<StarBASIC*>(pVar)->FindModule( aName );
                 break;
@@ -261,10 +261,10 @@ EntryDescriptor TreeListBox::GetEntryDescriptor( SvTreeListEntry* pEntry )
 {
     ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
     LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
-    String aLibName;
-    String aLibSubName;
-    String aName;
-    String aMethodName;
+    OUString aLibName;
+    OUString aLibSubName;
+    OUString aName;
+    OUString aMethodName;
     EntryType eType = OBJ_TYPE_UNKNOWN;
 
     if ( !pEntry )
@@ -380,9 +380,9 @@ bool TreeListBox::IsValidEntry( SvTreeListEntry* pEntry )
     EntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
     ScriptDocument aDocument( aDesc.GetDocument() );
     LibraryLocation eLocation( aDesc.GetLocation() );
-    String aLibName( aDesc.GetLibName() );
-    String aName( aDesc.GetName() );
-    String aMethodName( aDesc.GetMethodName() );
+    OUString aLibName( aDesc.GetLibName() );
+    OUString aName( aDesc.GetName() );
+    OUString aMethodName( aDesc.GetMethodName() );
     EntryType eType( aDesc.GetType() );
 
     switch ( eType )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0c585a9..a9707de 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -171,9 +171,9 @@ TYPEINIT1( ScDocShell, SfxObjectShell );        // SfxInPlaceObject: kein Type-I
 
 void ScDocShell::FillClass( SvGlobalName* pClassName,
                                         sal_uInt32* pFormat,
-                                        String* /* pAppName */,
-                                        String* pFullTypeName,
-                                        String* pShortTypeName,
+                                        OUString* /* pAppName */,
+                                        OUString* pFullTypeName,
+                                        OUString* pShortTypeName,
                                         sal_Int32 nFileFormat,
                                         sal_Bool bTemplate /* = sal_False */) const
 {
@@ -181,8 +181,8 @@ void ScDocShell::FillClass( SvGlobalName* pClassName,
     {
         *pClassName     = SvGlobalName( SO3_SC_CLASSID_60 );
         *pFormat        = SOT_FORMATSTR_ID_STARCALC_60;
-        *pFullTypeName  = String( ScResId( SCSTR_LONG_SCDOC_NAME ) );
-        *pShortTypeName = String( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
+        *pFullTypeName  = OUString( ScResId( SCSTR_LONG_SCDOC_NAME ) );
+        *pShortTypeName = OUString( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
     }
     else if ( nFileFormat == SOFFICE_FILEFORMAT_8 )
     {
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index b49bbe4..ade8dfb 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -189,9 +189,9 @@ public:
 
     virtual void    FillClass( SvGlobalName * pClassName,
                                sal_uInt32 * pFormat,
-                               String * pAppName,
-                               String * pFullTypeName,
-                               String * pShortTypeName,
+                               OUString * pAppName,
+                               OUString * pFullTypeName,
+                               OUString * pShortTypeName,
                                sal_Int32 nFileFormat,
                                sal_Bool bTemplate = false ) const;
 
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 195ca1c..dda95b1 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -937,9 +937,9 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
 
 void DrawDocShell::FillClass(SvGlobalName* pClassName,
                                         sal_uInt32*  pFormat,
-                                        String* ,
-                                        String* pFullTypeName,
-                                        String* pShortTypeName,
+                                        OUString* ,
+                                        OUString* pFullTypeName,
+                                        OUString* pShortTypeName,
                                         sal_Int32 nFileFormat,
                                         sal_Bool bTemplate /* = sal_False */) const
 {
@@ -949,13 +949,13 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName,
         {
                 *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
                 *pFormat = SOT_FORMATSTR_ID_STARDRAW_60;
-                *pFullTypeName = String(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60));
+                *pFullTypeName = OUString(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60));
         }
         else
         {
                 *pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
                 *pFormat = SOT_FORMATSTR_ID_STARIMPRESS_60;
-                *pFullTypeName = String(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60));
+                *pFullTypeName = OUString(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60));
         }
     }
     else if (nFileFormat == SOFFICE_FILEFORMAT_8)
@@ -974,7 +974,7 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName,
         }
     }
 
-    *pShortTypeName = String(SdResId( (meDocType == DOCUMENT_TYPE_DRAW) ?
+    *pShortTypeName = OUString(SdResId( (meDocType == DOCUMENT_TYPE_DRAW) ?
                                       STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT ));
 }
 
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index eb75a3c..46afc63 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -96,7 +96,7 @@ public:
     virtual SfxStyleSheetBasePool* GetStyleSheetPool();
     virtual void            SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const;
     virtual Size            GetFirstPageSize();
-    virtual void            FillClass(SvGlobalName* pClassName, sal_uInt32*  pFormat, String* pAppName, String* pFullTypeName, String* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const;
+    virtual void            FillClass(SvGlobalName* pClassName, sal_uInt32*  pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const;
     virtual void            SetModified( sal_Bool = sal_True );
     virtual SfxDocumentInfoDialog*  CreateDocumentInfoDialog( ::Window *pParent,
                                                               const SfxItemSet &rSet );
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 5d597a8..73a1934 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -619,9 +619,9 @@ public:
 
     virtual void    FillClass( SvGlobalName * pClassName,
                                sal_uInt32 * pFormat,
-                               String * pAppName,
-                               String * pFullTypeName,
-                               String * pShortTypeName,
+                               OUString * pAppName,
+                               OUString * pFullTypeName,
+                               OUString * pShortTypeName,
                                sal_Int32 nVersion,
                                sal_Bool bTemplate = sal_False) const = 0;
 
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index ede1a20..f613e2b 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -156,7 +156,7 @@ void SfxObjectShell::SetMapUnit( MapUnit nMapUnit )
 void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc ) const
 {
     sal_uInt32 nClipFormat;
-    String aAppName, aShortName;
+    OUString aAppName, aShortName;
     FillClass( &rDesc.maClassName, &nClipFormat, &aAppName, &rDesc.maTypeName, &aShortName, SOFFICE_FILEFORMAT_CURRENT );
 
     rDesc.mnViewAspect = ASPECT_CONTENT;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index bd862c6..e352b5a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -315,7 +315,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
     if ( xProps.is() )
     {
         SvGlobalName aName;
-        String aFullTypeName, aShortTypeName, aAppName;
+        OUString aFullTypeName, aShortTypeName, aAppName;
         sal_uInt32 nClipFormat=0;
 
         FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate );
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 08c8050..b08a59a 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -124,9 +124,9 @@ class SmDocShell : public SfxObjectShell, public SfxListener
 
     virtual void        FillClass(SvGlobalName* pClassName,
                                   sal_uInt32*  pFormat,
-                                  String* pAppName,
-                                  String* pFullTypeName,
-                                  String* pShortTypeName,
+                                  OUString* pAppName,
+                                  OUString* pFullTypeName,
+                                  OUString* pShortTypeName,
                                   sal_Int32 nFileFormat,
                                   sal_Bool bTemplate = sal_False ) const;
 
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 7d258e9..6f62221 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1398,9 +1398,9 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
 
 void SmDocShell::FillClass(SvGlobalName* pClassName,
                            sal_uInt32*  pFormat,
-                           String* /*pAppName*/,
-                           String* pFullTypeName,
-                           String* pShortTypeName,
+                           OUString* /*pAppName*/,
+                           OUString* pFullTypeName,
+                           OUString* pShortTypeName,
                            sal_Int32 nFileFormat,
                            sal_Bool bTemplate /* = sal_False */) const
 {
diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx
index 93dab75..d7f2a35 100644
--- a/svtools/inc/svtools/transfer.hxx
+++ b/svtools/inc/svtools/transfer.hxx
@@ -79,8 +79,8 @@ struct TransferableObjectDescriptor
     Point               maDragStartPos;
     Size                maSize;
     sal_uInt32          mnOle2Misc;
-    String              maTypeName;
-    String              maDisplayName;
+    OUString            maTypeName;
+    OUString            maDisplayName;
     sal_Bool            mbCanLink;
 
     TransferableObjectDescriptor()
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 55e72da..e702089 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -155,14 +155,14 @@ static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescripto
         aParams += aChar;
     }
 
-    if( rObjDesc.maTypeName.Len() )
+    if( !rObjDesc.maTypeName.isEmpty() )
     {
         aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";typename=\"" ));
         aParams += rObjDesc.maTypeName;
         aParams += aChar;
     }
 
-    if( rObjDesc.maDisplayName.Len() )
+    if( !rObjDesc.maDisplayName.isEmpty() )
     {
         // the display name might contain unacceptable characters, encode all of them
         // this seems to be the only parameter currently that might contain such characters
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 4d660e5..59e83a3 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -234,9 +234,9 @@ public:
 
     virtual void FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * pAppName,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * pAppName,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nFileFormat,
                                    sal_Bool bTemplate = sal_False ) const;
 
diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx
index 7e303a2..d454129 100644
--- a/sw/inc/globdoc.hxx
+++ b/sw/inc/globdoc.hxx
@@ -34,9 +34,9 @@ public:
 
     virtual void    FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * pAppName,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * pAppName,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nFileFormat,
                                    sal_Bool bTemplate = sal_False ) const;
 };
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
index 8c7894b..eca34a6 100644
--- a/sw/inc/wdocsh.hxx
+++ b/sw/inc/wdocsh.hxx
@@ -40,9 +40,9 @@ public:
 
     virtual void        FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * pAppName,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * pAppName,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nFileFormat,
                                    sal_Bool bTemplate = sal_False ) const;
     sal_uInt16      GetSourcePara()const
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 253d958..fda720c 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1491,9 +1491,9 @@ void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
 
 void SwDocShell::FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * /*pAppName*/,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * /*pAppName*/,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nVersion,
                                    sal_Bool bTemplate /* = sal_False */) const
 {
diff --git a/sw/source/ui/globdoc/globdoc.cxx b/sw/source/ui/globdoc/globdoc.cxx
index 89ef733..679babc 100644
--- a/sw/source/ui/globdoc/globdoc.cxx
+++ b/sw/source/ui/globdoc/globdoc.cxx
@@ -47,9 +47,9 @@ SwGlobalDocShell::~SwGlobalDocShell()
 
 void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * /*pAppName*/,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * /*pAppName*/,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nVersion,
                                    sal_Bool bTemplate /* = sal_False */) const
 {
diff --git a/sw/source/ui/web/wdocsh.cxx b/sw/source/ui/web/wdocsh.cxx
index 5d02794..fd5622c 100644
--- a/sw/source/ui/web/wdocsh.cxx
+++ b/sw/source/ui/web/wdocsh.cxx
@@ -62,9 +62,9 @@ SwWebDocShell::~SwWebDocShell()
 
 void SwWebDocShell::FillClass( SvGlobalName * pClassName,
                                    sal_uInt32 * pClipFormat,
-                                   String * /*pAppName*/,
-                                   String * pLongUserName,
-                                   String * pUserName,
+                                   OUString * /*pAppName*/,
+                                   OUString * pLongUserName,
+                                   OUString * pUserName,
                                    sal_Int32 nVersion,
                                    sal_Bool bTemplate /* = sal_False */) const
 {


More information about the Libreoffice-commits mailing list