[Libreoffice-commits] .: sc/inc sc/qa sc/source unotools/inc unotools/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Aug 26 16:31:14 PDT 2011


 sc/inc/cell.hxx                                       |    2 
 sc/inc/document.hxx                                   |   15 ++--
 sc/inc/scabstdlg.hxx                                  |    6 -
 sc/inc/table.hxx                                      |   26 ++++----
 sc/qa/unit/ucalc.cxx                                  |    6 -
 sc/source/core/data/cell2.cxx                         |   14 ++++
 sc/source/core/data/documen2.cxx                      |    8 +-
 sc/source/core/data/documen3.cxx                      |    2 
 sc/source/core/data/documen4.cxx                      |   10 +--
 sc/source/core/data/documen9.cxx                      |    2 
 sc/source/core/data/document.cxx                      |   42 +++++++------
 sc/source/core/data/drwlayer.cxx                      |    6 -
 sc/source/core/data/table1.cxx                        |   14 ++--
 sc/source/core/tool/address.cxx                       |    8 +-
 sc/source/core/tool/chgtrack.cxx                      |    8 +-
 sc/source/core/tool/compiler.cxx                      |   26 ++++----
 sc/source/core/tool/interpr1.cxx                      |   55 ++++++++++--------
 sc/source/core/tool/rangelst.cxx                      |    2 
 sc/source/filter/dif/difexp.cxx                       |   25 ++++----
 sc/source/filter/excel/excdoc.cxx                     |    2 
 sc/source/filter/excel/read.cxx                       |    4 -
 sc/source/filter/excel/xehelper.cxx                   |    6 -
 sc/source/filter/excel/xelink.cxx                     |    6 -
 sc/source/filter/excel/xipage.cxx                     |   14 ++--
 sc/source/filter/html/htmlexp.cxx                     |    4 -
 sc/source/filter/inc/xehelper.hxx                     |    2 
 sc/source/filter/inc/xelink.hxx                       |    4 -
 sc/source/filter/inc/xepivot.hxx                      |    4 -
 sc/source/filter/lotus/lotread.cxx                    |   10 +--
 sc/source/filter/xcl97/xcl97rec.cxx                   |    7 +-
 sc/source/filter/xml/XMLCodeNameProvider.cxx          |   25 +++-----
 sc/source/filter/xml/xmlexprt.cxx                     |    6 -
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx |    2 
 sc/source/ui/Accessibility/AccessibleTableBase.cxx    |    2 
 sc/source/ui/app/transobj.cxx                         |    2 
 sc/source/ui/attrdlg/scdlgfact.cxx                    |   19 ++----
 sc/source/ui/attrdlg/scdlgfact.hxx                    |    6 -
 sc/source/ui/dbgui/scendlg.cxx                        |    6 -
 sc/source/ui/docshell/docfunc.cxx                     |   10 +--
 sc/source/ui/docshell/docsh.cxx                       |   14 ++--
 sc/source/ui/docshell/docsh4.cxx                      |    4 -
 sc/source/ui/docshell/docsh5.cxx                      |   20 +++---
 sc/source/ui/docshell/tablink.cxx                     |    2 
 sc/source/ui/inc/navipi.hxx                           |    2 
 sc/source/ui/inc/retypepassdlg.hxx                    |    2 
 sc/source/ui/inc/scendlg.hxx                          |    8 +-
 sc/source/ui/inc/strindlg.hxx                         |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                |    2 
 sc/source/ui/miscdlgs/instbdlg.cxx                    |    2 
 sc/source/ui/miscdlgs/mvtabdlg.cxx                    |    2 
 sc/source/ui/miscdlgs/scuiautofmt.cxx                 |   10 +--
 sc/source/ui/miscdlgs/strindlg.cxx                    |    2 
 sc/source/ui/namedlg/namedlg.cxx                      |    2 
 sc/source/ui/navipi/content.cxx                       |    2 
 sc/source/ui/navipi/navipi.cxx                        |    6 -
 sc/source/ui/undo/undoblk.cxx                         |    2 
 sc/source/ui/undo/undotab.cxx                         |   16 ++---
 sc/source/ui/unoobj/cellsuno.cxx                      |   54 ++++++++---------
 sc/source/ui/unoobj/docuno.cxx                        |   16 ++---
 sc/source/ui/unoobj/servuno.cxx                       |   12 +--
 sc/source/ui/vba/excelvbahelper.cxx                   |    2 
 sc/source/ui/vba/vbaeventshelper.cxx                  |    2 
 sc/source/ui/vba/vbaworksheet.cxx                     |    2 
 sc/source/ui/view/cellsh.cxx                          |    4 -
 sc/source/ui/view/cellsh3.cxx                         |    8 +-
 sc/source/ui/view/dbfunc3.cxx                         |    4 -
 sc/source/ui/view/gridwin.cxx                         |    8 +-
 sc/source/ui/view/gridwin4.cxx                        |    6 -
 sc/source/ui/view/prevwsh.cxx                         |    4 -
 sc/source/ui/view/printfun.cxx                        |    4 -
 sc/source/ui/view/tabcont.cxx                         |    8 +-
 sc/source/ui/view/tabvwsh3.cxx                        |    2 
 sc/source/ui/view/tabvwsh4.cxx                        |    4 -
 sc/source/ui/view/tabvwshf.cxx                        |   14 ++--
 sc/source/ui/view/viewdata.cxx                        |    8 --
 sc/source/ui/view/viewfun2.cxx                        |   34 +++++------
 unotools/inc/unotools/charclass.hxx                   |    2 
 unotools/source/i18n/charclass.cxx                    |    8 ++
 78 files changed, 390 insertions(+), 334 deletions(-)

New commits:
commit 69841530937c5a110bd37fe7c0c600a19551ed07
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Fri Aug 26 19:33:59 2011 -0400

    String to rtl::OUString.

diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index fcd83da..6266142 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -273,6 +273,7 @@ public:
                             const SfxItemPool* pFromPool /* = NULL */ );
     void            GetData( const EditTextObject*& rpObject ) const;
     void            GetString( String& rString ) const;
+    void            GetString( rtl::OUString& rString ) const;
 
     const EditTextObject* GetData() const   { return pData; }
 
@@ -463,6 +464,7 @@ public:
     double          GetValue();
     double          GetValueAlways();   // ignore errors
     void            GetString( String& rString );
+    void            GetString( rtl::OUString& rString );
     const ScMatrix* GetMatrix();
     sal_Bool            GetMatrixOrigin( ScAddress& rPos ) const;
     void            GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index b10bb31..6ca827a 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -524,11 +524,10 @@ public:
     SC_DLLPUBLIC void           SetVisibleTab(SCTAB nTab)   { nVisibleTab = nTab; }
 
     SC_DLLPUBLIC sal_Bool           HasTable( SCTAB nTab ) const;
-    SC_DLLPUBLIC bool           GetName( SCTAB nTab, String& rName ) const;
-    SC_DLLPUBLIC bool           GetName( SCTAB nTab, ::rtl::OUString& rName ) const;
-    SC_DLLPUBLIC sal_Bool           GetCodeName( SCTAB nTab, String& rName ) const;
-    SC_DLLPUBLIC sal_Bool                   SetCodeName( SCTAB nTab, const String& rName );
-    SC_DLLPUBLIC sal_Bool           GetTable( const String& rName, SCTAB& rTab ) const;
+    SC_DLLPUBLIC bool GetName( SCTAB nTab, rtl::OUString& rName ) const;
+    SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, rtl::OUString& rName ) const;
+    SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const rtl::OUString& rName );
+    SC_DLLPUBLIC bool GetTable( const rtl::OUString& rName, SCTAB& rTab ) const;
 
     SC_DLLPUBLIC void            SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData);
     SC_DLLPUBLIC ScDBData*       GetAnonymousDBData(SCTAB nTab);
@@ -573,6 +572,7 @@ public:
     SC_DLLPUBLIC sal_Bool           ValidNewTabName( const String& rName ) const;
     SC_DLLPUBLIC bool               ValidNewTabName( const std::vector<String>& rName ) const;
     SC_DLLPUBLIC void           CreateValidTabName(String& rName) const;
+    SC_DLLPUBLIC void           CreateValidTabName(rtl::OUString& rName) const;
     SC_DLLPUBLIC void           CreateValidTabNames(std::vector<rtl::OUString>& aNames, SCTAB nCount) const;
     SC_DLLPUBLIC sal_Bool           InsertTab( SCTAB nPos, const String& rName,
                                 sal_Bool bExternalDocument = false );
@@ -603,8 +603,8 @@ public:
     sal_Bool            IsNegativePage( SCTAB nTab ) const;
     SC_DLLPUBLIC void           SetScenario( SCTAB nTab, sal_Bool bFlag );
     SC_DLLPUBLIC sal_Bool           IsScenario( SCTAB nTab ) const;
-    SC_DLLPUBLIC void           GetScenarioData( SCTAB nTab, String& rComment,
-                                        Color& rColor, sal_uInt16& rFlags ) const;
+    SC_DLLPUBLIC void GetScenarioData( SCTAB nTab, rtl::OUString& rComment,
+                                       Color& rColor, sal_uInt16& rFlags ) const;
     SC_DLLPUBLIC void           SetScenarioData( SCTAB nTab, const String& rComment,
                                         const Color& rColor, sal_uInt16 nFlags );
     SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
@@ -771,6 +771,7 @@ public:
     SC_DLLPUBLIC void           GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
     SC_DLLPUBLIC rtl::OUString  GetString( SCCOL nCol, SCROW nRow, SCTAB nTab) { rtl::OUString aString; GetString(nCol, nRow, nTab, aString); return aString;}
     SC_DLLPUBLIC void           GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
+    SC_DLLPUBLIC void           GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
     SC_DLLPUBLIC double         GetValue( const ScAddress& );
     SC_DLLPUBLIC double         GetValue( const SCCOL nCol, SCROW nRow, SCTAB nTab) { ScAddress aAdr(nCol, nRow, nTab); return GetValue(aAdr);}
     SC_DLLPUBLIC void           GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue );
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index cfdbdcf..e474a42 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -276,10 +276,10 @@ class AbstractScNewScenarioDlg : public VclAbstractDialog  //add for ScNewScenar
 {
 public:
 
-    virtual void SetScenarioData( const String& rName, const String& rComment,
+    virtual void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
                             const Color& rColor, sal_uInt16 nFlags ) = 0;
 
-    virtual void GetScenarioData( String& rName, String& rComment,
+    virtual void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
                             Color& rColor, sal_uInt16& rFlags ) const = 0;
 };
 
@@ -296,7 +296,7 @@ public:
 class AbstractScStringInputDlg :  public VclAbstractDialog  //add for ScStringInputDlg
 {
 public:
-    virtual void GetInputString( String& rString ) const = 0;
+    virtual void GetInputString( rtl::OUString& rString ) const = 0;
 };
 
 class AbstractScTabBgColorDlg : public VclAbstractDialog  //add for ScTabBgColorDlg
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 07562dd..3cb62a3 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -104,9 +104,9 @@ private:
                                             //  data per table
     ScColumn        aCol[MAXCOLCOUNT];
 
-    String          aName;
-    String          aCodeName;
-    String          aComment;
+    rtl::OUString aName;
+    rtl::OUString aCodeName;
+    rtl::OUString aComment;
 
     String          aLinkDoc;
     String          aLinkFlt;
@@ -152,7 +152,7 @@ private:
     ScDocument*     pDocument;
     utl::TextSearch*    pSearchText;
 
-    mutable String  aUpperName;             // #i62977# filled only on demand, reset in SetName
+    mutable rtl::OUString aUpperName;             // #i62977# filled only on demand, reset in SetName
 
     ScAddress2DVecPtr mxUninitNotes;
 
@@ -201,8 +201,8 @@ friend class ScAttrRectIterator;
 
 
 public:
-                ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
-                            bool bColInfo = true, bool bRowInfo = true );
+                ScTable( ScDocument* pDoc, SCTAB nNewTab, const rtl::OUString& rNewName,
+                         bool bColInfo = true, bool bRowInfo = true );
                 ~ScTable();
 
     ScOutlineTable* GetOutlineTable()               { return pOutlineTable; }
@@ -243,8 +243,8 @@ public:
 
     bool        IsScenario() const                           { return bScenario; }
     void        SetScenario( bool bFlag );
-    void        GetScenarioComment( String& rComment) const  { rComment = aComment; }
-    void        SetScenarioComment( const String& rComment ) { aComment = rComment; }
+    void        GetScenarioComment( rtl::OUString& rComment) const  { rComment = aComment; }
+    void        SetScenarioComment( const rtl::OUString& rComment ) { aComment = rComment; }
     const Color& GetScenarioColor() const                    { return aScenarioColor; }
     void        SetScenarioColor(const Color& rNew)          { aScenarioColor = rNew; }
     const Color& GetTabBgColor() const;
@@ -265,16 +265,16 @@ public:
     void        SetLink( sal_uInt8 nMode, const String& rDoc, const String& rFlt,
                         const String& rOpt, const String& rTab, sal_uLong nRefreshDelay );
 
-    void        GetName( String& rName ) const;
-    void        SetName( const String& rNewName );
+    void        GetName( rtl::OUString& rName ) const;
+    void        SetName( const rtl::OUString& rNewName );
 
     void        SetAnonymousDBData(ScDBData* pDBData);
     ScDBData*   GetAnonymousDBData();
 
-    void        GetCodeName( String& rName ) const {  rName = aCodeName; }
-    void        SetCodeName( const String& rNewName ) { aCodeName = rNewName; }
+    void        GetCodeName( rtl::OUString& rName ) const {  rName = aCodeName; }
+    void        SetCodeName( const rtl::OUString& rNewName ) { aCodeName = rNewName; }
 
-    const String&   GetUpperName() const;
+    const rtl::OUString& GetUpperName() const;
 
     const String&   GetPageStyle() const                    { return aPageStyle; }
     void            SetPageStyle( const String& rName );
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 5c9b292..7430a60 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1290,9 +1290,9 @@ void Test::testSheetMove()
     CPPUNIT_ASSERT_MESSAGE("document now should have two sheets.", m_pDoc->GetTableCount() == 2);
     bHidden = m_pDoc->RowHidden(0, 1, &nRow1, &nRow2);
     CPPUNIT_ASSERT_MESSAGE("copied sheet should also have all rows visible as the original.", !bHidden && nRow1 == 0 && nRow2 == MAXROW);
-    String aName;
+    rtl::OUString aName;
     m_pDoc->GetName(0, aName);
-    CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.EqualsAscii("TestTab1"));
+    CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.equalsAscii("TestTab1"));
 
     m_pDoc->SetRowHidden(5, 10, 0, true);
     bHidden = m_pDoc->RowHidden(0, 0, &nRow1, &nRow2);
@@ -1312,7 +1312,7 @@ void Test::testSheetMove()
     bHidden = m_pDoc->RowHidden(11, 1, &nRow1, &nRow2);
     CPPUNIT_ASSERT_MESSAGE("rows 11 - maxrow should be visible", !bHidden && nRow1 == 11 && nRow2 == MAXROW);
     m_pDoc->GetName(0, aName);
-    CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.EqualsAscii("TestTab2"));
+    CPPUNIT_ASSERT_MESSAGE("sheets should have changed places", aName.equalsAscii("TestTab2"));
     m_pDoc->DeleteTab(1);
     m_pDoc->DeleteTab(0);
 }
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 63784e9..648cd23 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -143,6 +143,13 @@ void ScEditCell::GetString( String& rString ) const
         rString.Erase();
 }
 
+void ScEditCell::GetString( rtl::OUString& rString ) const
+{
+    String aTmp;
+    GetString(aTmp);
+    rString = aTmp;
+}
+
 void ScEditCell::RemoveCharAttribs( const ScPatternAttr& rAttr )
 {
     const struct {
@@ -530,6 +537,13 @@ void ScFormulaCell::GetString( String& rString )
         rString.Erase();
 }
 
+void ScFormulaCell::GetString( rtl::OUString& rString )
+{
+    String aTmp;
+    GetString(aTmp);
+    rString = aTmp;
+}
+
 const ScMatrix* ScFormulaCell::GetMatrix()
 {
     if ( pDocument->GetAutoCalc() )
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index a08865e..2c6cee5 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -559,7 +559,7 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
             if (pSourceDoc->maTabs[i])
                 if (!pMarks || pMarks->GetTableSelect(i))
                 {
-                    String aString;
+                    rtl::OUString aString;
                     pSourceDoc->maTabs[i]->GetName(aString);
                     if ( i < static_cast<SCTAB>(maTabs.size()) )
                     {
@@ -805,7 +805,7 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO
 {
     if (SC_TAB_APPEND == nNewPos  || nNewPos >= static_cast<SCTAB>(maTabs.size()))
         nNewPos = static_cast<SCTAB>(maTabs.size());
-    String aName;
+    rtl::OUString aName;
     GetName(nOldPos, aName);
 
     //  vorneweg testen, ob der Prefix als gueltig erkannt wird
@@ -932,7 +932,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
     sal_Bool bValid = sal_True;
     if (bInsertNew)             // neu einfuegen
     {
-        String aName;
+        rtl::OUString aName;
         pSrcDoc->GetName(nSrcPos, aName);
         CreateValidTabName(aName);
         bValid = InsertTab(nDestPos, aName);
@@ -1112,7 +1112,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
 
             if( xLib.is() )
             {
-                String sSrcCodeName;
+                rtl::OUString sSrcCodeName;
                 pSrcDoc->GetCodeName( nSrcPos, sSrcCodeName );
                 rtl::OUString sRTLSource;
                 xLib->getByName( sSrcCodeName ) >>= sRTLSource;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 80c801d..2825e7f 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -366,7 +366,7 @@ bool ScDocument::IsDefaultTabBgColor( SCTAB nTab ) const
     return true;
 }
 
-void ScDocument::GetScenarioData( SCTAB nTab, String& rComment,
+void ScDocument::GetScenarioData( SCTAB nTab, rtl::OUString& rComment,
                                         Color& rColor, sal_uInt16& rFlags ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsScenario())
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 4d95790..f821ccf 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -998,8 +998,8 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
     SCTAB nThisTab;
 
     //  Tabellen mit gleichen Namen vergleichen
-    String aThisName;
-    String aOtherName;
+    rtl::OUString aThisName;
+    rtl::OUString aOtherName;
     for (nThisTab=0; nThisTab<nThisCount; nThisTab++)
     {
         SCTAB nOtherTab = SCTAB_MAX;
@@ -1010,7 +1010,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
                 if (!rOtherDoc.IsScenario(nTemp))
                 {
                     rOtherDoc.GetName( nTemp, aOtherName );
-                    if ( aThisName == aOtherName )
+                    if ( aThisName.equals(aOtherName) )
                         nOtherTab = nTemp;
                 }
         }
@@ -1068,11 +1068,11 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
             sal_uLong n1,n2;    // fuer AppendDeleteRange
 
             //! ein Progress ueber alle Tabellen ???
-            String aTabName;
+            rtl::OUString aTabName;
             GetName( nThisTab, aTabName );
             String aTemplate = ScGlobal::GetRscString(STR_PROGRESS_COMPARING);
             String aProText = aTemplate.GetToken( 0, '#' );
-            aProText += aTabName;
+            aProText.Append(String(aTabName));
             aProText += aTemplate.GetToken( 1, '#' );
             ScProgress aProgress( GetDocumentShell(),
                                         aProText, 3*nThisEndRow );  // 2x FindOrder, 1x hier
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 0736e14..191ed19 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -163,7 +163,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
             pDrawLayer->ScAddPage( nTab );      // always add page, with or without the table
             if (maTabs[nTab])
             {
-                String aTabName;
+                rtl::OUString aTabName;
                 maTabs[nTab]->GetName(aTabName);
                 pDrawLayer->ScRenamePage( nTab, aTabName );
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e475d8a..dcb9502 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -169,7 +169,7 @@ sal_Bool ScDocument::HasTable( SCTAB nTab ) const
     return false;
 }
 
-bool ScDocument::GetName( SCTAB nTab, String& rName ) const
+bool ScDocument::GetName( SCTAB nTab, rtl::OUString& rName ) const
 {
     if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
         if (maTabs[nTab])
@@ -177,19 +177,11 @@ bool ScDocument::GetName( SCTAB nTab, String& rName ) const
             maTabs[nTab]->GetName( rName );
             return true;
         }
-    rName.Erase();
+    rName = rtl::OUString();
     return false;
 }
 
-bool ScDocument::GetName( SCTAB nTab, OUString& rName ) const
-{
-    String aTmp;
-    bool bRet = GetName(nTab, aTmp);
-    rName = aTmp;
-    return bRet;
-}
-
-sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
+bool ScDocument::SetCodeName( SCTAB nTab, const rtl::OUString& rName )
 {
     if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
     {
@@ -203,7 +195,7 @@ sal_Bool ScDocument::SetCodeName( SCTAB nTab, const String& rName )
     return false;
 }
 
-sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
+bool ScDocument::GetCodeName( SCTAB nTab, rtl::OUString& rName ) const
 {
     if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
         if (maTabs[nTab])
@@ -211,19 +203,19 @@ sal_Bool ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
             maTabs[nTab]->GetCodeName( rName );
             return true;
         }
-    rName.Erase();
+    rName = rtl::OUString();
     return false;
 }
 
-sal_Bool ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
+bool ScDocument::GetTable( const rtl::OUString& rName, SCTAB& rTab ) const
 {
-    String aUpperName = rName;
+    rtl::OUString aUpperName = rName;
     ScGlobal::pCharClass->toUpper(aUpperName);
 
     for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++)
         if (maTabs[i])
         {
-            if ( maTabs[i]->GetUpperName() == aUpperName )
+            if (aUpperName.equals(maTabs[i]->GetUpperName()))
             {
                 rTab = i;
                 return true;
@@ -294,7 +286,7 @@ sal_Bool ScDocument::ValidNewTabName( const String& rName ) const
     for (; it != maTabs.end() && bValid; ++it)
         if ( *it )
         {
-            String aOldName;
+            rtl::OUString aOldName;
             (*it)->GetName(aOldName);
             bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, aOldName );
         }
@@ -316,7 +308,7 @@ bool ScDocument::ValidNewTabName( const std::vector<String>& rNames ) const//TOD
         {
             for (nameIter = rNames.begin(); nameIter != rNames.end(); ++nameIter)
             {
-                String aOldName;
+                rtl::OUString aOldName;
                 (*it)->GetName(aOldName);
                 bValid = !ScGlobal::GetpTransliteration()->isEqual( *nameIter, aOldName );
             }
@@ -371,6 +363,12 @@ void ScDocument::CreateValidTabName(String& rName) const
     }
 }
 
+void ScDocument::CreateValidTabName(rtl::OUString& rName) const
+{
+    String aTmp = rName;
+    CreateValidTabName(aTmp);
+    rName = aTmp;
+}
 
 void ScDocument::CreateValidTabNames(std::vector<rtl::OUString>& aNames, SCTAB nCount) const
 {
@@ -761,7 +759,7 @@ sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUp
             for (i=0; (i< static_cast<SCTAB>(maTabs.size())) && bValid; i++)
                 if (maTabs[i] && (i != nTab))
                 {
-                    String aOldName;
+                    rtl::OUString aOldName;
                     maTabs[i]->GetName(aOldName);
                     bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, aOldName );
                 }
@@ -3053,6 +3051,12 @@ void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rSt
         rString.Erase();
 }
 
+void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString )
+{
+    String aTmp;
+    GetInputString(nCol, nRow, nTab, aTmp);
+    rString = aTmp;
+}
 
 void ScDocument::GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue )
 {
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 9e690fa..e5cac4b 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1314,17 +1314,17 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
 
     //#i110034# charts need correct sheet names for xml range conversion during load
     //so the target sheet name is temporarily renamed (if we have any SdrObjects)
-    String aDestTabName;
+    rtl::OUString aDestTabName;
     sal_Bool bRestoreDestTabName = false;
     if( pOldObject && !bSameDoc && !bDestClip )
     {
         if( pDoc && pClipDoc )
         {
-            String aSourceTabName;
+            rtl::OUString aSourceTabName;
             if( pClipDoc->GetName( nSourceTab, aSourceTabName )
                 && pDoc->GetName( nDestTab, aDestTabName ) )
             {
-                if( !(aSourceTabName==aDestTabName) &&
+                if( !aSourceTabName.equals(aDestTabName) &&
                     pDoc->ValidNewTabName(aSourceTabName) )
                 {
                     bRestoreDestTabName = pDoc->RenameTab( nDestTab, aSourceTabName ); //sal_Bool bUpdateRef = sal_True, sal_Bool bExternalDocument = sal_False
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 240d1d9..770ff55 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -229,7 +229,7 @@ bool SetOptimalHeightsToRows(OptimalHeightsFuncObjBase& rFuncObj,
 
 // -----------------------------------------------------------------------
 
-ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
+ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const rtl::OUString& rNewName,
                     bool bColInfo, bool bRowInfo ) :
     aName( rNewName ),
     aCodeName( rNewName ),
@@ -345,23 +345,23 @@ ScTable::~ScTable()
     DestroySortCollator();
 }
 
-void ScTable::GetName( String& rName ) const
+void ScTable::GetName( rtl::OUString& rName ) const
 {
     rName = aName;
 }
 
-void ScTable::SetName( const String& rNewName )
+void ScTable::SetName( const rtl::OUString& rNewName )
 {
     aName = rNewName;
-    aUpperName.Erase();         // invalidated if the name is changed
+    aUpperName = rtl::OUString(); // invalidated if the name is changed
 
     // SetStreamValid is handled in ScDocument::RenameTab
 }
 
-const String& ScTable::GetUpperName() const
+const rtl::OUString& ScTable::GetUpperName() const
 {
-    if ( !aUpperName.Len() && aName.Len() )
-        aUpperName = ScGlobal::pCharClass->upper( aName );
+    if (aUpperName.isEmpty() && !aName.isEmpty())
+        aUpperName = ScGlobal::pCharClass->upper(aName);
     return aUpperName;
 }
 
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 53def4f..64fe5e3 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1657,7 +1657,9 @@ void ScAddress::Format( String& r, sal_uInt16 nFlags, ScDocument* pDoc,
         if( nFlags & SCA_TAB_3D )
         {
             String aTabName, aDocName;
-            pDoc->GetName( nTab, aTabName );
+            rtl::OUString aTmp;
+            pDoc->GetName(nTab, aTmp);
+            aTabName = aTmp; // TODO: remove use of String here.
             // External Reference, same as in ScCompiler::MakeTabStr()
             if( aTabName.GetChar(0) == '\'' )
             {   // "'Doc'#Tab"
@@ -1732,7 +1734,9 @@ lcl_Split_DocTab( const ScDocument* pDoc,  SCTAB nTab,
                   sal_uInt16 nFlags,
                   String& rTabName, String& rDocName )
 {
-    pDoc->GetName( nTab, rTabName );
+    rtl::OUString aTmp;
+    pDoc->GetName(nTab, aTmp);
+    rTabName = aTmp;
     rDocName.Erase();
     // External reference, same as in ScCompiler::MakeTabStr()
     if ( rTabName.GetChar(0) == '\'' )
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 5a12539..8a341a6 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -502,7 +502,9 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
             case SC_CAT_DELETE_COLS :
                 if ( bFlag3D )
                 {
-                    pDoc->GetName( aTmpRange.aStart.Tab(), aStr );
+                    rtl::OUString aTmp;
+                    pDoc->GetName( aTmpRange.aStart.Tab(), aTmp );
+                    aStr = aTmp;
                     aStr += '.';
                 }
                 aStr += ::ScColToAlpha( aTmpRange.aStart.Col() );
@@ -513,7 +515,9 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
             case SC_CAT_DELETE_ROWS :
                 if ( bFlag3D )
                 {
-                    pDoc->GetName( aTmpRange.aStart.Tab(), aStr );
+                    rtl::OUString aTmp;
+                    pDoc->GetName( aTmpRange.aStart.Tab(), aTmp );
+                    aStr = aTmp;
                     aStr += '.';
                 }
                 aStr += String::CreateFromInt32( aTmpRange.aStart.Row() + 1 );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 22c6c91..2c14b86 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -782,10 +782,12 @@ struct ConventionOOO_A1 : public Convention_A1
     static String MakeTabStr( const ScCompiler& rComp, SCTAB nTab, String& aDoc )
     {
         String aString;
-        if (!rComp.GetDoc()->GetName( nTab, aString ))
+        rtl::OUString aTmp;
+        if (!rComp.GetDoc()->GetName( nTab, aTmp ))
             aString = ScGlobal::GetRscString(STR_NO_REF_TABLE);
         else
         {
+            aString = aTmp;
             if ( aString.GetChar(0) == '\'' )
             {   // "'Doc'#Tab"
                 xub_StrLen nPos = ScGlobal::FindUnquoted( aString, SC_COMPILER_FILE_TAB_SEP);
@@ -868,8 +870,8 @@ struct ConventionOOO_A1 : public Convention_A1
                 (aRef.Ref1.IsColDeleted() || aRef.Ref1.IsRowDeleted() || aRef.Ref1.IsTabDeleted() ||
                  aRef.Ref2.IsColDeleted() || aRef.Ref2.IsRowDeleted() || aRef.Ref2.IsTabDeleted()))
             rBuffer.append( rComp.GetCurrentOpCodeMap()->getSymbol( ocErrRef));
-            // For ODFF write [#REF!], but not for PODF so apps reading ODF 
-            // 1.0/1.1 may have a better chance if they implemented the old 
+            // For ODFF write [#REF!], but not for PODF so apps reading ODF
+            // 1.0/1.1 may have a better chance if they implemented the old
             // form.
         else
         {
@@ -1114,12 +1116,14 @@ struct ConventionXL
         bool bHasDoc = false;
 
         rDocName.Erase();
+        rtl::OUString aTmp;
         if (rRef.IsTabDeleted() ||
-            !rComp.GetDoc()->GetName( rRef.nTab, rTabName ))
+            !rComp.GetDoc()->GetName( rRef.nTab, aTmp ))
         {
             rTabName = ScGlobal::GetRscString( STR_NO_REF_TABLE );
             return false;
         }
+        rTabName = aTmp;
 
         // Cheesy hack to unparse the OOO style "'Doc'#Tab"
         if ( rTabName.GetChar(0) == '\'' )
@@ -2175,13 +2179,13 @@ Label_MaskStateMachine:
             case ssGetErrorConstant:
                 {
                     // ODFF Error ::= '#' [A-Z0-9]+ ([!?] | ('/' ([A-Z] | ([0-9] [!?]))))
-                    // BUT, in UI these may have been translated! So don't 
+                    // BUT, in UI these may have been translated! So don't
                     // check for ASCII alnum. Note that this construct can't be
                     // parsed with i18n.
-                    /* TODO: be strict when reading ODFF, check for ASCII alnum 
-                     * and proper continuation after '/'. However, even with 
-                     * the lax parsing only the error constants we have defined 
-                     * as opcode symbols will be recognized and others result 
+                    /* TODO: be strict when reading ODFF, check for ASCII alnum
+                     * and proper continuation after '/'. However, even with
+                     * the lax parsing only the error constants we have defined
+                     * as opcode symbols will be recognized and others result
                      * in ocBad, so the result is actually conformant. */
                     bool bAdd = true;
                     if ('!' == c || '?' == c)
@@ -2680,7 +2684,7 @@ bool ScCompiler::IsPredetectedReference( const String& rName )
          * 'haha.#REF!1fooledyou' and will generate an error on such. */
         if (nPos == 0)
         {
-            // Per ODFF the correct string for a reference error is just #REF!, 
+            // Per ODFF the correct string for a reference error is just #REF!,
             // so pass it on.
             if (rName.Len() == 5)
                 return IsErrorConstant( rName);
@@ -3580,7 +3584,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
              * would need an ocBad token with additional error value.
              * FormulaErrorToken wouldn't do because we want to preserve the
              * original string containing partial valid address
-             * information if not ODFF (in that case it was already handled). 
+             * information if not ODFF (in that case it was already handled).
              * */
             ScRawToken aToken;
             aToken.SetString( aStr.GetBuffer() );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fdbeb58..f581ac7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1912,7 +1912,6 @@ void ScInterpreter::ScCell()
             PushIllegalParameter();
         else
         {
-            String          aFuncResult;
             ScBaseCell*     pCell = GetCell( aCellPos );
 
             ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
@@ -1933,12 +1932,14 @@ void ScInterpreter::ScCell()
             else if( aInfoType.EqualsAscii( "ADDRESS" ) )
             {   // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
                 sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
-                aCellPos.Format( aFuncResult, nFlags, pDok, pDok->GetAddressConvention() );
-                PushString( aFuncResult );
+                rtl::OUString aStr;
+                aCellPos.Format( aStr, nFlags, pDok, pDok->GetAddressConvention() );
+                PushString(aStr);
             }
             else if( aInfoType.EqualsAscii( "FILENAME" ) )
             {   // file name and table name: 'FILENAME'#$TABLE
                 SCTAB nTab = aCellPos.Tab();
+                rtl::OUString aFuncResult;
                 if( nTab < pDok->GetTableCount() )
                 {
                     if( pDok->GetLinkMode( nTab ) == SC_LINK_VALUE )
@@ -1948,13 +1949,15 @@ void ScInterpreter::ScCell()
                         SfxObjectShell* pShell = pDok->GetDocumentShell();
                         if( pShell && pShell->GetMedium() )
                         {
-                            aFuncResult = (sal_Unicode) '\'';
+                            rtl::OUStringBuffer aBuf;
+                            aBuf.append(sal_Unicode('\''));
                             const INetURLObject& rURLObj = pShell->GetMedium()->GetURLObject();
-                            aFuncResult += String( rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
-                            aFuncResult.AppendAscii( "'#$" );
-                            String aTabName;
+                            aBuf.append(rURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS));
+                            aBuf.appendAscii("'#$");
+                            rtl::OUString aTabName;
                             pDok->GetName( nTab, aTabName );
-                            aFuncResult += aTabName;
+                            aBuf.append(aTabName);
+                            aFuncResult = aBuf.makeStringAndClear();
                         }
                     }
                 }
@@ -1963,14 +1966,16 @@ void ScInterpreter::ScCell()
             else if( aInfoType.EqualsAscii( "COORD" ) )
             {   // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
                 // Yes, passing tab as col is intentional!
+                rtl::OUStringBuffer aFuncResult;
+                rtl::OUString aCellStr;
                 ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
-                    aFuncResult, (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
-                aFuncResult += ':';
-                String aCellStr;
+                    aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() );
+                aFuncResult.append(aCellStr);
+                aFuncResult.append(sal_Unicode(':'));
                 aCellPos.Format( aCellStr, (SCA_COL_ABSOLUTE|SCA_VALID_COL|SCA_ROW_ABSOLUTE|SCA_VALID_ROW),
                                  NULL, pDok->GetAddressConvention() );
-                aFuncResult += aCellStr;
-                PushString( aFuncResult );
+                aFuncResult.append(aCellStr);
+                PushString( aFuncResult.makeStringAndClear() );
             }
 
 // *** CELL PROPERTIES ***
@@ -1978,19 +1983,21 @@ void ScInterpreter::ScCell()
             {   // contents of the cell, no formatting
                 if( pCell && pCell->HasStringData() )
                 {
-                    GetCellString( aFuncResult, pCell );
-                    PushString( aFuncResult );
+                    String aStr;
+                    GetCellString( aStr, pCell );
+                    PushString( aStr );
                 }
                 else
                     PushDouble( GetCellValue( aCellPos, pCell ) );
             }
             else if( aInfoType.EqualsAscii( "TYPE" ) )
             {   // b = blank; l = string (label); v = otherwise (value)
+                sal_Unicode c;
                 if( HasCellStringData( pCell ) )
-                    aFuncResult = 'l';
+                    c = 'l';
                 else
-                    aFuncResult = HasCellValueData( pCell ) ? 'v' : 'b';
-                PushString( aFuncResult );
+                    c = HasCellValueData( pCell ) ? 'v' : 'b';
+                PushString( rtl::OUString(c) );
             }
             else if( aInfoType.EqualsAscii( "WIDTH" ) )
             {   // column width (rounded off as count of zero characters in standard font and size)
@@ -2011,6 +2018,7 @@ void ScInterpreter::ScCell()
             }
             else if( aInfoType.EqualsAscii( "PREFIX" ) )
             {   // ' = left; " = right; ^ = centered
+                sal_Unicode c = 0;
                 if( HasCellStringData( pCell ) )
                 {
                     const SvxHorJustifyItem* pJustAttr = (const SvxHorJustifyItem*)
@@ -2019,13 +2027,13 @@ void ScInterpreter::ScCell()
                     {
                         case SVX_HOR_JUSTIFY_STANDARD:
                         case SVX_HOR_JUSTIFY_LEFT:
-                        case SVX_HOR_JUSTIFY_BLOCK:     aFuncResult = '\''; break;
-                        case SVX_HOR_JUSTIFY_CENTER:    aFuncResult = '^';  break;
-                        case SVX_HOR_JUSTIFY_RIGHT:     aFuncResult = '"';  break;
-                        case SVX_HOR_JUSTIFY_REPEAT:    aFuncResult = '\\'; break;
+                        case SVX_HOR_JUSTIFY_BLOCK:     c = '\''; break;
+                        case SVX_HOR_JUSTIFY_CENTER:    c = '^';  break;
+                        case SVX_HOR_JUSTIFY_RIGHT:     c = '"';  break;
+                        case SVX_HOR_JUSTIFY_REPEAT:    c = '\\'; break;
                     }
                 }
-                PushString( aFuncResult );
+                PushString( rtl::OUString(c) );
             }
             else if( aInfoType.EqualsAscii( "PROTECT" ) )
             {   // 1 = cell locked
@@ -2037,6 +2045,7 @@ void ScInterpreter::ScCell()
 // *** FORMATTING ***
             else if( aInfoType.EqualsAscii( "FORMAT" ) )
             {   // specific format code for standard formats
+                String aFuncResult;
                 sal_uLong   nFormat = pDok->GetNumberFormat( aCellPos );
                 bool        bAppendPrec = true;
                 sal_uInt16  nPrec, nLeading;
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 946d93f..cadd0d1 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -695,7 +695,7 @@ int SAL_CALL ScRangePairList_QsortNameCompare( const void* p1, const void* p2 )
     const ScRangePairNameSort* ps2 = (const ScRangePairNameSort*)p2;
     const ScAddress& rStartPos1 = ps1->pPair->GetRange(0).aStart;
     const ScAddress& rStartPos2 = ps2->pPair->GetRange(0).aStart;
-    String aStr1, aStr2;
+    rtl::OUString aStr1, aStr2;
     sal_Int32 nComp;
     if ( rStartPos1.Tab() == rStartPos2.Tab() )
         nComp = COMPARE_EQUAL;
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 6e53050..980ca09 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -108,7 +108,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
 
     FltError            eRet = eERR_OK;
     String              aOS;
-    String              aString;
+    rtl::OUString       aString;
     SCCOL               nEndCol = rRange.aEnd.Col();
     SCROW               nEndRow = rRange.aEnd.Row();
     SCCOL               nNumCols = nEndCol - rRange.aStart.Col() + 1;
@@ -130,7 +130,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
     aOS.AppendAscii( "\n0,1\n\"" );
 
     pDoc->GetName( nTab, aString );
-    aOS += aString;
+    aOS.Append(String(aString));
     aOS.AppendAscii( "\"\n" );
     rOut.WriteUnicodeOrByteText( aOS );
 
@@ -190,7 +190,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
                         else
                         {
                             pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString );
-                            aOS += aString;
+                            aOS.Append(String(aString));
                         }
                         aOS.AppendAscii( "\nV\n" );
                         break;
@@ -199,7 +199,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
                         bWriteStringData = true;
                         break;
                     case CELLTYPE_STRING:
-                        ( ( ScStringCell* ) pAkt )->GetString( aString );
+                        aString = static_cast<ScStringCell*>(pAkt)->GetString();
                         bWriteStringData = true;
                         break;
                     case CELLTYPE_FORMULA:
@@ -218,13 +218,13 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
                             else
                             {
                                 pDoc->GetInputString( nColCnt, nRowCnt, nTab, aString );
-                                aOS += aString;
+                                aOS.Append(String(aString));
                             }
                             aOS.AppendAscii( "\nV\n" );
                         }
                         else if( pAkt->HasStringData() )
                         {
-                            ( ( ScFormulaCell * ) pAkt )->GetString( aString );
+                            static_cast<ScFormulaCell*>(pAkt)->GetString(aString);
                             bWriteStringData = true;
                         }
                         else
@@ -245,24 +245,25 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
                 // sc/source/ui/docsh.cxx:ScDocShell::AsciiSave()
                 // In fact we should create a common method if this would be
                 // needed just one more time..
+                String aTmpStr = aString;
                 aOS.AssignAscii( pStringData );
                 rOut.WriteUnicodeOrByteText( aOS, eCharSet );
                 if ( eCharSet == RTL_TEXTENCODING_UNICODE )
                 {
-                    xub_StrLen nPos = aString.Search( cStrDelim );
+                    xub_StrLen nPos = aTmpStr.Search( cStrDelim );
                     while ( nPos != STRING_NOTFOUND )
                     {
-                        aString.Insert( cStrDelim, nPos );
-                        nPos = aString.Search( cStrDelim, nPos+2 );
+                        aTmpStr.Insert( cStrDelim, nPos );
+                        nPos = aTmpStr.Search( cStrDelim, nPos+2 );
                     }
                     rOut.WriteUniOrByteChar( cStrDelim, eCharSet );
-                    rOut.WriteUnicodeText( aString );
+                    rOut.WriteUnicodeText(aTmpStr);
                     rOut.WriteUniOrByteChar( cStrDelim, eCharSet );
                 }
                 else if ( bContextOrNotAsciiEncoding )
                 {
                     // to byte encoding
-                    ByteString aStrEnc( aString, eCharSet );
+                    ByteString aStrEnc( aTmpStr, eCharSet );
                     // back to Unicode
                     UniString aStrDec( aStrEnc, eCharSet );
                     // search on re-decoded string
@@ -280,7 +281,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
                 }
                 else
                 {
-                    ByteString aStrEnc( aString, eCharSet );
+                    ByteString aStrEnc( aTmpStr, eCharSet );
                     // search on encoded string
                     xub_StrLen nPos = aStrEnc.Search( aStrDelimEncoded );
                     while ( nPos != STRING_NOTFOUND )
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index c5cc14b..7e29312 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -193,7 +193,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
         Add( new ExcBofW8 );
 
     SCTAB   nC;
-    String  aTmpString;
+    rtl::OUString aTmpString;
     SCTAB  nScTabCount     = rTabInfo.GetScTabCount();
     sal_uInt16  nExcTabCount    = rTabInfo.GetXclTabCount();
     sal_uInt16  nCodenames      = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() );
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index e5284f3..6d7c36c 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -1092,7 +1092,7 @@ FltError ImportExcel8::Read( void )
                     case 0x0A:                          // EOF          [ 2345   ]
                     {
                         eAkt = EXC_STATE_SHEET;
-                        String sName;
+                        rtl::OUString sName;
                         GetDoc().GetName( GetCurrScTab(), sName );
                         if ( !bSheetHasCodeName )
                         {
@@ -1101,7 +1101,7 @@ FltError ImportExcel8::Read( void )
                         }
                         else
                         {
-                            String sCodeName;
+                            rtl::OUString sCodeName;
                             GetDoc().GetCodeName( GetCurrScTab(), sCodeName );
                             OSL_TRACE("Have CodeName %s for SheetName %s",
                                 rtl::OUStringToOString( sCodeName, RTL_TEXTENCODING_UTF8 ).getStr(),  rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index df2c4bc..f36d318 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -955,7 +955,7 @@ bool lclConvertToDos( String& rUrl, const String& rBasePath, bool bSaveRelUrl )
 
 /** Encodes special parts of the URL, i.e. directory separators and volume names.
     @param pTableName  Pointer to a table name to be encoded in this URL, or 0. */
-void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const String* pTableName = 0 )
+void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const rtl::OUString* pTableName = 0 )
 {
     if( rUrl.Len() )
     {
@@ -1010,14 +1010,14 @@ void lclEncodeDosUrl( XclBiff eBiff, String& rUrl, const String* pTableName = 0
 
     // table name
     if( pTableName )
-        rUrl.Append( *pTableName );
+        rUrl.Append(String(*pTableName));
 }
 
 } // namespace
 
 // ----------------------------------------------------------------------------
 
-String XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const String* pTableName )
+String XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const rtl::OUString* pTableName )
 {
     String aDosUrl( rAbsUrl );
     if( !aDosUrl.Len() || lclConvertToDos( aDosUrl, rRoot.GetBasePath(), rRoot.IsRelUrl() ) )
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 14092c7..faaac1c 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -782,10 +782,10 @@ bool XclExpTabInfo::IsMirroredTab( SCTAB nScTab ) const
     return GetFlag( nScTab, EXC_TABBUF_MIRRORED );
 }
 
-const String& XclExpTabInfo::GetScTabName( SCTAB nScTab ) const
+rtl::OUString XclExpTabInfo::GetScTabName( SCTAB nScTab ) const
 {
     OSL_ENSURE( nScTab < mnScCnt, "XclExpTabInfo::IsActiveTab - sheet out of range" );
-    return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].maScName : EMPTY_STRING;
+    return (nScTab < mnScCnt) ? maTabInfoVec[ nScTab ].maScName : rtl::OUString();
 }
 
 sal_uInt16 XclExpTabInfo::GetXclTab( SCTAB nScTab ) const
@@ -844,7 +844,7 @@ void XclExpTabInfo::CalcXclIndexes()
     // result: first occur all exported sheets, followed by all external sheets
 }
 
-typedef ::std::pair< String, SCTAB >    XclExpTabName;
+typedef ::std::pair< rtl::OUString, SCTAB > XclExpTabName;
 typedef ::std::vector< XclExpTabName >  XclExpTabNameVec;
 
 inline bool operator<( const XclExpTabName& rArg1, const XclExpTabName& rArg2 )
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 687daa9..07831f8 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -226,14 +226,18 @@ void XclImpPageSettings::Finalize()
 
     // *** create page style sheet ***
 
-    String aStyleName( RTL_CONSTASCII_USTRINGPARAM( "PageStyle_" ) );
-    String aTableName;
+    rtl::OUStringBuffer aStyleName;
+    aStyleName.appendAscii("PageStyle_");
+
+    rtl::OUString aTableName;
     if( GetDoc().GetName( nScTab, aTableName ) )
-        aStyleName.Append( aTableName );
+        aStyleName.append(aTableName);
     else
-        aStyleName.Append( String::CreateFromInt32( nScTab + 1 ) );
+        aStyleName.append(static_cast<sal_Int32>(nScTab+1));
+
+    ScStyleSheet& rStyleSheet = ScfTools::MakePageStyleSheet(
+        GetStyleSheetPool(), aStyleName.makeStringAndClear(), false);
 
-    ScStyleSheet& rStyleSheet = ScfTools::MakePageStyleSheet( GetStyleSheetPool(), aStyleName, false );
     SfxItemSet& rItemSet = rStyleSheet.GetItemSet();
 
     // *** page settings ***
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 70d8ac8..1aa0ce3 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -443,7 +443,7 @@ void ScHTMLExport::WriteOverview()
         OUT_STR( ScGlobal::GetRscString( STR_OVERVIEW ) );
         TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head1 );
 
-        String       aStr;
+        rtl::OUString aStr;
 
         const SCTAB nCount = pDoc->GetTableCount();
         for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
@@ -665,7 +665,7 @@ void ScHTMLExport::WriteTables()
 {
     const SCTAB nTabCount = pDoc->GetTableCount();
     const String    aStrTable( ScResId( SCSTR_TABLE ) );
-    String          aStr;
+    rtl::OUString   aStr;
     String          aStrOut;
     SCCOL           nStartCol;
     SCROW           nStartRow;
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index f02e8ad..6f43a38 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -410,7 +410,7 @@ class XclExpUrlHelper : boost::noncopyable
 public:
     /** Encodes and returns the URL passed in rAbsUrl to an Excel like URL.
         @param pTableName  Optional pointer to a table name to be encoded in this URL. */
-    static String       EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const String* pTableName = 0 );
+    static String       EncodeUrl( const XclExpRoot& rRoot, const String& rAbsUrl, const rtl::OUString* pTableName = 0 );
     /** Encodes and returns the passed DDE link to an Excel like DDE link. */
     static String       EncodeDde( const String& rApplic, const String rTopic );
 
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index 866151d..6d056fd 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -76,7 +76,7 @@ public:
     /** Returns true, if the specified Calc sheet is displayed in right-to-left mode. */
     bool                IsMirroredTab( SCTAB nScTab ) const;
     /** Returns the Calc name of the specified sheet. */
-    const String&       GetScTabName( SCTAB nScTab ) const;
+    rtl::OUString       GetScTabName( SCTAB nScTab ) const;
 
     /** Returns the Excel sheet index for a given Calc sheet. */
     sal_uInt16          GetXclTab( SCTAB nScTab ) const;
@@ -114,7 +114,7 @@ private:
     /** Data structure with infoemation about one Calc sheet. */
     struct XclExpTabInfoEntry
     {
-        String              maScName;
+        rtl::OUString       maScName;
         sal_uInt16          mnXclTab;
         sal_uInt8           mnFlags;
         inline explicit     XclExpTabInfoEntry() : mnXclTab( 0 ), mnFlags( 0 ) {}
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index 3279aa4..b25609a 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -242,8 +242,8 @@ private:
 
     XclPCInfo           maPCInfo;           /// Pivot cache settings (SXDB record).
     XclExpPCFieldList   maFieldList;        /// List of all pivot cache fields.
-    String              maTabName;          /// Name of source data sheet.
-    ::rtl::OUString     maSrcRangeName;     /// Range name for source data.
+    rtl::OUString       maTabName;          /// Name of source data sheet.
+    rtl::OUString       maSrcRangeName;     /// Range name for source data.
     ScRange             maOrigSrcRange;     /// The original sheet source range.
     ScRange             maExpSrcRange;      /// The exported sheet source range.
     ScRange             maDocSrcRange;      /// The range used to build the cache fields and items.
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 0a4fe4f..188e70d 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -212,22 +212,22 @@ FltError ImportLotus::Read()
     // duemmliche Namen eliminieren
     SCTAB       nTabs = pD->GetTableCount();
     SCTAB       nCnt;
-    String      aTabName;
-    String      aBaseName;
-    String      aRef( RTL_CONSTASCII_USTRINGPARAM( "temp" ) );
+    rtl::OUString aTabName;
+    rtl::OUString aBaseName;
+    rtl::OUString aRef( RTL_CONSTASCII_USTRINGPARAM( "temp" ) );
     if( nTabs != 0 )
     {
         if( nTabs > 1 )
         {
             pD->GetName( 0, aBaseName );
-            aBaseName.Erase( aBaseName.Len() - 1 );
+            aBaseName = aBaseName.copy(0, aBaseName.getLength()-1);
         }
         for( nCnt = 1 ; nCnt < nTabs ; nCnt++ )
         {
             OSL_ENSURE( pD->HasTable( nCnt ),
                 "-ImportLotus::Read(): Wo ist meine Tabelle?!" );
             pD->GetName( nCnt, aTabName );
-            if( aTabName == aRef )
+            if( aTabName.equals(aRef) )
             {
                 aTabName = aBaseName;
                 pD->CreateValidTabName( aTabName );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 00f0b63..615fdc6 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1202,15 +1202,18 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
 {
     String  sTmpName;
     String  sTmpComm;
+    rtl::OUString aTmp;
     Color   aDummyCol;
     sal_uInt16  nFlags;
 
     ScDocument& rDoc = rRoot.GetDoc();
-    rDoc.GetName( nTab, sTmpName );
+    rDoc.GetName(nTab, aTmp);
+    sTmpName = aTmp;
     sName.Assign( sTmpName, EXC_STR_8BITLENGTH );
     nRecLen = 8 + sName.GetBufferSize();
 
-    rDoc.GetScenarioData( nTab, sTmpComm, aDummyCol, nFlags );
+    rDoc.GetScenarioData( nTab, aTmp, aDummyCol, nFlags );
+    sTmpComm = aTmp;
     sComment.Assign( sTmpComm, EXC_STR_DEFAULT, 255 );
     if( sComment.Len() )
         nRecLen += sComment.GetSize();
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index 0a0a825..9b7bf38 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -81,14 +81,13 @@ XMLCodeNameProvider::~XMLCodeNameProvider()
         return mpDoc->GetCodeName().Len() > 0;
 
     SCTAB nCount = mpDoc->GetTableCount();
-    String sName( aName );
-    String sSheetName, sCodeName;
+    rtl::OUString sSheetName, sCodeName;
     for( SCTAB i = 0; i < nCount; i++ )
     {
-        if( mpDoc->GetName( i, sSheetName ) && sSheetName == sName )
+        if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
         {
             mpDoc->GetCodeName( i, sCodeName );
-            return sCodeName.Len() > 0;
+            return !sCodeName.isEmpty();
         }
     }
 
@@ -111,15 +110,13 @@ uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName )
     }
 
     SCTAB nCount = mpDoc->GetTableCount();
-    String sName( aName );
-    String sSheetName, sCodeName;
+    rtl::OUString sSheetName, sCodeName;
     for( SCTAB i = 0; i < nCount; i++ )
     {
-        if( mpDoc->GetName( i, sSheetName ) && sSheetName == sName )
+        if( mpDoc->GetName( i, sSheetName ) && sSheetName.equals(aName) )
         {
             mpDoc->GetCodeName( i, sCodeName );
-            OUString sUCodeName( sCodeName );
-            aProps[0].Value <<= sUCodeName;
+            aProps[0].Value <<= sCodeName;
             aRet <<= aProps;
             return aRet;
         }
@@ -138,11 +135,11 @@ uno::Sequence< OUString > SAL_CALL XMLCodeNameProvider::getElementNames(  )
     if( mpDoc->GetCodeName().Len() )
         aNames[nRealCount++] = msDocName;
 
-    String sSheetName, sCodeName;
+    rtl::OUString sSheetName, sCodeName;
     for( SCTAB i = 0; i < nCount; i++ )
     {
         mpDoc->GetCodeName( i, sCodeName );
-        if( sCodeName.Len() > 0 )
+        if (!sCodeName.isEmpty())
         {
             if( mpDoc->GetName( i, sSheetName ) )
                 aNames[nRealCount++] = sSheetName;
@@ -168,11 +165,11 @@ uno::Type SAL_CALL XMLCodeNameProvider::getElementType(  )
         return sal_True;
 
     SCTAB nCount = mpDoc->GetTableCount();
-    String sSheetName, sCodeName;
+    rtl::OUString sSheetName, sCodeName;
     for( SCTAB i = 0; i < nCount; i++ )
     {
         mpDoc->GetCodeName( i, sCodeName );
-        if( sCodeName.Len() > 0 && mpDoc->GetName( i, sSheetName ) )
+        if (!sCodeName.isEmpty() && mpDoc->GetName(i, sSheetName))
             return sal_True;
     }
 
@@ -192,7 +189,7 @@ void XMLCodeNameProvider::set( const uno::Reference< container::XNameAccess>& xN
     }
 
     SCTAB nCount = pDoc->GetTableCount();
-    String sSheetName;
+    rtl::OUString sSheetName;
     for( SCTAB i = 0; i < nCount; i++ )
     {
         if( pDoc->GetName( i, sSheetName ) &&
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 782a7b1..850173b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3635,7 +3635,7 @@ void ScXMLExport::WriteScenario()
 {
     if (pDoc && pDoc->IsScenario(static_cast<SCTAB>(nCurrentTable)))
     {
-        String      sComment;
+        rtl::OUString sComment;
         Color       aColor;
         sal_uInt16  nFlags;
         pDoc->GetScenarioData(static_cast<SCTAB>(nCurrentTable), sComment, aColor, nFlags);
@@ -3658,8 +3658,8 @@ void ScXMLExport::WriteScenario()
         rtl::OUString sRangeListStr;
         ScRangeStringConverter::GetStringFromRangeList( sRangeListStr, pRangeList, pDoc, FormulaGrammar::CONV_OOO );
         AddAttribute(XML_NAMESPACE_TABLE, XML_SCENARIO_RANGES, sRangeListStr);
-        if (sComment.Len())
-            AddAttribute(XML_NAMESPACE_TABLE, XML_COMMENT, rtl::OUString(sComment));
+        if (!sComment.isEmpty())
+            AddAttribute(XML_NAMESPACE_TABLE, XML_COMMENT, sComment);
         SvXMLElementExport aElem(*this, XML_NAMESPACE_TABLE, XML_SCENARIO, sal_True, sal_True);
     }
 }
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 11bd1af..725b90c 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -634,7 +634,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessiblePreviewTable::getImplementationId()
 
         if ( mpTableInfo )
         {
-            String sCoreName;
+            rtl::OUString sCoreName;
             if (mpViewShell->GetDocument()->GetName( mpTableInfo->GetTab(), sCoreName ))
                 sName.SearchAndReplaceAscii("%1", sCoreName);
         }
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 0704f32..2c54f38 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -362,7 +362,7 @@ uno::Reference< XAccessible > SAL_CALL
     throw (uno::RuntimeException)
 {
     String sName(ScResId(STR_ACC_TABLE_NAME));
-    String sCoreName;
+    rtl::OUString sCoreName;
     if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName ))
         sName.SearchAndReplaceAscii("%1", sCoreName);
     return rtl::OUString(sName);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index d99b7a2..26d6bc4 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -600,7 +600,7 @@ void ScTransferObj::InitDocShell()
 
         pDestDoc->SetDocOptions( pDoc->GetDocOptions() );   // #i42666#
 
-        String aTabName;
+        rtl::OUString aTabName;
         pDoc->GetName( aBlock.aStart.Tab(), aTabName );
         pDestDoc->RenameTab( 0, aTabName, false );          // no UpdateRef (empty)
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 773dfd0..d5d0449 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -606,23 +606,18 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
      return pDlg->GetDimensionName();
 }
 
-
-
-void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment,
-                            const Color& rColor, sal_uInt16 nFlags )
+void AbstractScNewScenarioDlg_Impl::SetScenarioData(
+    const rtl::OUString& rName, const rtl::OUString& rComment, const Color& rColor, sal_uInt16 nFlags )
 {
-    pDlg->SetScenarioData(rName,rComment, rColor,nFlags);
+    pDlg->SetScenarioData(rName, rComment, rColor, nFlags);
 }
 
-void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment,
-                            Color& rColor, sal_uInt16& rFlags ) const
+void AbstractScNewScenarioDlg_Impl::GetScenarioData(
+    rtl::OUString& rName, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const
 {
-    pDlg->GetScenarioData( rName,rComment,rColor,rFlags);
+    pDlg->GetScenarioData(rName, rComment, rColor, rFlags);
 }
 
-
-
-
 void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected )
 {
     pDlg->Insert( rString, bSelected);
@@ -649,7 +644,7 @@ String   AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
 
 
 
-void AbstractScStringInputDlg_Impl::GetInputString( String& rString ) const
+void AbstractScStringInputDlg_Impl::GetInputString( rtl::OUString& rString ) const
 {
     pDlg->GetInputString( rString );
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 2de6697..0ea51db 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -327,10 +327,10 @@ class AbstractScDPShowDetailDlg_Impl : public AbstractScDPShowDetailDlg
 class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg  //add for ScNewScenarioDlg
 {
     DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg )
-    virtual void SetScenarioData( const String& rName, const String& rComment,
+    virtual void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
                             const Color& rColor, sal_uInt16 nFlags );
 
-    virtual void GetScenarioData( String& rName, String& rComment,
+    virtual void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
                             Color& rColor, sal_uInt16& rFlags ) const;
 };
 
@@ -347,7 +347,7 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg  //add for ScShowT
 class AbstractScStringInputDlg_Impl :  public AbstractScStringInputDlg  //add for ScStringInputDlg
 {
     DECL_ABSTDLG_BASE( AbstractScStringInputDlg_Impl, ScStringInputDlg )
-    virtual void GetInputString( String& rString ) const;
+    virtual void GetInputString( rtl::OUString& rString ) const;
 };
 
 class AbstractScTabBgColorDlg_Impl :  public AbstractScTabBgColorDlg  //add for ScTabBgColorDlg
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 466642b..a018b19 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -158,13 +158,13 @@ ScNewScenarioDlg::~ScNewScenarioDlg()
 
 //------------------------------------------------------------------------
 
-void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
+void ScNewScenarioDlg::GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
                                         Color& rColor, sal_uInt16& rFlags ) const
 {
     rComment = aEdComment.GetText();
     rName    = aEdName.GetText();
 
-    if ( rName.Len() == 0 )
+    if (rName.isEmpty())
         rName = aDefScenarioName;
 
     rColor = aLbColor.GetSelectEntryColor();
@@ -190,7 +190,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment,
     rFlags = nBits;
 }
 
-void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment,
+void ScNewScenarioDlg::SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
                                         const Color& rColor, sal_uInt16 nFlags )
 {
     aEdComment.SetText(rComment);
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 64c6cfc..cb79c50 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2678,7 +2678,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
     }
 }
 
-void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
+void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName )
 {
     uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
     OSL_ENSURE( xLibContainer.is(), "No BasicContainer!" );
@@ -2784,7 +2784,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
         pUndoDoc->AddUndoTab( 0, nCount-1 );                    // alle Tabs fuer Referenzen
 
         pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
-        String aOldName;
+        rtl::OUString aOldName;
         pDoc->GetName( nTab, aOldName );
         pUndoDoc->RenameTab( nTab, aOldName, false );
         if (bWasLinked)
@@ -2796,7 +2796,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
         if ( pDoc->IsScenario(nTab) )
         {
             pUndoDoc->SetScenario( nTab, sal_True );
-            String aComment;
+            rtl::OUString aComment;
             Color  aColor;
             sal_uInt16 nScenFlags;
             pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
@@ -2814,7 +2814,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
         pUndoData = new ScRefUndoData( pDoc );
     }
 
-    String sCodeName;
+    rtl::OUString sCodeName;
     sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
     if (pDoc->DeleteTab( nTab, pUndoDoc ))
     {
@@ -2956,7 +2956,7 @@ sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bReco
     ScDocShellModificator aModificator( rDocShell );
 
     sal_Bool bSuccess = false;
-    String sOldName;
+    rtl::OUString sOldName;
     pDoc->GetName(nTab, sOldName);
     if (pDoc->RenameTab( nTab, rName ))
     {
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 87c0f8f..d09eb8f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -319,16 +319,16 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
             {
                 if (aDocument.IsLinked( i ))
                 {
-                    String aName;
+                    rtl::OUString aName;
                     aDocument.GetName(i, aName);
-                    String aLinkTabName = aDocument.GetLinkTab(i);
-                    xub_StrLen nLinkTabNameLength = aLinkTabName.Len();
-                    xub_StrLen nNameLength = aName.Len();
+                    rtl::OUString aLinkTabName = aDocument.GetLinkTab(i);
+                    sal_Int32 nLinkTabNameLength = aLinkTabName.getLength();
+                    sal_Int32 nNameLength = aName.getLength();
                     if (nLinkTabNameLength < nNameLength)
                     {
 
                         // remove the quottes on begin and end of the docname and restore the escaped quotes
-                        const sal_Unicode* pNameBuffer = aName.GetBuffer();
+                        const sal_Unicode* pNameBuffer = aName.getStr();
                         if ( *pNameBuffer == '\'' && // all docnames have to have a ' character on the first pos
                             ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) )
                         {
@@ -349,8 +349,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
                             {
                                 xub_StrLen nIndex = nNameLength - nLinkTabNameLength;
                                 INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear());
-                                if( aName.Equals(aLinkTabName, nIndex, nLinkTabNameLength) &&
-                                    (aName.GetChar(nIndex - 1) == '#') && // before the table name should be the # char
+                                if( String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) &&
+                                    (aName.getStr()[nIndex - 1] == '#') && // before the table name should be the # char
                                     !aINetURLObject.HasError()) // the docname should be a valid URL
                                 {
                                     aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7e9fb51..356b6b5 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -877,13 +877,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
                 {
                     if ( pItem->ISA(SfxStringItem) )
                     {
-                        String aName = ((const SfxStringItem*)pItem)->GetValue();
+                        rtl::OUString aName = ((const SfxStringItem*)pItem)->GetValue();
                         SCTAB nTab;
                         if (aDocument.GetTable( aName, nTab ))
                         {
                             if (aDocument.IsScenario(nTab))
                             {
-                                String aComment;
+                                rtl::OUString aComment;
                                 Color aColor;
                                 sal_uInt16 nFlags;
                                 aDocument.GetScenarioData( nTab, aComment, aColor, nFlags );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 1e6c247..c2d2958 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -484,9 +484,9 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
     }
 }
 
-String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
+rtl::OUString lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
 {
-    String aName;
+    rtl::OUString aName;
     sal_Bool bOk = false;
     ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
                                                         pArea->nColEnd, pArea->nRowEnd );
@@ -666,14 +666,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord
         SCTAB   nTabCount = aDocument.GetTableCount();
         SCTAB   nSrcTab = SCTAB_MAX;
         SCTAB   nEndTab = nTab;
-        String aCompare;
+        rtl::OUString aCompare;
         while ( nEndTab+1 < nTabCount && aDocument.IsScenario(nEndTab+1) )
         {
             ++nEndTab;
             if (nSrcTab > MAXTAB)           // noch auf der Suche nach dem Szenario?
             {
                 aDocument.GetName( nEndTab, aCompare );
-                if (aCompare == rName)
+                if (aCompare.equals(rName))
                     nSrcTab = nEndTab;      // gefunden
             }
         }
@@ -702,7 +702,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord
                     for (SCTAB i=nTab+1; i<=nEndTab; i++)
                     {
                         pUndoDoc->SetScenario( i, sal_True );
-                        String aComment;
+                        rtl::OUString aComment;
                         Color  aColor;
                         sal_uInt16 nScenFlags;
                         aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
@@ -754,9 +754,9 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
                                     const Color& rColor, sal_uInt16 nFlags )
 {
     //  Undo
-    String aOldName;
+    rtl::OUString aOldName;
     aDocument.GetName( nTab, aOldName );
-    String aOldComment;
+    rtl::OUString aOldComment;
     Color aOldColor;
     sal_uInt16 nOldFlags;
     aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
@@ -772,7 +772,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
     PostPaintGridAll();
     aModificator.SetDocumentModified();
 
-    if ( rName != aOldName )
+    if (!aOldName.equals(rName))
         SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
 
     SfxBindings* pBindings = GetViewBindings();
@@ -862,7 +862,7 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
 
     if(nErrVal>0 && pSrcDoc->IsScenario( nSrcPos ))
     {
-        String aComment;
+        rtl::OUString aComment;
         Color  aColor;
         sal_uInt16 nFlags;
 
@@ -902,7 +902,7 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s
         if (bRecord)
             aDocument.BeginDrawUndo();          // drawing layer must do its own undo actions
 
-        String sSrcCodeName;
+        rtl::OUString sSrcCodeName;
         aDocument.GetCodeName( nSrcTab, sSrcCodeName );
         if (!aDocument.CopyTab( nSrcTab, nDestTab ))
         {
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 54380e2..cb82550 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -280,7 +280,7 @@ sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
 
             if ( bNewUrlName && nMode == SC_LINK_VALUE )
             {
-                String aName;
+                rtl::OUString aName;
                 pDoc->GetName( nTab, aName );
                 if ( ScGlobal::GetpTransliteration()->isEqual(
                         ScGlobal::GetDocTabName( aFileName, aTabName ), aName ) )
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index e654d82..b797bb3 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -290,7 +290,7 @@ private:
     void    SetCurrentCell( SCCOL nCol, SCROW Row );
     void    SetCurrentCellStr( const String rName );
     void    SetCurrentTable( SCTAB nTab );
-    void    SetCurrentTableStr( const String rName );
+    void    SetCurrentTableStr( const rtl::OUString& rName );
     void    SetCurrentObject( const String rName );
     void    SetCurrentDoc( const String& rDocName );
 
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
index 92a4159..19250a7 100644
--- a/sc/source/ui/inc/retypepassdlg.hxx
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -119,7 +119,7 @@ private:
 
     struct TableItem
     {
-        String              maName;
+        rtl::OUString       maName;
         TabProtectionPtr    mpProtect;
     };
     ::std::vector<TableItem> maTableItems;
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index e9acea5..4da9411 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -45,11 +45,11 @@ public:
         ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = false, sal_Bool bSheetProtected = false );
         ~ScNewScenarioDlg();
 
-    void SetScenarioData( const String& rName, const String& rComment,
-                            const Color& rColor, sal_uInt16 nFlags );
+    void SetScenarioData( const rtl::OUString& rName, const rtl::OUString& rComment,
+                          const Color& rColor, sal_uInt16 nFlags );
 
-    void GetScenarioData( String& rName, String& rComment,
-                            Color& rColor, sal_uInt16& rFlags ) const;
+    void GetScenarioData( rtl::OUString& rName, rtl::OUString& rComment,
+                          Color& rColor, sal_uInt16& rFlags ) const;
 
 private:
     FixedLine           aFlName;
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index 16630a0..3d8c974 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -50,7 +50,7 @@ public:
                             const rtl::OString& sHelpId, const rtl::OString& sEditHelpId );
             ~ScStringInputDlg();
 
-    void GetInputString( String& rString ) const;
+    void GetInputString( rtl::OUString& rString ) const;
 
 private:
     FixedText       aFtEditTitle;
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 564f757..b2bfe04 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -477,7 +477,7 @@ ScConflictsDlg::~ScConflictsDlg()
 
 String ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry )
 {
-    String aString;
+    rtl::OUString aString;
     if ( mpOwnTrack )
     {
         const ScChangeAction* pAction = mpOwnTrack->GetAction( rConflictEntry.maOwnActions[ 0 ] );
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 3a3e072..d5e47ce 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -233,7 +233,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
     if ( pSrcDoc )
     {
         SCTAB nCount = pSrcDoc->GetTableCount();
-        String aName;
+        rtl::OUString aName;
 
         for ( SCTAB i=0; i<nCount; i++ )
         {
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index c2a4d20..0da0a32 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -339,7 +339,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
     if ( pLb == &aLbDoc )
     {
         ScDocument* pDoc = GetSelectedDoc();
-        String      aName;
+        rtl::OUString aName;
 
         aLbTable.Clear();
         aLbTable.SetUpdateMode( false );
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 9ed724c..f78a922 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -253,7 +253,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
     if ( !bFmtInserted && pSelFmtData )
     {
         String              aStrStandard( SfxResId(STR_STANDARD) );
-        String              aFormatName;
+        rtl::OUString aFormatName;
         ScStringInputDlg*   pDlg;
         sal_Bool                bOk = false;
 
@@ -269,7 +269,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG )
             {
                 pDlg->GetInputString( aFormatName );
 
-                if ( (aFormatName.Len() > 0) && (aFormatName != aStrStandard) )
+                if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) )
                 {
                     ScAutoFormatData* pNewData
                         = new ScAutoFormatData( *pSelFmtData );
@@ -363,7 +363,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
     while( !bOk )
     {
 
-        String aFormatName=aLbFormat.GetSelectEntry();
+        rtl::OUString aFormatName = aLbFormat.GetSelectEntry();
         String aEntry;
 
         ScStringInputDlg* pDlg = new ScStringInputDlg( this,
@@ -377,12 +377,12 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
             pDlg->GetInputString( aFormatName );
             sal_uInt16 n;
 
-            if ( aFormatName.Len() > 0 )
+            if (!aFormatName.isEmpty())
             {
                 for( n = 0; n < pFormat->GetCount(); ++n )
                 {
                     (*pFormat)[n]->GetName(aEntry);
-                    if ( aEntry== aFormatName)
+                    if (aFormatName.equals(aEntry))
                         break;
                 }
                 if( n >= pFormat->GetCount() )
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index 1379145..d511b1a 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -75,7 +75,7 @@ ScStringInputDlg::ScStringInputDlg( Window*         pParent,
 
 //------------------------------------------------------------------------
 
-void ScStringInputDlg::GetInputString( String& rString ) const
+void ScStringInputDlg::GetInputString( rtl::OUString& rString ) const
 {
     rString = aEdInput.GetText();
 }
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index e42dee1..6a22a44 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -181,7 +181,7 @@ void ScNameDlg::Init()
     SCTAB n = pDoc->GetTableCount();
     for (SCTAB i = 0; i < n; ++i)
     {
-        String aTabName;
+        rtl::OUString aTabName;
         pDoc->GetName(i, aTabName);
         maLbScope.InsertEntry(aTabName);
     }
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 5f2defe..5c07de0 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -644,7 +644,7 @@ void ScContentTree::GetTableNames()
     if (!pDoc)
         return;
 
-    String aName;
+    rtl::OUString aName;
     SCTAB nCount = pDoc->GetTableCount();
     for ( SCTAB i=0; i<nCount; i++ )
     {
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index bb1eb1e..afe56af 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1021,18 +1021,18 @@ void ScNavigatorDlg::SetCurrentTable( SCTAB nTabNo )
     }
 }
 
-void ScNavigatorDlg::SetCurrentTableStr( const String rName )
+void ScNavigatorDlg::SetCurrentTableStr( const rtl::OUString& rName )
 {
     if (!GetViewData()) return;
 
     ScDocument* pDoc = pViewData->GetDocument();
     SCTAB nCount     = pDoc->GetTableCount();
-    String aTabName;
+    rtl::OUString aTabName;
 
     for ( SCTAB i=0; i<nCount; i++ )
     {
         pDoc->GetName( i, aTabName );
-        if ( aTabName == rName )
+        if ( aTabName.equals(rName) )
         {
             SetCurrentTable( i );
             return;
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 4b046f8..6625dc0 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1502,7 +1502,7 @@ void ScUndoUseScenario::Undo()
     for (SCTAB i = nTab+1; i<=nEndTab; i++)
     {
         //  Flags immer
-        String aComment;
+        rtl::OUString aComment;
         Color  aColor;
         sal_uInt16 nScenFlags;
         pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags );
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 96f8d46..4c94b98 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -348,7 +348,7 @@ void ScUndoDeleteTab::Undo()
     ScDocument* pDoc = pDocShell->GetDocument();
 
     sal_Bool bLink = false;
-    String aName;
+    rtl::OUString aName;
 
     for(i=0; i<theTabs.size(); ++i)
     {
@@ -362,7 +362,7 @@ void ScUndoDeleteTab::Undo()
         {
             pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc );
 
-            String aOldName;
+            rtl::OUString aOldName;
             pRefUndoDoc->GetName( nTab, aOldName );
             pDoc->RenameTab( nTab, aOldName, false );
             if (pRefUndoDoc->IsLinked(nTab))
@@ -376,7 +376,7 @@ void ScUndoDeleteTab::Undo()
             if ( pRefUndoDoc->IsScenario(nTab) )
             {
                 pDoc->SetScenario( nTab, sal_True );
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nScenFlags;
                 pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
@@ -734,7 +734,7 @@ void ScUndoCopyTab::Redo()
         if ( pDoc->IsScenario(nAdjSource) )
         {
             pDoc->SetScenario(nNewTab, sal_True );
-            String aComment;
+            rtl::OUString aComment;
             Color  aColor;
             sal_uInt16 nScenFlags;
             pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
@@ -1001,7 +1001,7 @@ void ScUndoImportTab::Undo()
         pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
         pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True );
 
-        String aOldName;
+        rtl::OUString aOldName;
         for (i=0; i<nCount; i++)
         {
             SCTAB nTabPos=nTab+i;
@@ -1013,7 +1013,7 @@ void ScUndoImportTab::Undo()
             if ( pDoc->IsScenario(nTabPos) )
             {
                 pRedoDoc->SetScenario(nTabPos, sal_True );
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nScenFlags;
                 pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
@@ -1049,7 +1049,7 @@ void ScUndoImportTab::Redo()
     }
 
     ScDocument* pDoc = pDocShell->GetDocument();
-    String aName;
+    rtl::OUString aName;
     SCTAB i;
     for (i=0; i<nCount; i++)                // first insert all sheets (#63304#)
     {
@@ -1067,7 +1067,7 @@ void ScUndoImportTab::Redo()
         if ( pRedoDoc->IsScenario(nTabPos) )
         {
             pDoc->SetScenario(nTabPos, sal_True );
-            String aComment;
+            rtl::OUString aComment;
             Color  aColor;
             sal_uInt16 nScenFlags;
             pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 9d33a95..f6543d6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7205,7 +7205,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
 rtl::OUString SAL_CALL ScTableSheetObj::getName() throw(uno::RuntimeException)
 {
     SolarMutexGuard aGuard;
-    String aName;
+    rtl::OUString aName;
     ScDocShell* pDocSh = GetDocShell();
     if ( pDocSh )
         pDocSh->GetDocument()->GetName( GetTab_Impl(), aName );
@@ -8015,7 +8015,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE
     ScDocShell* pDocSh = GetDocShell();
     if ( pDocSh )
     {
-        String aComment;
+        rtl::OUString aComment;
         Color  aColor;
         sal_uInt16 nFlags;
         pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags );
@@ -8034,8 +8034,8 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari
         ScDocument* pDoc = pDocSh->GetDocument();
         SCTAB nTab = GetTab_Impl();
 
-        String aName;
-        String aComment;
+        rtl::OUString aName;
+        rtl::OUString aComment;
         Color  aColor;
         sal_uInt16 nFlags;
         pDoc->GetName( nTab, aName );
@@ -8094,7 +8094,7 @@ void SAL_CALL ScTableSheetObj::apply() throw(uno::RuntimeException)
     {
         ScDocument* pDoc = pDocSh->GetDocument();
         SCTAB nTab = GetTab_Impl();
-        String aName;
+        rtl::OUString aName;
         pDoc->GetName( nTab, aName );       // Name dieses Szenarios
 
         SCTAB nDestTab = nTab;
@@ -8254,8 +8254,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
                 sal_Int32 nNewColor = 0;
                 if (aValue >>= nNewColor)
                 {
-                    String aName;
-                    String aComment;
+                    rtl::OUString aName;
+                    rtl::OUString aComment;
                     Color  aColor;
                     sal_uInt16 nFlags;
                     pDoc->GetName( nTab, aName );
@@ -8271,8 +8271,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8304,8 +8304,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8337,8 +8337,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8370,8 +8370,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8403,8 +8403,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8436,8 +8436,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aName;
-                String aComment;
+                rtl::OUString aName;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetName( nTab, aName );
@@ -8550,7 +8550,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8562,7 +8562,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8574,7 +8574,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8586,7 +8586,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8598,7 +8598,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8610,7 +8610,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8622,7 +8622,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         {
             if (pDoc->IsScenario(nTab))
             {
-                String aComment;
+                rtl::OUString aComment;
                 Color  aColor;
                 sal_uInt16 nFlags;
                 pDoc->GetScenarioData( nTab, aComment, aColor, nFlags );
@@ -8648,7 +8648,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
         }
         else if ( pEntry->nWID == SC_WID_UNO_CODENAME )
         {
-            String aCodeName;
+            rtl::OUString aCodeName;
             if ( pDocSh )
                 pDocSh->GetDocument()->GetCodeName( GetTab_Impl(), aCodeName );
             rAny <<= rtl::OUString( aCodeName );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 11ef07a..24e3d5c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1168,7 +1168,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
             // the sheet starts at the top of the page
             Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
             sal_Int32 nDestID = pPDFData->CreateDest( aArea );
-            String aTabName;
+            rtl::OUString aTabName;
             pDoc->GetName( nTab, aTabName );
             sal_Int32 nParent = -1;     // top-level
             pPDFData->CreateOutlineItem( nParent, aTabName, nDestID );
@@ -1177,7 +1177,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
         if( pPDFData && pPDFData->GetIsExportNamedDestinations() )
         {
             Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
-            String aTabName;
+            rtl::OUString aTabName;
             pDoc->GetName( nTab, aTabName );
             //need the PDF page number here
             pPDFData->CreateNamedDest( aTabName, aArea );
@@ -1564,7 +1564,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData(  )
             {
                 uno::Sequence< beans::PropertyValue > aSeq;
                 aSeq.realloc(1);
-                String sName;
+                rtl::OUString sName;
                 pDocShell->GetDocument()->GetName( pDocShell->GetDocument()->GetVisibleTab(), sName );
                 rtl::OUString sOUName(sName);
                 aSeq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ACTIVETABLE));
@@ -2750,7 +2750,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableSheetsObj::getElementNames()
     {
         ScDocument* pDoc = pDocShell->GetDocument();
         SCTAB nCount = pDoc->GetTableCount();
-        String aName;
+        rtl::OUString aName;
         uno::Sequence<rtl::OUString> aSeq(nCount);
         rtl::OUString* pAry = aSeq.getArray();
         for (SCTAB i=0; i<nCount; i++)
@@ -3550,14 +3550,12 @@ sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTA
 
     if ( pDocShell )
     {
-        String aString(rName);
-
-        String aTabName;
+        rtl::OUString aTabName;
         ScDocument* pDoc = pDocShell->GetDocument();
         SCTAB nCount = (SCTAB)getCount();
         for (SCTAB i=0; i<nCount; i++)
             if (pDoc->GetName( nTab+i+1, aTabName ))
-                if ( aTabName == aString )
+                if (aTabName.equals(rName))
                 {
                     rIndex = i;
                     return sal_True;
@@ -3709,7 +3707,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScScenariosObj::getElementNames()
 
     if ( pDocShell )    // sonst ist auch Count = 0
     {
-        String aTabName;
+        rtl::OUString aTabName;
         ScDocument* pDoc = pDocShell->GetDocument();
         rtl::OUString* pAry = aSeq.getArray();
         for (SCTAB i=0; i<nCount; i++)
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index ba27fc8..f4605cc 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -126,16 +126,16 @@ public:
             maCachedObject = maWorkbook;
         else
         {
-            String sCodeName;
+            rtl::OUString sCodeName;
             SCTAB nCount = pDoc->GetTableCount();
             for( SCTAB i = 0; i < nCount; i++ )
             {
                 pDoc->GetCodeName( i, sCodeName );
                 // aName ( sName ) is generated from the stream name which can be different ( case-wise )
                 // from the code name
-                if( sCodeName.EqualsIgnoreCaseAscii( sName ) )
+                if( String(sCodeName).EqualsIgnoreCaseAscii( sName ) )
                 {
-                    String sSheetName;
+                    rtl::OUString sSheetName;
                     if( pDoc->GetName( i, sSheetName ) )
                     {
                         uno::Reference< frame::XModel > xModel( mpDocShell->GetModel() );
@@ -175,7 +175,7 @@ public:
         SCTAB nCount = pDoc->GetTableCount();
         uno::Sequence< rtl::OUString > aNames( nCount + 1 );
         SCTAB index = 0;
-        String sCodeName;
+        rtl::OUString sCodeName;
         for( ; index < nCount; ++index )
         {
             pDoc->GetCodeName( index, sCodeName );
@@ -222,7 +222,7 @@ public:
                     bMatched = ( xControl == xIf );
                     if ( bMatched )
                     {
-                        String sName;
+                        rtl::OUString sName;
                         mrDocShell.GetDocument()->GetCodeName( static_cast<SCTAB>( index ), sName );
                         sCodeName = sName;
                     }
@@ -253,7 +253,7 @@ public:
                 uno::Reference<container::XIndexAccess> xFormControls(xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW);
                 if (xFormControls == xContainer)
                 {
-                    String aName;
+                    rtl::OUString aName;
                     if (mrDocShell.GetDocument()->GetCodeName(static_cast<SCTAB>(i), aName))
                         return aName;
                 }
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 027cfd9..7ee13b2 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -505,7 +505,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
 
                 for ( SCTAB index = 0; index < pDoc->GetTableCount(); index++)
                 {
-                    String aName;
+                    rtl::OUString aName;
                     pDoc->GetCodeName( index, aName );
                     sDocModuleNames.push_back( aName );
                 }
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index f332248..2854586 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -807,7 +807,7 @@ OUString ScVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& r
     if( bSheetEvent && (nTab < 0) )
         throw lang::IllegalArgumentException();
 
-    String aCodeName;
+    rtl::OUString aCodeName;
     if( bSheetEvent )
         mpDoc->GetCodeName( nTab, aCodeName );
     else
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 35a1b7a..64f25ea 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -255,7 +255,7 @@ ScVbaWorksheet::createSheetCopyInNewDoc(rtl::OUString aCurrSheetName)
     uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
 
     ScDocShell* pShell = excel::getDocShell( xModel );
-    String aCodeName;
+    rtl::OUString aCodeName;
     pShell->GetDocument()->GetCodeName( 0, aCodeName );
     return uno::Reference< excel::XWorksheet >( getUnoDocModule( aCodeName, pShell ), uno::UNO_QUERY_THROW );
 }
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 054dcbf..b2fe280 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -740,7 +740,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
 
                     if ( !pDoc->IsScenario(nTab) )
                     {
-                        String aStr;
+                        rtl::OUString aStr;
                         sal_uInt16 nFlags;
                         SCTAB nScTab = nTab + 1;
                         String aProtect;
@@ -760,7 +760,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list