[Libreoffice-commits] core.git: 45 commits - sc/inc sc/source

Noel Grandin noel at peralex.com
Tue Oct 8 01:07:45 PDT 2013


 sc/inc/address.hxx                                           |   14 
 sc/inc/addruno.hxx                                           |    2 
 sc/inc/autonamecache.hxx                                     |    2 
 sc/inc/cellsuno.hxx                                          |    2 
 sc/inc/chartlis.hxx                                          |    2 
 sc/inc/chartuno.hxx                                          |    4 
 sc/inc/column.hxx                                            |    4 
 sc/inc/compiler.hxx                                          |   40 -
 sc/inc/consoli.hxx                                           |   10 
 sc/inc/dapiuno.hxx                                           |    4 
 sc/inc/datauno.hxx                                           |    4 
 sc/inc/docpool.hxx                                           |    2 
 sc/inc/document.hxx                                          |    1 
 sc/inc/docuno.hxx                                            |    2 
 sc/inc/dpgroup.hxx                                           |    2 
 sc/inc/drwlayer.hxx                                          |   12 
 sc/inc/editutil.hxx                                          |   12 
 sc/inc/global.hxx                                            |   30 -
 sc/source/core/data/attrib.cxx                               |   39 -
 sc/source/core/data/autonamecache.cxx                        |    2 
 sc/source/core/data/column3.cxx                              |   14 
 sc/source/core/data/dbdocutl.cxx                             |    8 
 sc/source/core/data/docpool.cxx                              |    2 
 sc/source/core/data/documen4.cxx                             |    2 
 sc/source/core/data/document.cxx                             |   14 
 sc/source/core/data/dpcache.cxx                              |   24 -
 sc/source/core/data/dpdimsave.cxx                            |    3 
 sc/source/core/data/dpgroup.cxx                              |    2 
 sc/source/core/data/dpobject.cxx                             |    6 
 sc/source/core/data/dptabres.cxx                             |   18 
 sc/source/core/data/drwlayer.cxx                             |   24 -
 sc/source/core/data/global.cxx                               |   28 -
 sc/source/core/data/global2.cxx                              |   21 
 sc/source/core/data/globalx.cxx                              |    6 
 sc/source/core/data/patattr.cxx                              |    4 
 sc/source/core/data/stlpool.cxx                              |    6 
 sc/source/core/data/table2.cxx                               |    4 
 sc/source/core/data/table3.cxx                               |   28 -
 sc/source/core/data/table4.cxx                               |    2 
 sc/source/core/data/table6.cxx                               |    4 
 sc/source/core/data/tabprotection.cxx                        |   28 -
 sc/source/core/inc/cellkeytranslator.hxx                     |    1 
 sc/source/core/tool/address.cxx                              |  181 ++++----
 sc/source/core/tool/autoform.cxx                             |    2 
 sc/source/core/tool/callform.cxx                             |    4 
 sc/source/core/tool/cellkeytranslator.cxx                    |   13 
 sc/source/core/tool/charthelper.cxx                          |    6 
 sc/source/core/tool/chartlis.cxx                             |    2 
 sc/source/core/tool/compiler.cxx                             |  207 ++++-----
 sc/source/core/tool/consoli.cxx                              |   87 +---
 sc/source/core/tool/ddelink.cxx                              |   10 
 sc/source/core/tool/detfunc.cxx                              |   16 
 sc/source/core/tool/doubleref.cxx                            |    4 
 sc/source/core/tool/editutil.cxx                             |   10 
 sc/source/core/tool/interpr1.cxx                             |  138 +++---
 sc/source/core/tool/interpr2.cxx                             |   22 -
 sc/source/core/tool/interpr4.cxx                             |   32 -
 sc/source/core/tool/interpr5.cxx                             |   26 -
 sc/source/core/tool/interpr6.cxx                             |    4 
 sc/source/core/tool/queryparam.cxx                           |   28 -
 sc/source/core/tool/rangelst.cxx                             |   10 
 sc/source/core/tool/rangeseq.cxx                             |    4 
 sc/source/core/tool/rangeutl.cxx                             |   54 +-
 sc/source/core/tool/userlist.cxx                             |    6 
 sc/source/filter/dif/difexp.cxx                              |   10 
 sc/source/filter/dif/difimp.cxx                              |    4 
 sc/source/filter/excel/excdoc.cxx                            |    8 
 sc/source/filter/excel/excel.cxx                             |    2 
 sc/source/filter/excel/excform.cxx                           |    4 
 sc/source/filter/excel/excform8.cxx                          |   12 
 sc/source/filter/excel/excimp8.cxx                           |   19 
 sc/source/filter/excel/exctools.cxx                          |    4 
 sc/source/filter/excel/impop.cxx                             |    2 
 sc/source/filter/excel/namebuff.cxx                          |    4 
 sc/source/filter/excel/xechart.cxx                           |    4 
 sc/source/filter/excel/xecontent.cxx                         |   34 -
 sc/source/filter/excel/xeescher.cxx                          |   10 
 sc/source/filter/excel/xeformula.cxx                         |   42 -
 sc/source/filter/excel/xehelper.cxx                          |   22 -
 sc/source/filter/excel/xelink.cxx                            |  232 +++++------
 sc/source/filter/excel/xename.cxx                            |   40 -
 sc/source/filter/excel/xepivot.cxx                           |    2 
 sc/source/filter/excel/xestyle.cxx                           |    2 
 sc/source/filter/excel/xetable.cxx                           |    6 
 sc/source/filter/excel/xichart.cxx                           |   14 
 sc/source/filter/excel/xicontent.cxx                         |   58 +-
 sc/source/filter/excel/xiescher.cxx                          |   28 -
 sc/source/filter/excel/xihelper.cxx                          |   20 
 sc/source/filter/excel/xilink.cxx                            |   12 
 sc/source/filter/excel/xipage.cxx                            |    2 
 sc/source/filter/excel/xipivot.cxx                           |   12 
 sc/source/filter/excel/xiroot.cxx                            |    4 
 sc/source/filter/excel/xistream.cxx                          |    6 
 sc/source/filter/excel/xistyle.cxx                           |   10 
 sc/source/filter/excel/xlformula.cxx                         |    4 
 sc/source/filter/excel/xlstyle.cxx                           |    4 
 sc/source/filter/ftools/ftools.cxx                           |   16 
 sc/source/filter/html/htmlexp.cxx                            |   24 -
 sc/source/filter/html/htmlimp.cxx                            |    8 
 sc/source/filter/html/htmlpars.cxx                           |   40 -
 sc/source/filter/inc/ftools.hxx                              |    8 
 sc/source/filter/inc/xicontent.hxx                           |    2 
 sc/source/filter/qpro/qpro.cxx                               |    4 
 sc/source/filter/qpro/qprostyle.cxx                          |    2 
 sc/source/filter/rtf/eeimpars.cxx                            |    8 
 sc/source/filter/starcalc/scflt.cxx                          |   16 
 sc/source/filter/xcl97/XclExpChangeTrack.cxx                 |    2 
 sc/source/filter/xcl97/XclImpChangeTrack.cxx                 |    8 
 sc/source/filter/xcl97/xcl97rec.cxx                          |   14 
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx       |   10 
 sc/source/filter/xml/xmldpimp.cxx                            |    2 
 sc/source/filter/xml/xmlexprt.cxx                            |    2 
 sc/source/filter/xml/xmlimprt.cxx                            |    8 
 sc/source/filter/xml/xmlsceni.cxx                            |    2 
 sc/source/filter/xml/xmlwrap.cxx                             |    2 
 sc/source/ui/Accessibility/AccessibleCellBase.cxx            |    2 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx          |   10 
 sc/source/ui/Accessibility/AccessibleDocument.cxx            |    4 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |   10 
 sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx      |   12 
 sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx   |    6 
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx        |    4 
 sc/source/ui/Accessibility/AccessibleTableBase.cxx           |    4 
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx            |    2 
 sc/source/ui/app/client.cxx                                  |    2 
 sc/source/ui/app/drwtrans.cxx                                |   10 
 sc/source/ui/app/inputhdl.cxx                                |  141 +++---
 sc/source/ui/app/inputwin.cxx                                |   28 -
 sc/source/ui/app/msgpool.cxx                                 |    2 
 sc/source/ui/app/scmod.cxx                                   |    4 
 sc/source/ui/app/transobj.cxx                                |    8 
 sc/source/ui/condformat/condformatmgr.cxx                    |    4 
 sc/source/ui/dbgui/asciiopt.cxx                              |   46 +-
 sc/source/ui/dbgui/consdlg.cxx                               |   28 -
 sc/source/ui/dbgui/csvgrid.cxx                               |   14 
 sc/source/ui/dbgui/csvruler.cxx                              |    8 
 sc/source/ui/dbgui/dapidata.cxx                              |    8 
 sc/source/ui/dbgui/dapitype.cxx                              |    2 
 sc/source/ui/dbgui/dbnamdlg.cxx                              |   22 -
 sc/source/ui/dbgui/expftext.cxx                              |    2 
 sc/source/ui/dbgui/fieldwnd.cxx                              |    4 
 sc/source/ui/dbgui/foptmgr.cxx                               |   18 
 sc/source/ui/dbgui/pvfundlg.cxx                              |    2 
 sc/source/ui/dbgui/scuiasciiopt.cxx                          |   44 --
 sc/source/ui/dbgui/scuiimoptdlg.cxx                          |   44 +-
 sc/source/ui/dbgui/sfiltdlg.cxx                              |   24 -
 sc/source/ui/dbgui/tpsort.cxx                                |   26 -
 sc/source/ui/docshell/arealink.cxx                           |   14 
 sc/source/ui/docshell/autostyl.cxx                           |   16 
 sc/source/ui/docshell/dbdocimp.cxx                           |   12 
 sc/source/ui/docshell/docfunc.cxx                            |   52 +-
 sc/source/ui/docshell/docsh.cxx                              |  100 ++--
 sc/source/ui/docshell/docsh3.cxx                             |   28 -
 sc/source/ui/docshell/docsh4.cxx                             |   38 -
 sc/source/ui/docshell/docsh5.cxx                             |    6 
 sc/source/ui/docshell/docsh6.cxx                             |    2 
 sc/source/ui/docshell/docsh8.cxx                             |   36 -
 sc/source/ui/docshell/externalrefmgr.cxx                     |   22 -
 sc/source/ui/docshell/impex.cxx                              |  135 +++---
 sc/source/ui/docshell/servobj.cxx                            |   14 
 sc/source/ui/docshell/tablink.cxx                            |   10 
 sc/source/ui/docshell/tpstat.cxx                             |    2 
 sc/source/ui/drawfunc/drawsh.cxx                             |    2 
 sc/source/ui/drawfunc/drawsh5.cxx                            |   12 
 sc/source/ui/drawfunc/drtxtob.cxx                            |   22 -
 sc/source/ui/drawfunc/fuins1.cxx                             |   12 
 sc/source/ui/drawfunc/fusel.cxx                              |    4 
 sc/source/ui/drawfunc/futext3.cxx                            |    2 
 sc/source/ui/drawfunc/graphsh.cxx                            |   12 
 sc/source/ui/drawfunc/mediash.cxx                            |    2 
 sc/source/ui/formdlg/dwfunctr.cxx                            |   26 -
 sc/source/ui/formdlg/formula.cxx                             |   18 
 sc/source/ui/inc/viewfunc.hxx                                |    2 
 sc/source/ui/miscdlgs/acredlin.cxx                           |  116 ++---
 sc/source/ui/miscdlgs/anyrefdg.cxx                           |    8 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                       |   22 -
 sc/source/ui/miscdlgs/crnrdlg.cxx                            |   36 -
 sc/source/ui/miscdlgs/datafdlg.cxx                           |    2 
 sc/source/ui/miscdlgs/highred.cxx                            |    4 
 sc/source/ui/miscdlgs/instbdlg.cxx                           |    2 
 sc/source/ui/miscdlgs/linkarea.cxx                           |    2 
 sc/source/ui/miscdlgs/mvtabdlg.cxx                           |    4 
 sc/source/ui/miscdlgs/optsolver.cxx                          |   17 
 sc/source/ui/miscdlgs/redcom.cxx                             |    6 
 sc/source/ui/miscdlgs/retypepassdlg.cxx                      |   10 
 sc/source/ui/miscdlgs/scuiautofmt.cxx                        |    6 
 sc/source/ui/miscdlgs/sharedocdlg.cxx                        |   27 -
 sc/source/ui/miscdlgs/simpref.cxx                            |   13 
 sc/source/ui/miscdlgs/solveroptions.cxx                      |   16 
 sc/source/ui/miscdlgs/tabopdlg.cxx                           |    4 
 sc/source/ui/miscdlgs/warnbox.cxx                            |    2 
 sc/source/ui/namedlg/namemgrtable.cxx                        |    8 
 sc/source/ui/navipi/content.cxx                              |   62 +-
 sc/source/ui/navipi/navcitem.cxx                             |    2 
 sc/source/ui/navipi/navipi.cxx                               |   20 
 sc/source/ui/navipi/scenwnd.cxx                              |    4 
 sc/source/ui/optdlg/opredlin.cxx                             |    2 
 sc/source/ui/optdlg/tpformula.cxx                            |   10 
 sc/source/ui/optdlg/tpusrlst.cxx                             |   54 +-
 sc/source/ui/optdlg/tpview.cxx                               |    2 
 sc/source/ui/pagedlg/areasdlg.cxx                            |  119 ++---
 sc/source/ui/pagedlg/tphfedit.cxx                            |   10 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx              |    2 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx           |   32 -
 sc/source/ui/undo/undoblk.cxx                                |    4 
 sc/source/ui/undo/undoblk3.cxx                               |    8 
 sc/source/ui/undo/undocell.cxx                               |    4 
 sc/source/ui/undo/undostyl.cxx                               |    6 
 sc/source/ui/undo/undotab.cxx                                |    4 
 sc/source/ui/unoobj/addruno.cxx                              |   50 +-
 sc/source/ui/unoobj/afmtuno.cxx                              |   35 -
 sc/source/ui/unoobj/appluno.cxx                              |   84 +--
 sc/source/ui/unoobj/cellsuno.cxx                             |  137 +++---
 sc/source/ui/unoobj/chart2uno.cxx                            |   20 
 sc/source/ui/unoobj/chartuno.cxx                             |   18 
 sc/source/ui/unoobj/confuno.cxx                              |    7 
 sc/source/ui/unoobj/cursuno.cxx                              |    5 
 sc/source/ui/unoobj/dapiuno.cxx                              |  180 ++++----
 sc/source/ui/unoobj/datauno.cxx                              |  181 ++++----
 sc/source/ui/unoobj/docuno.cxx                               |  216 +++++-----
 sc/source/ui/unoobj/filtuno.cxx                              |   14 
 sc/source/ui/unoobj/fmtuno.cxx                               |   74 +--
 sc/source/ui/unoobj/funcuno.cxx                              |    5 
 sc/source/ui/unoobj/linkuno.cxx                              |   96 ++--
 sc/source/ui/unoobj/nameuno.cxx                              |    6 
 sc/source/ui/unoobj/pageuno.cxx                              |    3 
 sc/source/ui/unoobj/scdetect.cxx                             |   28 -
 sc/source/ui/unoobj/servuno.cxx                              |    4 
 sc/source/ui/unoobj/shapeuno.cxx                             |   50 +-
 sc/source/ui/unoobj/srchuno.cxx                              |   63 +-
 sc/source/ui/unoobj/styleuno.cxx                             |   32 -
 sc/source/ui/unoobj/targuno.cxx                              |   14 
 sc/source/ui/unoobj/textuno.cxx                              |    2 
 sc/source/ui/unoobj/tokenuno.cxx                             |   28 -
 sc/source/ui/unoobj/viewuno.cxx                              |  113 ++---
 sc/source/ui/vba/excelvbahelper.cxx                          |    8 
 sc/source/ui/vba/vbacharacters.cxx                           |    4 
 sc/source/ui/vba/vbahelper.cxx                               |    4 
 sc/source/ui/vba/vbanames.cxx                                |    2 
 sc/source/ui/vba/vbarange.cxx                                |    2 
 sc/source/ui/vba/vbaworkbooks.cxx                            |   13 
 sc/source/ui/vba/vbaworksheets.cxx                           |    2 
 sc/source/ui/view/cellsh.cxx                                 |    6 
 sc/source/ui/view/cellsh1.cxx                                |  152 +++----
 sc/source/ui/view/cellsh2.cxx                                |   16 
 sc/source/ui/view/cellsh3.cxx                                |   18 
 sc/source/ui/view/colrowba.cxx                               |    8 
 sc/source/ui/view/dbfunc.cxx                                 |    2 
 sc/source/ui/view/dbfunc3.cxx                                |   22 -
 sc/source/ui/view/dbfunc4.cxx                                |    2 
 sc/source/ui/view/editsh.cxx                                 |   24 -
 sc/source/ui/view/formatsh.cxx                               |   64 +--
 sc/source/ui/view/gridwin.cxx                                |   22 -
 sc/source/ui/view/gridwin2.cxx                               |    2 
 sc/source/ui/view/gridwin4.cxx                               |    4 
 sc/source/ui/view/gridwin5.cxx                               |   32 -
 sc/source/ui/view/hdrcont.cxx                                |    6 
 sc/source/ui/view/hintwin.cxx                                |    4 
 sc/source/ui/view/notemark.cxx                               |    2 
 sc/source/ui/view/output.cxx                                 |    6 
 sc/source/ui/view/output2.cxx                                |   42 -
 sc/source/ui/view/preview.cxx                                |    4 
 sc/source/ui/view/prevwsh.cxx                                |    6 
 sc/source/ui/view/printfun.cxx                               |   10 
 sc/source/ui/view/spelleng.cxx                               |    2 
 sc/source/ui/view/tabcont.cxx                                |    2 
 sc/source/ui/view/tabview.cxx                                |    2 
 sc/source/ui/view/tabvwsh2.cxx                               |    4 
 sc/source/ui/view/tabvwsh3.cxx                               |   26 -
 sc/source/ui/view/tabvwsh4.cxx                               |    2 
 sc/source/ui/view/tabvwsh9.cxx                               |    2 
 sc/source/ui/view/tabvwsha.cxx                               |   18 
 sc/source/ui/view/tabvwshf.cxx                               |   28 -
 sc/source/ui/view/tabvwshh.cxx                               |    4 
 sc/source/ui/view/viewfun2.cxx                               |   24 -
 sc/source/ui/view/viewfun3.cxx                               |   12 
 sc/source/ui/view/viewfun4.cxx                               |   14 
 sc/source/ui/view/viewfun5.cxx                               |   12 
 sc/source/ui/view/viewfun6.cxx                               |    2 
 sc/source/ui/view/viewfun7.cxx                               |    6 
 sc/source/ui/view/viewfunc.cxx                               |   47 +-
 281 files changed, 2985 insertions(+), 3092 deletions(-)

New commits:
commit 8850633fe4cdac306c35caab1a0d14c13d9df864
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 8 08:19:48 2013 +0200

    convert sc/source/core/data/*.cxx from String to OUString
    
    and fix a bug in ScDPCache::ValidQuery where an inner loop
    was re-using an outer loop counter.
    
    Change-Id: Ie750234a079646bdb7174983814d8d9caf52f491

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3fec756..a67b1d6 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -495,10 +495,10 @@ class ScGlobal
     static ScUnoAddInCollection* pAddInCollection;
     static ScUserList*      pUserList;
     static OUString**       ppRscString;
-    static String*          pStrScDoc;
+    static OUString*        pStrScDoc;
     static String*          pEmptyString;
-    static OUString* pEmptyOUString;
-    static String*          pStrClipDocName;
+    static OUString*        pEmptyOUString;
+    static OUString*        pStrClipDocName;
     static SvxBrushItem*    pEmptyBrushItem;
     static SvxBrushItem*    pButtonBrushItem;
     static SvxBrushItem*    pEmbeddedBrushItem;
@@ -544,8 +544,8 @@ public:
     SC_DLLPUBLIC static LanguageType            eLnge;
     static sal_Unicode          cListDelimiter;
 
-    static const String&        GetClipDocName();
-    static void                 SetClipDocName( const String& rNew );
+    static const OUString&      GetClipDocName();
+    static void                 SetClipDocName( const OUString& rNew );
     SC_DLLPUBLIC static const SvxSearchItem&    GetSearchItem();
     SC_DLLPUBLIC static void                    SetSearchItem( const SvxSearchItem& rNew );
     SC_DLLPUBLIC static ScAutoFormat*       GetAutoFormat();
@@ -556,11 +556,11 @@ public:
     SC_DLLPUBLIC static ScUserList*         GetUserList();
     static void                 SetUserList( const ScUserList* pNewList );
     SC_DLLPUBLIC static const OUString&       GetRscString( sal_uInt16 nIndex );
-    static void                 OpenURL( const String& rURL, const String& rTarget );
-    SC_DLLPUBLIC static String              GetAbsDocName( const String& rFileName,
+    static void                 OpenURL( const OUString& rURL, const OUString& rTarget );
+    SC_DLLPUBLIC static OUString            GetAbsDocName( const OUString& rFileName,
                                                 SfxObjectShell* pShell );
-    SC_DLLPUBLIC static String              GetDocTabName( const String& rFileName,
-                                                const String& rTabName );
+    SC_DLLPUBLIC static OUString            GetDocTabName( const OUString& rFileName,
+                                                const OUString& rTabName );
     SC_DLLPUBLIC static sal_uLong               GetStandardFormat( SvNumberFormatter&,
                                     sal_uLong nFormat, short nType );
     SC_DLLPUBLIC static sal_uLong               GetStandardFormat( double, SvNumberFormatter&,
@@ -591,7 +591,7 @@ public:
     static SvxBrushItem*    GetProtectedBrushItem() { return pProtectedBrushItem; }
     SC_DLLPUBLIC    static const String&    GetEmptyString();
     SC_DLLPUBLIC    static const OUString&    GetEmptyOUString();
-    static const String&    GetScDocString();
+    static const OUString&  GetScDocString();
 
     /** Returns the specified image list with outline symbols. */
     static ImageList*       GetOutlineSymbols();
@@ -601,8 +601,8 @@ public:
     static ScFunctionMgr*   GetStarCalcFunctionMgr();
     static void             ResetFunctionList();
 
-    static String           GetErrorString(sal_uInt16 nErrNumber);
-    static String           GetLongErrorString(sal_uInt16 nErrNumber);
+    static OUString         GetErrorString(sal_uInt16 nErrNumber);
+    static OUString         GetLongErrorString(sal_uInt16 nErrNumber);
     static sal_Bool             EETextObjEqual( const EditTextObject* pObj1,
                                             const EditTextObject* pObj2 );
     static sal_Bool             CheckWidthInvalidate( bool& bNumFormatChanged,
@@ -632,7 +632,7 @@ public:
                                 bool bForceSep = false );
 
     /** Returns true, if the first and last character of the string is cQuote. */
-    SC_DLLPUBLIC static bool             IsQuoted( const String& rString, sal_Unicode cQuote = '\'' );
+    SC_DLLPUBLIC static bool             IsQuoted( const OUString& rString, sal_Unicode cQuote = '\'' );
 
     /** Inserts the character cQuote at beginning and end of rString.
         @param bEscapeEmbedded      If <TRUE/>, embedded quote characters are
@@ -664,7 +664,7 @@ SC_DLLPUBLIC    static xub_StrLen       FindUnquoted( const OUString& rString, s
 SC_DLLPUBLIC    static const sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar, sal_Unicode cQuote = '\'' );
 
     static  CharSet         GetCharsetValue( const OUString& rCharSet );
-    static  String          GetCharsetString( CharSet eVal );
+    static  OUString        GetCharsetString( CharSet eVal );
 
     /// a "ReadOnly" formatter for UNO/XML export
     static  SvNumberFormatter*  GetEnglishFormatter();
@@ -682,7 +682,7 @@ SC_DLLPUBLIC    static const sal_Unicode* FindUnquoted( const sal_Unicode* pStri
     SC_DLLPUBLIC static void             AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter );
 
     /** Obtain the ordinal suffix for a number according to the system locale */
-    static String           GetOrdinalSuffix( sal_Int32 nNumber);
+    static OUString         GetOrdinalSuffix( sal_Int32 nNumber);
 
     /** A static instance of ScFieldEditEngine not capable of resolving
         document specific fields, to be used only by ScEditUtil::GetString(). */
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 2ec52ec..042c4b5 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -744,57 +744,56 @@ SfxPoolItem* ScPageHFItem::Clone( SfxItemPool* ) const
 
 //------------------------------------------------------------------------
 
-static void lcl_SetSpace( String& rStr, const ESelection& rSel )
+static void lcl_SetSpace( OUString& rStr, const ESelection& rSel )
 {
     // Text replaced by a space to ensure they are positions:
 
     xub_StrLen nLen = rSel.nEndPos-rSel.nStartPos;
-    rStr.Erase( rSel.nStartPos, nLen-1 );
-    rStr.SetChar( rSel.nStartPos, ' ' );
+    rStr = rStr.replaceAt( rSel.nStartPos, nLen, " " );
 }
 
-static bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
+static bool lcl_ConvertFields(EditEngine& rEng, const OUString* pCommands)
 {
     bool bChange = false;
     sal_Int32 nParCnt = rEng.GetParagraphCount();
     for (sal_Int32 nPar = 0; nPar<nParCnt; nPar++)
     {
-        String aStr = rEng.GetText( nPar );
-        xub_StrLen nPos;
+        OUString aStr = rEng.GetText( nPar );
+        sal_Int32 nPos;
 
-        while ((nPos = aStr.Search(pCommands[0])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[0])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
-        while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[1])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
-        while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[2])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
-        while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[3])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
-        while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[4])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
-        while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND)
+        while ((nPos = aStr.indexOf(pCommands[5])) != -1)
         {
-            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
+            ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].getLength() );
             rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
@@ -841,8 +840,8 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
     if ( nVer < 1 )             //old field command conversions
     {
         sal_uInt16 i;
-        const String& rDel = ScGlobal::GetRscString( STR_HFCMD_DELIMITER );
-        String aCommands[SC_FIELD_COUNT];
+        const OUString& rDel = ScGlobal::GetRscString( STR_HFCMD_DELIMITER );
+        OUString aCommands[SC_FIELD_COUNT];
         for (i=0; i<SC_FIELD_COUNT; i++)
             aCommands[i] = rDel;
         aCommands[0] += ScGlobal::GetRscString(STR_HFCMD_PAGE);
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index a03250a..2db7b5f 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -43,7 +43,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
                                 const uno::Reference<sdbc::XRow>& xRow, long nRowPos,
                                 long nType, sal_Bool bCurrency, StrData* pStrData )
 {
-    String aString;
+    OUString aString;
     double nVal = 0.0;
     sal_Bool bValue = false;
     sal_Bool bEmptyFlag = false;
@@ -85,7 +85,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
             case sdbc::DataType::VARCHAR:
             case sdbc::DataType::LONGVARCHAR:
                 aString = xRow->getString(nRowPos);
-                bEmptyFlag = ( aString.Len() == 0 ) && xRow->wasNull();
+                bEmptyFlag = ( aString.isEmpty() ) && xRow->wasNull();
                 break;
 
             case sdbc::DataType::DATE:
@@ -171,7 +171,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
     }
     else
     {
-        if (aString.Len())
+        if (!aString.isEmpty())
         {
             if (ScStringUtil::isMultiline(aString))
             {
@@ -189,7 +189,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
             }
 
             if (pStrData)
-                pStrData->mnStrLength = aString.Len();
+                pStrData->mnStrLength = aString.getLength();
         }
         else
             pDoc->SetEmptyCell(aPos);
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 250c1a8..608cf4d 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -372,7 +372,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam,      // Mehrfachopera
     aForString.append(ScCompiler::GetNativeSymbol(ocTableOp));
     aForString.append(ScCompiler::GetNativeSymbol( ocOpen));
 
-    const String& sSep = ScCompiler::GetNativeSymbol( ocSep);
+    const OUString& sSep = ScCompiler::GetNativeSymbol( ocSep);
     if (rParam.nMode == 0)                          // nur Spalte
     {
         aRef.Set( rParam.aRefFormulaCell.GetAddress(), true, false, false );
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 5d2e50a..874efb2 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -525,7 +525,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
                      && pCellData->HasStringData() )
                 )
         {   // by String
-            String  aCellStr = pCellData->GetString();
+            OUString  aCellStr = pCellData->GetString();
 
             bool bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
                                                    || (rEntry.eOp == SC_NOT_EQUAL)));
@@ -533,13 +533,13 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
             if (bRealRegExp || bTestRegExp)
             {
                 sal_Int32 nStart = 0;
-                sal_Int32 nEnd   = aCellStr.Len();
+                sal_Int32 nEnd   = aCellStr.getLength();
 
                 bool bMatch = (bool) rEntry.GetSearchTextPtr( rParam.bCaseSens )
                               ->SearchForward( aCellStr, &nStart, &nEnd );
                 // from 614 on, nEnd is behind the found text
                 if (bMatch && bMatchWholeCell
-                    && (nStart != 0 || nEnd != aCellStr.Len()))
+                    && (nStart != 0 || nEnd != aCellStr.getLength()))
                     bMatch = false;    // RegExp must match entire cell string
                 if (bRealRegExp)
                     bOk = ((rEntry.eOp == SC_NOT_EQUAL) ? !bMatch : bMatch);
@@ -550,17 +550,17 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
                 {
                     if (bMatchWholeCell)
                     {
-                        String aStr = rEntry.GetQueryItem().maString;
+                        OUString aStr = rEntry.GetQueryItem().maString;
                         bOk = pTransliteration->isEqual(aCellStr, aStr);
                         bool bHasStar = false;
-                        xub_StrLen nIndex;
-                        if (( nIndex = aStr.Search('*') ) != STRING_NOTFOUND)
+                        sal_Int32 nIndex;
+                        if (( nIndex = aStr.indexOf('*') ) != -1)
                             bHasStar = sal_True;
                         if (bHasStar && (nIndex>0))
                         {
-                            for (i=0;(i<nIndex) && (i< aCellStr.Len()) ; i++)
+                            for (sal_Int32 j=0;(j<nIndex) && (j< aCellStr.getLength()) ; j++)
                             {
-                                if (aCellStr.GetChar( (sal_uInt16)i ) == aStr.GetChar((sal_uInt16) i ))
+                                if (aCellStr[j] == aStr[j])
                                 {
                                     bOk=1;
                                 }
@@ -576,11 +576,11 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
                     {
                         const OUString& rQueryStr = rEntry.GetQueryItem().maString;
                         ::com::sun::star::uno::Sequence< sal_Int32 > xOff;
-                        String aCell = pTransliteration->transliterate(
-                            aCellStr, ScGlobal::eLnge, 0, aCellStr.Len(), &xOff);
-                        String aQuer = pTransliteration->transliterate(
+                        OUString aCell = pTransliteration->transliterate(
+                            aCellStr, ScGlobal::eLnge, 0, aCellStr.getLength(), &xOff);
+                        OUString aQuer = pTransliteration->transliterate(
                             rQueryStr, ScGlobal::eLnge, 0, rQueryStr.getLength(), &xOff);
-                        bOk = (aCell.Search( aQuer ) != STRING_NOTFOUND);
+                        bOk = (aCell.indexOf( aQuer ) != -1);
                     }
                     if (rEntry.eOp == SC_NOT_EQUAL)
                         bOk = !bOk;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 16f68b8..d200971 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -174,8 +174,7 @@ OUString ScDPSaveGroupDimension::CreateGroupName(const OUString& rPrefix)
     const sal_Int32 nMaxAdd = nAdd + aGroups.size();    // limit the loop
     while ( nAdd <= nMaxAdd )
     {
-        String aGroupName( rPrefix );
-        aGroupName.Append( OUString::number( nAdd ) );
+        OUString aGroupName = rPrefix + OUString::number( nAdd );
         bool bExists = false;
 
         // look for existing groups
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 1594463..5106cd8 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1418,7 +1418,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
     }
     OSL_ENSURE( xDim.is(), "dimension not found" );
     if ( !xDim.is() ) return;
-    String aDimName = xDim->getName();
+    OUString aDimName = xDim->getName();
 
     uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
     sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp,
@@ -1497,7 +1497,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
     OSL_ENSURE( pModifyData, "no data?" );
     if ( pModifyData )
     {
-        const String aName = rElemDesc.MemberName;
+        const OUString aName = rElemDesc.MemberName;
         pModifyData->GetDimensionByName(aDimName)->
             GetMemberByName(aName)->SetShowDetails( !bShowDetails );    // toggle
 
@@ -2673,7 +2673,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
     catch ( const sdbc::SQLException& rError )
     {
         //! store error message
-        InfoBox aInfoBox( 0, String(rError.Message) );
+        InfoBox aInfoBox( 0, OUString(rError.Message) );
         aInfoBox.Execute();
     }
     catch ( uno::Exception& )
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index e4ad435..33445d5 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1320,14 +1320,14 @@ void ScDPResultMember::ProcessData( const vector< SCROW >& aChildMembers, const
  * Parse subtotal string and replace all occurrences of '?' with the caption
  * string.  Do ensure that escaped characters are not translated.
  */
-static String lcl_parseSubtotalName(const String& rSubStr, const String& rCaption)
+static OUString lcl_parseSubtotalName(const OUString& rSubStr, const OUString& rCaption)
 {
-    String aNewStr;
-    xub_StrLen n = rSubStr.Len();
+    OUStringBuffer aNewStr;
+    xub_StrLen n = rSubStr.getLength();
     bool bEscaped = false;
     for (xub_StrLen i = 0; i < n; ++i)
     {
-        sal_Unicode c = rSubStr.GetChar(i);
+        sal_Unicode c = rSubStr[i];
         if (!bEscaped && c == sal_Unicode('\\'))
         {
             bEscaped = true;
@@ -1335,12 +1335,12 @@ static String lcl_parseSubtotalName(const String& rSubStr, const String& rCaptio
         }
 
         if (!bEscaped && c == sal_Unicode('?'))
-            aNewStr.Append(rCaption);
+            aNewStr.append(rCaption);
         else
-            aNewStr.Append(c);
+            aNewStr.append(c);
         bEscaped = false;
     }
-    return aNewStr;
+    return aNewStr.makeStringAndClear();
 }
 
 void ScDPResultMember::FillMemberResults(
@@ -2346,7 +2346,7 @@ void ScDPDataMember::UpdateRunningTotals(
                         const ScDPRunningTotalState::IndexArray& rRowVisible = rRunning.GetRowVisible();
                         const ScDPRunningTotalState::IndexArray& rRowSorted = rRunning.GetRowSorted();
 
-                        String aRefFieldName = aReferenceValue.ReferenceField;
+                        OUString aRefFieldName = aReferenceValue.ReferenceField;
 
                         //! aLocalSubState?
                         sal_uInt16 nRefOrient = pResultData->GetMeasureRefOrient( nMemberMeasure );
@@ -3963,7 +3963,7 @@ void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criter
     for (DimMemberType::const_iterator itr = maDimensions.begin(), itrEnd = maDimensions.end();
           itr != itrEnd; ++itr)
     {
-        const String& rDimName = itr->first;
+        const OUString& rDimName = itr->first;
         ScDPFilteredCache::Criterion aCri;
         FieldNameMapType::const_iterator itrField = aFieldNames.find(rDimName);
         if (itrField == aFieldNames.end())
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index aa193ef..7f95a07 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1499,7 +1499,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
                     uno::Reference< chart2::XChartDocument > xNewChart( ScChartHelper::GetChartFromSdrObject( pNewObject ) );
                     if( xNewChart.is() && !xNewChart->hasInternalDataProvider() )
                     {
-                        String aChartName = ((SdrOle2Obj*)pNewObject)->GetPersistName();
+                        OUString aChartName = ((SdrOle2Obj*)pNewObject)->GetPersistName();
                         ::std::vector< ScRangeList > aRangesVector;
                         pDoc->GetChartRanges( aChartName, aRangesVector, pDoc );
                         if( !aRangesVector.empty() )
@@ -1652,7 +1652,7 @@ Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, boo
 
 OUString ScDrawLayer::GetVisibleName( SdrObject* pObj )
 {
-    String aName = pObj->GetName();
+    OUString aName = pObj->GetName();
     if ( pObj->GetObjIdentifier() == OBJ_OLE2 )
     {
         //  For OLE, the user defined name (GetName) is used
@@ -1660,13 +1660,13 @@ OUString ScDrawLayer::GetVisibleName( SdrObject* pObj )
         //  otherwise the persist name is used so every object appears
         //  in the Navigator at all.
 
-        if ( !aName.Len() )
+        if ( aName.isEmpty() )
             aName = static_cast<SdrOle2Obj*>(pObj)->GetPersistName();
     }
     return aName;
 }
 
-inline sal_Bool IsNamedObject( SdrObject* pObj, const String& rName )
+inline sal_Bool IsNamedObject( SdrObject* pObj, const OUString& rName )
 {
     //  sal_True if rName is the object's Name or PersistName
     //  (used to find a named object)
@@ -1710,7 +1710,7 @@ OUString ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
     aBase += " ";
 
     bool bThere = true;
-    String aGraphicName;
+    OUString aGraphicName;
     SCTAB nDummy;
     long nId = pnCounter ? *pnCounter : 0;
     while (bThere)
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 6ccd42d..7b2b5b3 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -104,7 +104,7 @@ IntlWrapper*    ScGlobal::pScIntlWrapper = NULL;
 sal_Unicode     ScGlobal::cListDelimiter = ',';
 String*         ScGlobal::pEmptyString = NULL;
 OUString*       ScGlobal::pEmptyOUString = NULL;
-String*         ScGlobal::pStrClipDocName = NULL;
+OUString*       ScGlobal::pStrClipDocName = NULL;
 
 SvxBrushItem*   ScGlobal::pEmptyBrushItem = NULL;
 SvxBrushItem*   ScGlobal::pButtonBrushItem = NULL;
@@ -388,9 +388,9 @@ const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
     return *ppRscString[ nIndex ];
 }
 
-String ScGlobal::GetErrorString(sal_uInt16 nErrNumber)
+OUString ScGlobal::GetErrorString(sal_uInt16 nErrNumber)
 {
-    String sResStr;
+    OUString sResStr;
     switch (nErrNumber)
     {
         case NOTAVAILABLE          : nErrNumber = STR_NV_STR; break;
@@ -413,7 +413,7 @@ String ScGlobal::GetErrorString(sal_uInt16 nErrNumber)
     return sResStr;
 }
 
-String ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber)
+OUString ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber)
 {
     switch (nErrNumber)
     {
@@ -504,7 +504,7 @@ String ScGlobal::GetLongErrorString(sal_uInt16 nErrNumber)
             nErrNumber = STR_ERROR_STR;
         break;
     }
-    String aRes( GetRscString( nErrNumber ) );
+    OUString aRes( GetRscString( nErrNumber ) );
     return aRes;
 }
 
@@ -567,8 +567,8 @@ void ScGlobal::Init()
 
     InitAddIns();
 
-    pStrClipDocName = new String( ScResId( SCSTR_NONAME ) );
-    *pStrClipDocName += '1';
+    pStrClipDocName = new OUString( ScResId( SCSTR_NONAME ) );
+    *pStrClipDocName += "1";
 
     //  ScDocumentPool::InitVersionMaps() ist schon vorher gerufen worden
 }
@@ -592,12 +592,12 @@ void ScGlobal::UpdatePPT( OutputDevice* pDev )
     }
 }
 
-const String& ScGlobal::GetClipDocName()
+const OUString& ScGlobal::GetClipDocName()
 {
     return *pStrClipDocName;
 }
 
-void ScGlobal::SetClipDocName( const String& rNew )
+void ScGlobal::SetClipDocName( const OUString& rNew )
 {
     *pStrClipDocName = rNew;
 }
@@ -721,7 +721,7 @@ CharSet ScGlobal::GetCharsetValue( const OUString& rCharSet )
 
 //------------------------------------------------------------------------
 
-String ScGlobal::GetCharsetString( CharSet eVal )
+OUString ScGlobal::GetCharsetString( CharSet eVal )
 {
     const sal_Char* pChar;
     switch ( eVal )
@@ -816,9 +816,9 @@ OUString ScGlobal::addToken(const OUString& rTokenList, const OUString& rToken,
     return aBuf.makeStringAndClear();
 }
 
-bool ScGlobal::IsQuoted( const String& rString, sal_Unicode cQuote )
+bool ScGlobal::IsQuoted( const OUString& rString, sal_Unicode cQuote )
 {
-    return (rString.Len() >= 2) && (rString.GetChar( 0 ) == cQuote) && (rString.GetChar( rString.Len() - 1 ) == cQuote);
+    return (rString.getLength() >= 2) && (rString[0] == cQuote) && (rString[ rString.getLength() - 1 ] == cQuote);
 }
 
 void ScGlobal::AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmbedded )
@@ -927,7 +927,7 @@ sal_Bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
     return false;
 }
 
-void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
+void ScGlobal::OpenURL( const OUString& rURL, const OUString& rTarget )
 {
     //  OpenURL wird immer ueber irgendwelche Umwege durch Mausklicks im GridWindow
     //  aufgerufen, darum stimmen pScActiveViewShell und nScClickMouseModifier.
@@ -951,7 +951,7 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget )
     SfxStringItem aTarget( SID_TARGETNAME, rTarget );
     aTarget.SetValue(OUString("_blank"));
     SfxViewFrame* pFrame = NULL;
-    String aReferName;
+    OUString aReferName;
     if ( pScActiveViewShell )
     {
         pFrame = pScActiveViewShell->GetViewFrame();
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index bf8b8c9..54b7c87 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -341,10 +341,10 @@ sal_Bool ScTabOpParam::operator==( const ScTabOpParam& r ) const
                  && (nMode           == r.nMode) );
 }
 
-String ScGlobal::GetAbsDocName( const String& rFileName,
+OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
                                 SfxObjectShell* pShell )
 {
-    String aAbsName;
+    OUString aAbsName;
     if ( !pShell->HasName() )
     {   // maybe relative to document path working directory
         INetURLObject aObj;
@@ -374,20 +374,19 @@ String ScGlobal::GetAbsDocName( const String& rFileName,
     return aAbsName;
 }
 
-String ScGlobal::GetDocTabName( const String& rFileName,
-                                const String& rTabName )
+OUString ScGlobal::GetDocTabName( const OUString& rFileName,
+                                const OUString& rTabName )
 {
-    String aDocTab(OUString('\''));
+    OUString  aDocTab('\'');
     aDocTab += rFileName;
-    xub_StrLen nPos = 1;
-    while( (nPos = aDocTab.Search( '\'', nPos ))
-            != STRING_NOTFOUND )
+    sal_Int32 nPos = 1;
+    while( (nPos = aDocTab.indexOf( '\'', nPos )) != -1 )
     {   // escape Quotes
-        aDocTab.Insert( '\\', nPos );
+        aDocTab = aDocTab.replaceAt( nPos, 0, "\\" );
         nPos += 2;
     }
-    aDocTab += '\'';
-    aDocTab += SC_COMPILER_FILE_TAB_SEP;
+    aDocTab += "'";
+    aDocTab += OUString(SC_COMPILER_FILE_TAB_SEP);
     aDocTab += rTabName;    // "'Doc'#Tab"
     return aDocTab;
 }
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 47a0c31..15e484a 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -119,7 +119,7 @@ void ScGlobal::InitAddIns()
 }
 
 
-String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
+OUString ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
 {
     try
     {
@@ -132,13 +132,13 @@ String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
         if ( aSuffixes.getLength() > 0 )
             return aSuffixes[0];
         else
-            return String();
+            return OUString();
     }
     catch ( Exception& )
     {
         OSL_FAIL( "GetOrdinalSuffix: exception caught during init" );
     }
-    return String();
+    return OUString();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 3e18fa4..a6dbe6e 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -936,13 +936,13 @@ static SfxStyleSheetBase* lcl_CopyStyleToPool
 
     //--------------------------------------------------------
 
-    const String         aStrSrcStyle = pSrcStyle->GetName();
+    const OUString       aStrSrcStyle = pSrcStyle->GetName();
     const SfxStyleFamily eFamily      = pSrcStyle->GetFamily();
     SfxStyleSheetBase*   pDestStyle   = pDestPool->Find( aStrSrcStyle, eFamily );
 
     if ( !pDestStyle )
     {
-        const String  aStrParent = pSrcStyle->GetParent();
+        const OUString   aStrParent = pSrcStyle->GetParent();
         const SfxItemSet& rSrcSet = pSrcStyle->GetItemSet();
 
         pDestStyle = &pDestPool->Make( aStrSrcStyle, eFamily, SFXSTYLEBIT_USERDEF );
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 3d4cb2c..04b923a 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -242,7 +242,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     Color           aColGrey    ( COL_LIGHTGRAY );
     OUString        aStr;
     sal_Int32       nStrLen;
-    String          aHelpFile;//XXX JN welcher Text???
+    OUString        aHelpFile;//XXX JN welcher Text???
     SfxItemSet*     pSet            = NULL;
     SfxItemSet*     pHFSet          = NULL;
     SvxSetItem*     pHFSetItem      = NULL;
@@ -257,7 +257,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     SvxBoxItem      aBoxItem        ( ATTR_BORDER );
     SvxBoxInfoItem  aBoxInfoItem    ( ATTR_BORDER_INNER );
 
-    String aStrStandard = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
+    OUString  aStrStandard = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
 
     //==========================================================
     // Zellformatvorlagen:
@@ -492,7 +492,7 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const OUString& rName, SfxStyleFami
         SfxStyleSheetBase* pStyle = aStyles[n].get();
         if ( pStyle->GetFamily() == eFam )
         {
-            String aUpName = ScGlobal::pCharClass->uppercase(pStyle->GetName());
+            OUString aUpName = ScGlobal::pCharClass->uppercase(pStyle->GetName());
             if (aUpName == aUpSearch)
                 return (ScStyleSheet*)pStyle;
         }
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9ec6977..abb8b9e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2096,8 +2096,8 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
                                     if(pEntry->GetType() != condformat::CONDITION)
                                         continue;
 
-                                    String aStyleName = static_cast<const ScCondFormatEntry*>(pEntry)->GetStyle();
-                                    if (aStyleName.Len())
+                                    OUString  aStyleName = static_cast<const ScCondFormatEntry*>(pEntry)->GetStyle();
+                                    if (!aStyleName.isEmpty())
                                     {
                                         SfxStyleSheetBase* pStyleSheet =
                                             pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index d5649ee..1b4e25a 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -138,7 +138,7 @@ bool SplitString( const OUString &sWhole,
     @return Returnes 1 if sInput1 is greater, 0 if sInput1 == sInput2, and -1 if
     sInput2 is greater.
 */
-short Compare( const String &sInput1, const String &sInput2,
+short Compare( const OUString &sInput1, const OUString &sInput2,
                const bool bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
 {
     OUString sStr1( sInput1 ), sStr2( sInput2 ), sPre1, sSuf1, sPre2, sSuf2;
@@ -940,13 +940,13 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
     bool bTestPrevSub = ( nLevelCount > 1 );
 
     OUString  aSubString;
-    String  aOutString;
+    OUString  aOutString;
 
     bool bIgnoreCase = !rParam.bCaseSens;
 
-    String *pCompString[MAXSUBTOTAL];               // Pointer wegen Compiler-Problemen
+    OUString *pCompString[MAXSUBTOTAL];               // Pointer wegen Compiler-Problemen
     for (i=0; i<MAXSUBTOTAL; i++)
-        pCompString[i] = new String;
+        pCompString[i] = new OUString;
 
                                 //! sortieren?
 
@@ -1058,9 +1058,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
                         else
                         {               // " Ergebnis"
                             aOutString = aSubString;
-                            if (!aOutString.Len())
+                            if (aOutString.isEmpty())
                                 aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
-                            aOutString += ' ';
+                            aOutString += " ";
                             sal_uInt16 nStrId = STR_TABLE_ERGEBNIS;
                             if ( nResCount == 1 )
                                 switch ( eResFunc[0] )
@@ -1503,24 +1503,24 @@ public:
                 else
                 {
                     const OUString& rQueryStr = rItem.maString;
-                    String aCell( mpTransliteration->transliterate(
+                    OUString aCell( mpTransliteration->transliterate(
                         aCellStr, ScGlobal::eLnge, 0, aCellStr.getLength(),
                         NULL ) );
-                    String aQuer( mpTransliteration->transliterate(
+                    OUString aQuer( mpTransliteration->transliterate(
                         rQueryStr, ScGlobal::eLnge, 0, rQueryStr.getLength(),
                         NULL ) );
                     xub_StrLen nIndex = (rEntry.eOp == SC_ENDS_WITH
-                        || rEntry.eOp == SC_DOES_NOT_END_WITH)? (aCell.Len()-aQuer.Len()):0;
-                    xub_StrLen nStrPos = aCell.Search( aQuer, nIndex );
+                        || rEntry.eOp == SC_DOES_NOT_END_WITH) ? (aCell.getLength()-aQuer.getLength()) : 0;
+                    sal_Int32 nStrPos = aCell.indexOf( aQuer, nIndex );
                     switch (rEntry.eOp)
                     {
                     case SC_EQUAL:
                     case SC_CONTAINS:
-                        bOk = ( nStrPos != STRING_NOTFOUND );
+                        bOk = ( nStrPos != -1 );
                         break;
                     case SC_NOT_EQUAL:
                     case SC_DOES_NOT_CONTAIN:
-                        bOk = ( nStrPos == STRING_NOTFOUND );
+                        bOk = ( nStrPos == -1 );
                         break;
                     case SC_BEGINS_WITH:
                         bOk = ( nStrPos == 0 );
@@ -1529,10 +1529,10 @@ public:
                         bOk = ( nStrPos != 0 );
                         break;
                     case SC_ENDS_WITH:
-                        bOk = ( nStrPos + aQuer.Len() == aCell.Len() );
+                        bOk = ( nStrPos + aQuer.getLength() == aCell.getLength() );
                         break;
                     case SC_DOES_NOT_END_WITH:
-                        bOk = ( nStrPos + aQuer.Len() != aCell.Len() );
+                        bOk = ( nStrPos + aQuer.getLength() != aCell.getLength() );
                         break;
                     default:
                         {
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 0e5d7cd..c9150b2 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1650,7 +1650,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
                             else
                             {
                                 nStringValue = (sal_Int32)nVal;
-                                String aStr;
+                                OUString aStr;
                                 if ( nHeadNoneTail < 0 )
                                 {
                                     setSuffixCell(
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 2270888..e1a650d 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -968,7 +968,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
                     rMatchedRanges.Join(ScRange(nCol, nRow, nTab, nCol, nLastRow, nTab));
                     if (bReplace)
                     {
-                        const String& rNewStr = rSearchItem.GetReplaceString();
+                        const OUString& rNewStr = rSearchItem.GetReplaceString();
                         for (SCROW i = nRow; i <= nLastRow; ++i)
                         {
                             aCol[nCol].SetRawString(i, rNewStr);
@@ -982,7 +982,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
                                 pUndoDoc->SetString(ScAddress(nCol, i, nTab), EMPTY_OUSTRING);
                             }
                         }
-                        rUndoStr = String();
+                        rUndoStr = OUString();
                     }
                 }
 
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 2f3d4a3..bce8aca 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -94,7 +94,7 @@ ScPassHashProtectable::~ScPassHashProtectable()
 class ScTableProtectionImpl
 {
 public:
-    static Sequence<sal_Int8> hashPassword(const String& aPassText, ScPasswordHash eHash = PASSHASH_SHA1);
+    static Sequence<sal_Int8> hashPassword(const OUString& aPassText, ScPasswordHash eHash = PASSHASH_SHA1);
     static Sequence<sal_Int8> hashPassword(const Sequence<sal_Int8>& rPassHash, ScPasswordHash eHash = PASSHASH_SHA1);
 
     explicit ScTableProtectionImpl(SCSIZE nOptSize);
@@ -106,19 +106,19 @@ public:
 
     bool isPasswordEmpty() const;
     bool hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const;
-    void setPassword(const String& aPassText);
+    void setPassword(const OUString& aPassText);
     ::com::sun::star::uno::Sequence<sal_Int8> getPasswordHash(
         ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const;
     void setPasswordHash(
         const ::com::sun::star::uno::Sequence<sal_Int8>& aPassword,
         ScPasswordHash eHash = PASSHASH_SHA1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED);
-    bool verifyPassword(const String& aPassText) const;
+    bool verifyPassword(const OUString& aPassText) const;
 
     bool isOptionEnabled(SCSIZE nOptId) const;
     void setOption(SCSIZE nOptId, bool bEnabled);
 
 private:
-    String maPassText;
+    OUString maPassText;
     ::com::sun::star::uno::Sequence<sal_Int8>   maPassHash;
     ::std::vector<bool> maOptions;
     bool mbEmptyPass;
@@ -127,7 +127,7 @@ private:
     ScPasswordHash meHash2;
 };
 
-Sequence<sal_Int8> ScTableProtectionImpl::hashPassword(const String& aPassText, ScPasswordHash eHash)
+Sequence<sal_Int8> ScTableProtectionImpl::hashPassword(const OUString& aPassText, ScPasswordHash eHash)
 {
     Sequence<sal_Int8> aHash;
     switch (eHash)
@@ -197,7 +197,7 @@ bool ScTableProtectionImpl::isProtectedWithPass() const
     if (!mbProtected)
         return false;
 
-    return maPassText.Len() || maPassHash.getLength();
+    return !maPassText.isEmpty() || maPassHash.getLength();
 }
 
 void ScTableProtectionImpl::setProtected(bool bProtected)
@@ -207,7 +207,7 @@ void ScTableProtectionImpl::setProtected(bool bProtected)
     // don't erase the password data here.
 }
 
-void ScTableProtectionImpl::setPassword(const String& aPassText)
+void ScTableProtectionImpl::setPassword(const OUString& aPassText)
 {
     // We can't hash it here because we don't know whether this document will
     // get saved to Excel or ODF, depending on which we will need to use a
@@ -215,7 +215,7 @@ void ScTableProtectionImpl::setPassword(const String& aPassText)
     // hash algorithms that we support, and store them all.
 
     maPassText = aPassText;
-    mbEmptyPass = aPassText.Len() == 0;
+    mbEmptyPass = aPassText.isEmpty();
     if (mbEmptyPass)
     {
         maPassHash = Sequence<sal_Int8>();
@@ -232,7 +232,7 @@ bool ScTableProtectionImpl::hasPasswordHash(ScPasswordHash eHash, ScPasswordHash
     if (mbEmptyPass)
         return true;
 
-    if (maPassText.Len())
+    if (!maPassText.isEmpty())
         return true;
 
     if (meHash1 == eHash)
@@ -256,7 +256,7 @@ Sequence<sal_Int8> ScTableProtectionImpl::getPasswordHash(
         // Flaged as empty.
         return aPassHash;
 
-    if (maPassText.Len())
+    if (!maPassText.isEmpty())
     {
         // Cleartext password exists.  Hash it.
         aPassHash = hashPassword(maPassText, eHash);
@@ -303,7 +303,7 @@ void ScTableProtectionImpl::setPasswordHash(
 #endif
 }
 
-bool ScTableProtectionImpl::verifyPassword(const String& aPassText) const
+bool ScTableProtectionImpl::verifyPassword(const OUString& aPassText) const
 {
 #if DEBUG_TAB_PROTECTION
     fprintf(stdout, "ScTableProtectionImpl::verifyPassword: input = '%s'\n",
@@ -311,11 +311,11 @@ bool ScTableProtectionImpl::verifyPassword(const String& aPassText) const
 #endif
 
     if (mbEmptyPass)
-        return aPassText.Len() == 0;
+        return aPassText.isEmpty();
 
-    if (maPassText.Len())
+    if (!maPassText.isEmpty())
         // Clear text password exists, and this one takes precedence.
-        return aPassText.Equals(maPassText);
+        return aPassText == maPassText;
 
     Sequence<sal_Int8> aHash = hashPassword(aPassText, meHash1);
     aHash = hashPassword(aHash, meHash2);
commit 43a3611347c1f49cf6053bf7e8904d56254d8761
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Oct 7 17:49:38 2013 +0200

    convert sc/source/core/tool/*.cxx from String to OUString
    
    Change-Id: Iaefd1108c4bbb953b711b3e87ab24c733035274c

diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx
index b687e0e..8cddc2b 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -63,7 +63,6 @@ typedef ::boost::unordered_map< OUString, ::std::list<ScCellKeyword>, OUStringHa
 class ScCellKeywordTranslator
 {
 public:
-    static void transKeyword(String& rName, const ::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
     static void transKeyword(OUString& rName, const ::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
     ~ScCellKeywordTranslator();
 
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index dc0b231..e04762a 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -819,7 +819,7 @@ ScAutoFormat::ScAutoFormat() :
 {
     //  create default autoformat
     ScAutoFormatData* pData = new ScAutoFormatData;
-    String aName(ScGlobal::GetRscString(STR_STYLENAME_STANDARD));
+    OUString aName(ScGlobal::GetRscString(STR_STYLENAME_STANDARD));
     pData->SetName(aName);
 
     //  default font, default height
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 13f011c..7e3d5af9 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -229,8 +229,8 @@ bool InitExternalFunc(const OUString& rModuleName)
                     if ( fpAdvice && eAsyncType != NONE )
                         (*((Advice)fpAdvice))( i, pfCallBack );
                 }
-                String aInternalName( cInternalName, osl_getThreadTextEncoding() );
-                String aFuncName( cFuncName, osl_getThreadTextEncoding() );
+                OUString aInternalName( cInternalName, strlen(cInternalName), osl_getThreadTextEncoding() );
+                OUString aFuncName( cFuncName, strlen(cFuncName), osl_getThreadTextEncoding() );
                 pFuncData = new FuncData( pModuleData,
                                           aInternalName,
                                           aFuncName,
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index e7f8ba0..af13cbe 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -77,7 +77,7 @@ ScCellKeyword::ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const Locale
 
 ::std::auto_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance(NULL);
 
-static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap,
+static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap,
                             OpCode eOpCode = ocNone, const Locale* pLocale = NULL)
 {
     ScCellKeywordHashMap::const_iterator itrEnd = aMap.end();
@@ -159,24 +159,17 @@ static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap,
     rName = OUString::createFromAscii(aBestMatchName);
 }
 
-void ScCellKeywordTranslator::transKeyword(String& rName, const Locale* pLocale, OpCode eOpCode)
+void ScCellKeywordTranslator::transKeyword(OUString& rName, const Locale* pLocale, OpCode eOpCode)
 {
     if ( !spInstance.get() )
         spInstance.reset( new ScCellKeywordTranslator );
 
     LanguageType eLang = pLocale ? LanguageTag(*pLocale).makeFallback().getLanguageType() : LANGUAGE_SYSTEM;
     Sequence<sal_Int32> aOffsets;
-    rName = spInstance->maTransWrapper.transliterate(rName, eLang, 0, rName.Len(), &aOffsets);
+    rName = spInstance->maTransWrapper.transliterate(rName, eLang, 0, rName.getLength(), &aOffsets);
     lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale);
 }
 
-void ScCellKeywordTranslator::transKeyword(OUString& rName, const Locale* pLocale, OpCode eOpCode)
-{
-    String aName = rName;
-    transKeyword(aName, pLocale, eOpCode);
-    rName = aName;
-}
-
 ScCellKeywordTranslator::ScCellKeywordTranslator() :
     maTransWrapper( ::comphelper::getProcessComponentContext(),
                     i18n::TransliterationModules_LOWERCASE_UPPERCASE )
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index cb2d152..2f8c9f7 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -57,7 +57,7 @@ sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, bool bAl
         {
             if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) )
             {
-                String aName = ((SdrOle2Obj*)pObject)->GetPersistName();
+                OUString aName = ((SdrOle2Obj*)pObject)->GetPersistName();
                 bool bHit = true;
                 if ( !bAllCharts )
                 {
@@ -135,7 +135,7 @@ void ScChartHelper::AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc,
         {
             if( pObject->GetObjIdentifier() == OBJ_OLE2 && ((SdrOle2Obj*)pObject)->IsChart() )
             {
-                String aChartName = ((SdrOle2Obj*)pObject)->GetPersistName();
+                OUString aChartName = ((SdrOle2Obj*)pObject)->GetPersistName();
 
                 Reference< chart2::XChartDocument > xChartDoc( pDestDoc->GetChartByName( aChartName ) );
                 Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY );
@@ -175,7 +175,7 @@ void ScChartHelper::UpdateChartsOnDestinationPage( ScDocument* pDestDoc, const S
         {
             if( pObject->GetObjIdentifier() == OBJ_OLE2 && ((SdrOle2Obj*)pObject)->IsChart() )
             {
-                String aChartName = ((SdrOle2Obj*)pObject)->GetPersistName();
+                OUString aChartName = ((SdrOle2Obj*)pObject)->GetPersistName();
                 Reference< chart2::XChartDocument > xChartDoc( pDestDoc->GetChartByName( aChartName ) );
                 Reference< util::XModifiable > xModif(xChartDoc, uno::UNO_QUERY_THROW);
                 xModif->setModified( sal_True);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 8a1e011..ac8b648 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -408,20 +408,20 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
     }
 }
 
-static bool lcl_isValidQuotedText( const String& rFormula, xub_StrLen nSrcPos, ParseResult& rRes )
+static bool lcl_isValidQuotedText( const OUString& rFormula, xub_StrLen nSrcPos, ParseResult& rRes )
 {
     // Tokens that start at ' can have anything in them until a final '
     // but '' marks an escaped '
     // We've earlier guaranteed that a string containing '' will be
     // surrounded by '
-    if (rFormula.GetChar(nSrcPos) == '\'')
+    if (rFormula[nSrcPos] == '\'')
     {
         xub_StrLen nPos = nSrcPos+1;
-        while (nPos < rFormula.Len())
+        while (nPos < rFormula.getLength())
         {
-            if (rFormula.GetChar(nPos) == '\'')
+            if (rFormula[nPos] == '\'')
             {
-                if ( (nPos+1 == rFormula.Len()) || (rFormula.GetChar(nPos+1) != '\'') )
+                if ( (nPos+1 == rFormula.getLength()) || (rFormula[nPos+1] != '\'') )
                 {
                     rRes.TokenType = KParseType::SINGLE_QUOTE_NAME;
                     rRes.EndPos = nPos+1;
@@ -687,7 +687,7 @@ struct Convention_A1 : public ScCompiler::Convention
             KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
         static const sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
         // '?' allowed in range names because of Xcl :-/
-        static const String aAddAllowed(OUString("?#"));
+        static const OUString aAddAllowed("?#");
         return pCharClass->parseAnyToken( rFormula,
                 nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
     }
@@ -718,7 +718,7 @@ struct ConventionOOO_A1 : public Convention_A1
 {
     ConventionOOO_A1() : Convention_A1 (FormulaGrammar::CONV_OOO) { }
     ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1 (eConv) { }
-    static String MakeTabStr( const ScCompiler& rComp, SCTAB nTab, String& aDoc )
+    static OUString MakeTabStr( const ScCompiler& rComp, SCTAB nTab, OUString& aDoc )
     {
         OUString aString;
         OUString aTmp;
@@ -737,7 +737,7 @@ struct ConventionOOO_A1 : public Convention_A1
                                               INetURLObject::DECODE_UNAMBIGUOUS );
             }
             else
-                aDoc.Erase();
+                aDoc = "";
             ScCompiler::CheckTabQuotes( aString, FormulaGrammar::CONV_OOO );
         }
         aString += ".";
@@ -760,8 +760,8 @@ struct ConventionOOO_A1 : public Convention_A1
             }
             else
             {
-                String aDoc;
-                String aRefStr(MakeTabStr(rComp, rAbsRef.Tab(), aDoc));
+                OUString aDoc;
+                OUString aRefStr(MakeTabStr(rComp, rAbsRef.Tab(), aDoc));
                 rBuffer.append(aDoc);
                 if (!rRef.IsTabRel())
                     rBuffer.append(sal_Unicode('$'));
@@ -855,7 +855,7 @@ struct ConventionOOO_A1 : public Convention_A1
 
     bool makeExternalSingleRefStr(
         OUStringBuffer& rBuffer, sal_uInt16 nFileId,
-        const String& rTabName, const ScSingleRefData& rRef, const ScAddress& rPos,
+        const OUString& rTabName, const ScSingleRefData& rRef, const ScAddress& rPos,
         ScExternalRefManager* pRefMgr, bool bDisplayTabName, bool bEncodeUrl ) const
     {
         ScAddress aAbsRef = rRef.toAbs(rPos);
@@ -1128,12 +1128,12 @@ struct ConventionXL
         return lcl_parseExternalName( rSymbol, rFile, rName, sal_Unicode('!'), pDoc, pExternalLinks);
     }
 
-    static String makeExternalNameStr( const String& rFile, const String& rName )
+    static OUString makeExternalNameStr( const OUString& rFile, const OUString& rName )
     {
         return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('!'), false);
     }
 
-    static void makeExternalDocStr( OUStringBuffer& rBuffer, const String& rFullName, bool bEncodeUrl )
+    static void makeExternalDocStr( OUStringBuffer& rBuffer, const OUString& rFullName, bool bEncodeUrl )
     {
         // Format that is easier to deal with inside OOo, because we use file
         // URL, and all characetrs are allowed.  Check if it makes sense to do
@@ -2759,7 +2759,7 @@ bool ScCompiler::IsReference( const OUString& rName )
                 // and would produce wrong formulas if the conditions here are met.
                 // If you can live with these restrictions you may remove the
                 // check and return an unconditional FALSE.
-                String aTabName( rName.copy( 0, nPos ) );
+                OUString aTabName( rName.copy( 0, nPos ) );
                 SCTAB nTab;
                 if ( !pDoc->GetTable( aTabName, nTab ) )
                     return false;
@@ -3284,7 +3284,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
         else
         {
             OUString aSymbol( aCorrectedSymbol );
-            String aDoc;
+            OUString aDoc;
             sal_Int32 nPosition;
             if ( aSymbol[0] == '\''
               && ((nPosition = aSymbol.indexOf( "'#" )) != -1) )
@@ -3298,9 +3298,9 @@ void ScCompiler::AutoCorrectParsedSymbol()
             {   // duplicated or too many ':'? B:2::C10 => B2:C10
                 bColons = true;
                 sal_Int32 nIndex = 0;
-                String aTmp1( aSymbol.getToken( 0, ':', nIndex ) );
-                xub_StrLen nLen1 = aTmp1.Len();
-                String aSym, aTmp2;
+                OUString aTmp1( aSymbol.getToken( 0, ':', nIndex ) );
+                xub_StrLen nLen1 = aTmp1.getLength();
+                OUString aSym, aTmp2;
                 bool bLastAlp, bNextNum;
                 bLastAlp = bNextNum = true;
                 xub_StrLen nStrip = 0;
@@ -3308,7 +3308,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
                 for ( xub_StrLen j=1; j<nCount; j++ )
                 {
                     aTmp2 = aSymbol.getToken( 0, ':', nIndex );
-                    xub_StrLen nLen2 = aTmp2.Len();
+                    xub_StrLen nLen2 = aTmp2.getLength();
                     if ( nLen1 || nLen2 )
                     {
                         if ( nLen1 )
@@ -3328,10 +3328,10 @@ void ScCompiler::AutoCorrectParsedSymbol()
                             }
                             else
                             {
-                                xub_StrLen nSymLen = aSym.Len();
+                                xub_StrLen nSymLen = aSym.getLength();
                                 if ( nSymLen
-                                  && (aSym.GetChar( nSymLen - 1 ) != ':') )
-                                    aSym += ':';
+                                  && (aSym[ nSymLen - 1 ] != ':') )
+                                    aSym += ":";
                                 nStrip = 0;
                             }
                             bLastAlp = !bNextNum;
@@ -3383,11 +3383,11 @@ void ScCompiler::AutoCorrectParsedSymbol()
                         aTab[j] = aRef[j].copy( 0, nDotPos + 1 );  // with '.'
                         aRef[j] = aRef[j].copy( nDotPos + 1 );
                     }
-                    String aOld( aRef[j] );
-                    String aStr2;
+                    OUString aOld( aRef[j] );
+                    OUString aStr2;
                     const sal_Unicode* p = aRef[j].getStr();
                     while ( *p && CharClass::isAsciiNumeric( OUString(*p) ) )
-                        aStr2 += *p++;
+                        aStr2 += OUString(*p++);
                     aRef[j] = OUString( p );
                     aRef[j] += aStr2;
                     if ( bColons || aRef[j] != aOld )
@@ -3985,7 +3985,7 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
                 return true;
             }
 
-            const String& rName = _aToken.GetString();
+            const OUString& rName = _aToken.GetString();
             ScExternalRefCache::TokenArrayRef xNew = pRefMgr->getRangeNameTokens(
                 _aToken.GetIndex(), rName, &aPos);
 
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index bf4329c..87d5b1a 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -240,7 +240,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
 {
     ++nDataCount;
 
-    String aTitle;
+    OUString aTitle;
 
     SCCOL nStartCol = nCol1;
     SCROW nStartRow = nRow1;
@@ -252,7 +252,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
         for (SCCOL nCol=nStartCol; nCol<=nCol2; nCol++)
         {
             aTitle = pSrcDoc->GetString(nCol, nRow1, nTab);
-            if (aTitle.Len())
+            if (!aTitle.isEmpty())
             {
                 bool bFound = false;
                 for (SCSIZE i=0; i<nColCount && !bFound; i++)
@@ -269,7 +269,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
         for (SCROW nRow=nStartRow; nRow<=nRow2; nRow++)
         {
             aTitle = pSrcDoc->GetString(nCol1, nRow, nTab);
-            if (aTitle.Len())
+            if (!aTitle.isEmpty())
             {
                 bool bFound = false;
                 for (SCSIZE i=0; i<nRowCount && !bFound; i++)
@@ -495,7 +495,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
 
     if ( bColByName && bRowByName )
     {
-        String aThisCorner = pSrcDoc->GetString(nCol1, nRow1, nTab);
+        OUString aThisCorner = pSrcDoc->GetString(nCol1, nRow1, nTab);
         if (bCornerUsed)
         {
             if (aCornerText != aThisCorner)
@@ -514,7 +514,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
     SCROW nStartRow = nRow1;
     if (bColByName) ++nStartRow;
     if (bRowByName) ++nStartCol;
-    String aTitle;
+    OUString aTitle;
     SCCOL*  pDestCols = NULL;
     SCROW*  pDestRows = NULL;
     if (bColByName)
@@ -524,7 +524,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
         {
             aTitle = pSrcDoc->GetString(nCol, nRow1, nTab);
             SCCOL nPos = SC_CONS_NOTFOUND;
-            if (aTitle.Len())
+            if (!aTitle.isEmpty())
             {
                 bool bFound = false;
                 for (SCSIZE i=0; i<nColCount && !bFound; i++)
@@ -545,7 +545,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
         {
             aTitle = pSrcDoc->GetString(nCol1, nRow, nTab);
             SCROW nPos = SC_CONS_NOTFOUND;
-            if (aTitle.Len())
+            if (!aTitle.isEmpty())
             {
                 bool bFound = false;
                 for (SCSIZE i=0; i<nRowCount && !bFound; i++)
@@ -692,7 +692,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
     if ( ppRefs && ppUsed )                             // Referenzen einfuegen
     {
                                 //! unterscheiden, ob nach Kategorien aufgeteilt
-        String aString;
+        OUString aString;
 
         ScSingleRefData aSRef;      // Daten fuer Referenz-Formelzellen
         aSRef.InitFlags(); // This reference is absolute at all times.
@@ -777,7 +777,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
 
                 if (ppTitlePos && mpTitles && mpRowHeaders)
                 {
-                    String aDelim( " / " );
+                    OUString aDelim( " / " );
                     for (SCSIZE nPos=0; nPos<nDataCount; nPos++)
                     {
                         SCSIZE nTPos = ppTitlePos[nArrY][nPos];
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 96a9a25..e442601 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -136,14 +136,14 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
     if (nLen && aLinkStr[nLen-1] == '\n')
         aLinkStr = aLinkStr.copy(0, nLen-1);
 
-    String aLine;
+    OUString aLine;
     SCSIZE nCols = 1;       // Leerstring -> eine leere Zelle
     SCSIZE nRows = 1;
     if (!aLinkStr.isEmpty())
     {
         nRows = static_cast<SCSIZE>(comphelper::string::getTokenCount(aLinkStr, '\n'));
         aLine = aLinkStr.getToken( 0, '\n' );
-        if (aLine.Len())
+        if (!aLine.isEmpty())
             nCols = static_cast<SCSIZE>(comphelper::string::getTokenCount(aLine, '\t'));
     }
 
@@ -172,18 +172,18 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
         else if ( nMode == SC_DDE_ENGLISH )
             nStdFormat = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
 
-        String aEntry;
+        OUString aEntry;
         for (SCSIZE nR=0; nR<nRows; nR++)
         {
             aLine = aLinkStr.getToken( (sal_Int32) nR, '\n' );
             for (SCSIZE nC=0; nC<nCols; nC++)
             {
-                aEntry = aLine.GetToken( (xub_StrLen) nC, '\t' );
+                aEntry = aLine.getToken( (xub_StrLen) nC, '\t' );
                 sal_uInt32 nIndex = nStdFormat;
                 double fVal = double();
                 if ( nMode != SC_DDE_TEXT && pFormatter->IsNumberFormat( aEntry, nIndex, fVal ) )
                     pResult->PutDouble( fVal, nC, nR );
-                else if (aEntry.Len() == 0)
+                else if (aEntry.isEmpty())
                     // empty cell
                     pResult->PutEmpty(nC, nR);
                 else
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 198dba5..fa2c809 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -161,7 +161,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
     basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromEllipse(basegfx::B2DPoint(0.0, 0.0), 100.0, 100.0));
     aCircle.setClosed(true);
 
-    String aName = SC_LINEEND_NAME;
+    OUString aName = SC_LINEEND_NAME;
 
     aArrowSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) );
     aArrowSet.Put( XLineStartWidthItem( 200 ) );
@@ -184,7 +184,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
     aFromTabSet.Put( XLineEndWidthItem( 200 ) );
     aFromTabSet.Put( XLineEndCenterItem( false ) );
 
-    aCircleSet.Put( XLineColorItem( String(), Color( ScDetectiveFunc::GetErrorColor() ) ) );
+    aCircleSet.Put( XLineColorItem( OUString(), Color( ScDetectiveFunc::GetErrorColor() ) ) );
     aCircleSet.Put( XFillStyleItem( XFILL_NONE ) );
     sal_uInt16 nWidth = 55;     // 54 = 1 Pixel
     aCircleSet.Put( XLineWidthItem( nWidth ) );
@@ -199,14 +199,14 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
     aTriangle.append(basegfx::B2DPoint(20.0, 30.0));
     aTriangle.setClosed(true);
 
-    String aName = SC_LINEEND_NAME;
+    OUString aName = SC_LINEEND_NAME;
 
     aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) );
     aCaptionSet.Put( XLineStartWidthItem( 200 ) );
     aCaptionSet.Put( XLineStartCenterItem( false ) );
     aCaptionSet.Put( XFillStyleItem( XFILL_SOLID ) );
     Color aYellow( ScDetectiveFunc::GetCommentColor() );
-    aCaptionSet.Put( XFillColorItem( String(), aYellow ) );
+    aCaptionSet.Put( XFillColorItem( OUString(), aYellow ) );
 
     //  shadow
     //  SdrShadowItem has sal_False, instead the shadow is set for the rectangle
@@ -503,7 +503,7 @@ sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
         rAttrSet.Put( XLineWidthItem( 0 ) );                // einzelne Referenz
 
     ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() );
-    rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) );
+    rAttrSet.Put( XLineColorItem( OUString(), Color( nColorData ) ) );
 
     basegfx::B2DPolygon aTempPoly;
     aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y()));
@@ -568,7 +568,7 @@ sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
         rAttrSet.Put( XLineWidthItem( 0 ) );                // einzelne Referenz
 
     ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() );
-    rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) );
+    rAttrSet.Put( XLineColorItem( OUString(), Color( nColorData ) ) );
 
     basegfx::B2DPolygon aTempPoly;
     aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y()));
@@ -1439,7 +1439,7 @@ void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc )
                     {
                         ScCommentData aData( rDoc, pModel );
                         SfxItemSet aAttrColorSet = pObject->GetMergedItemSet();
-                        aAttrColorSet.Put( XFillColorItem( String(), GetCommentColor() ) );
+                        aAttrColorSet.Put( XFillColorItem( OUString(), GetCommentColor() ) );
                         aData.UpdateCaptionSet( aAttrColorSet );
                         pObject->SetMergedItemSetAndBroadcast( aData.GetCaptionSet() );
                         if( SdrCaptionObj* pCaption = dynamic_cast< SdrCaptionObj* >( pObject ) )
@@ -1521,7 +1521,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
                     if ( bArrow || bError )
                     {
                         ColorData nColorData = ( bError ? GetErrorColor() : GetArrowColor() );
-                        pObject->SetMergedItem( XLineColorItem( String(), Color( nColorData ) ) );
+                        pObject->SetMergedItem( XLineColorItem( OUString(), Color( nColorData ) ) );
 
                         // repaint only
                         pObject->ActionChanged();
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 86fb5d5..68f930d 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -173,7 +173,7 @@ bool lcl_createExcelQuery(
 
         SCSIZE nIndex = 0;
         SCROW nRow = 1;
-        String aCellStr;
+        OUString aCellStr;
         while (nRow < nRows)
         {
             nCol = 0;
@@ -181,7 +181,7 @@ bool lcl_createExcelQuery(
             {
                 aCellStr = pQueryRef->getString(nCol, nRow);
                 aCellStr = ScGlobal::pCharClass->uppercase( aCellStr );
-                if (aCellStr.Len() > 0)
+                if (!aCellStr.isEmpty())
                 {
                     if (nIndex < nNewEntries)
                     {
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 7afa142..27fdf89 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -726,10 +726,10 @@ void ScTabEditEngine::Init( const ScPatternAttr& rPattern )
 //      Zahlen aus \sw\source\core\doc\numbers.cxx
 //
 
-static String lcl_GetCharStr( sal_Int32 nNo )
+static OUString lcl_GetCharStr( sal_Int32 nNo )
 {
     OSL_ENSURE( nNo, "0 is an invalid number !!" );
-    String aStr;
+    OUString aStr;
 
     const sal_Int32 coDiff = 'Z' - 'A' +1;
     sal_Int32 nCalc;
@@ -738,7 +738,7 @@ static String lcl_GetCharStr( sal_Int32 nNo )
         nCalc = nNo % coDiff;
         if( !nCalc )
             nCalc = coDiff;
-        aStr.Insert( (sal_Unicode)('a' - 1 + nCalc ), 0 );
+        aStr = OUString( (sal_Unicode)('a' - 1 + nCalc ) ) + aStr;
         nNo = sal::static_int_cast<sal_Int32>( nNo - nCalc );
         if( nNo )
             nNo /= coDiff;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c2e81c5..617ed16 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -84,10 +84,10 @@ using ::std::auto_ptr;
 struct ScCompare
 {
     double  nVal[2];
-    String* pVal[2];
+    OUString* pVal[2];
     bool    bVal[2];
     bool    bEmpty[2];
-        ScCompare( String* p1, String* p2 )
+        ScCompare( OUString* p1, OUString* p2 )
         {
             pVal[ 0 ] = p1;
             pVal[ 1 ] = p2;
@@ -261,7 +261,7 @@ static void lcl_storeJumpMatResult( const ScMatrix* pMat, ScMatrix* pResMat, SCS
     }
     else
     {
-        const String& rStr = pMat->GetString( nC, nR );
+        const OUString& rStr = pMat->GetString( nC, nR );
         pResMat->PutString( rStr, nC, nR );
     }
 }
@@ -865,7 +865,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
         }
         else
         {
-            if ( rComp.pVal[ 1 ]->Len() )
+            if ( !rComp.pVal[ 1 ]->isEmpty() )
                 fRes = -1;      // empty cell < "..."
             // else: empty cell == ""
         }
@@ -885,7 +885,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
         }
         else
         {
-            if ( rComp.pVal[ 0 ]->Len() )
+            if ( !rComp.pVal[ 0 ]->isEmpty() )
                 fRes = 1;       // "..." > empty cell
             // else: "" == empty cell
         }
@@ -926,11 +926,11 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
             if (pOptions->bRegEx)
             {
                 sal_Int32 nStart = 0;
-                sal_Int32 nStop  = rComp.pVal[0]->Len();
+                sal_Int32 nStop  = rComp.pVal[0]->getLength();
                 bool bMatch = rEntry.GetSearchTextPtr(
                         !pOptions->bIgnoreCase)->SearchForward( *rComp.pVal[0],
                             &nStart, &nStop);
-                if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rComp.pVal[0]->Len()))
+                if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rComp.pVal[0]->getLength()))
                     bMatch = false;     // RegEx must match entire string.
                 fRes = (bMatch ? 0 : 1);
             }
@@ -944,13 +944,13 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
                     bMatch = pTransliteration->isEqual( *rComp.pVal[0], *rComp.pVal[1]);
                 else
                 {
-                    String aCell( pTransliteration->transliterate(
+                    OUString aCell( pTransliteration->transliterate(
                                 *rComp.pVal[0], ScGlobal::eLnge, 0,
-                                rComp.pVal[0]->Len(), NULL));
-                    String aQuer( pTransliteration->transliterate(
+                                rComp.pVal[0]->getLength(), NULL));
+                    OUString aQuer( pTransliteration->transliterate(
                                 *rComp.pVal[1], ScGlobal::eLnge, 0,
-                                rComp.pVal[1]->Len(), NULL));
-                    bMatch = (aCell.Search( aQuer ) != STRING_NOTFOUND);
+                                rComp.pVal[1]->getLength(), NULL));
+                    bMatch = (aCell.indexOf( aQuer ) != -1);
                 }
                 fRes = (bMatch ? 0 : 1);
             }
@@ -982,7 +982,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
                 // As in ScTable::ValidQuery() match a numeric string for a
                 // number query that originated from a string, e.g. in SUMIF
                 // and COUNTIF. Transliteration is not needed here.
-                bool bEqual = rComp.pVal[nStringQuery-1]->Equals(rItem.maString);
+                bool bEqual = (*rComp.pVal[nStringQuery-1]) == rItem.maString;
                 // match => fRes=0, else fRes=1
                 fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
             }
@@ -995,7 +995,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
 
 double ScInterpreter::Compare()
 {
-    String aVal1, aVal2;
+    OUString aVal1, aVal2;
     ScCompare aComp( &aVal1, &aVal2 );
     for( short i = 1; i >= 0; i-- )
     {
@@ -1084,7 +1084,7 @@ double ScInterpreter::Compare()
 
 sc::RangeMatrix ScInterpreter::CompareMat( ScCompareOptions* pOptions )
 {
-    String aVal1, aVal2;
+    OUString aVal1, aVal2;
     ScCompare aComp( &aVal1, &aVal2 );
     sc::RangeMatrix aMat[2];
     ScAddress aAdr;
@@ -2401,7 +2401,7 @@ void ScInterpreter::ScCell()
             }
             bError = !PopDoubleRefOrSingleRef( aCellPos );
         }
-        String aInfoType( GetString() );
+        OUString aInfoType( GetString() );
         if( bError || nGlobalError )
             PushIllegalParameter();
         else
@@ -2412,25 +2412,25 @@ void ScInterpreter::ScCell()
             ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell);
 
 // *** ADDRESS INFO ***
-            if( aInfoType.EqualsAscii( "COL" ) )
+            if( aInfoType.equalsAscii( "COL" ) )
             {   // column number (1-based)
                 PushInt( aCellPos.Col() + 1 );
             }
-            else if( aInfoType.EqualsAscii( "ROW" ) )
+            else if( aInfoType.equalsAscii( "ROW" ) )
             {   // row number (1-based)
                 PushInt( aCellPos.Row() + 1 );
             }
-            else if( aInfoType.EqualsAscii( "SHEET" ) )
+            else if( aInfoType.equalsAscii( "SHEET" ) )
             {   // table number (1-based)
                 PushInt( aCellPos.Tab() + 1 );
             }
-            else if( aInfoType.EqualsAscii( "ADDRESS" ) )
+            else if( aInfoType.equalsAscii( "ADDRESS" ) )
             {   // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
                 sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D);
                 OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention()));
                 PushString(aStr);
             }
-            else if( aInfoType.EqualsAscii( "FILENAME" ) )
+            else if( aInfoType.equalsAscii( "FILENAME" ) )
             {   // file name and table name: 'FILENAME'#$TABLE
                 SCTAB nTab = aCellPos.Tab();
                 OUString aFuncResult;
@@ -2457,7 +2457,7 @@ void ScInterpreter::ScCell()
                 }
                 PushString( aFuncResult );
             }
-            else if( aInfoType.EqualsAscii( "COORD" ) )
+            else if( aInfoType.equalsAscii( "COORD" ) )
             {   // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
                 // Yes, passing tab as col is intentional!
                 OUStringBuffer aFuncResult;
@@ -2473,7 +2473,7 @@ void ScInterpreter::ScCell()
             }
 
 // *** CELL PROPERTIES ***
-            else if( aInfoType.EqualsAscii( "CONTENTS" ) )
+            else if( aInfoType.equalsAscii( "CONTENTS" ) )
             {   // contents of the cell, no formatting
                 if (aCell.hasString())
                 {
@@ -2484,7 +2484,7 @@ void ScInterpreter::ScCell()
                 else
                     PushDouble(GetCellValue(aCellPos, aCell));
             }
-            else if( aInfoType.EqualsAscii( "TYPE" ) )
+            else if( aInfoType.equalsAscii( "TYPE" ) )
             {   // b = blank; l = string (label); v = otherwise (value)
                 sal_Unicode c;
                 if (aCell.hasString())
@@ -2493,7 +2493,7 @@ void ScInterpreter::ScCell()
                     c = aCell.hasNumeric() ? 'v' : 'b';
                 PushString( OUString(c) );
             }
-            else if( aInfoType.EqualsAscii( "WIDTH" ) )
+            else if( aInfoType.equalsAscii( "WIDTH" ) )
             {   // column width (rounded off as count of zero characters in standard font and size)
                 Printer*    pPrinter = pDok->GetPrinter();
                 MapMode     aOldMode( pPrinter->GetMapMode() );
@@ -2510,7 +2510,7 @@ void ScInterpreter::ScCell()
                 int nZeroCount = (int)(pDok->GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth);
                 PushInt( nZeroCount );
             }
-            else if( aInfoType.EqualsAscii( "PREFIX" ) )
+            else if( aInfoType.equalsAscii( "PREFIX" ) )
             {   // ' = left; " = right; ^ = centered
                 sal_Unicode c = 0;
                 if (aCell.hasString())
@@ -2529,7 +2529,7 @@ void ScInterpreter::ScCell()
                 }
                 PushString( OUString(c) );
             }
-            else if( aInfoType.EqualsAscii( "PROTECT" ) )
+            else if( aInfoType.equalsAscii( "PROTECT" ) )
             {   // 1 = cell locked
                 const ScProtectionAttr* pProtAttr = (const ScProtectionAttr*)
                     pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION );
@@ -2537,19 +2537,19 @@ void ScInterpreter::ScCell()
             }
 
 // *** FORMATTING ***
-            else if( aInfoType.EqualsAscii( "FORMAT" ) )
+            else if( aInfoType.equalsAscii( "FORMAT" ) )
             {   // specific format code for standard formats
                 OUString aFuncResult;
                 sal_uLong   nFormat = pDok->GetNumberFormat( aCellPos );
                 getFormatString(pFormatter, nFormat, aFuncResult);
                 PushString( aFuncResult );
             }
-            else if( aInfoType.EqualsAscii( "COLOR" ) )
+            else if( aInfoType.equalsAscii( "COLOR" ) )
             {   // 1 = negative values are colored, otherwise 0
                 const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
                 PushInt( lcl_FormatHasNegColor( pFormat ) ? 1 : 0 );
             }
-            else if( aInfoType.EqualsAscii( "PARENTHESES" ) )
+            else if( aInfoType.equalsAscii( "PARENTHESES" ) )
             {   // 1 = format string contains a '(' character, otherwise 0
                 const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) );
                 PushInt( lcl_FormatHasOpenPar( pFormat ) ? 1 : 0 );
@@ -3444,11 +3444,11 @@ static inline bool lcl_ScInterpreter_IsPrintable( sal_Unicode c )
 
 void ScInterpreter::ScClean()
 {
-    String aStr( GetString() );
-    for ( xub_StrLen i = 0; i < aStr.Len(); i++ )
+    OUString aStr( GetString() );
+    for ( xub_StrLen i = 0; i < aStr.getLength(); i++ )
     {
-        if ( !lcl_ScInterpreter_IsPrintable( aStr.GetChar( i ) ) )
-            aStr.Erase(i,1);
+        if ( !lcl_ScInterpreter_IsPrintable( aStr[i] ) )
+            aStr = aStr.replaceAt(i,1,"");
     }
     PushString(aStr);
 }
@@ -3457,7 +3457,7 @@ void ScInterpreter::ScClean()
 void ScInterpreter::ScCode()
 {
 //2do: make it full range unicode?
-    String aStr = GetString();
+    OUString aStr = GetString();
     //"classic" ByteString conversion flags
     const sal_uInt32 convertFlags =
         RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE |
@@ -3466,7 +3466,7 @@ void ScInterpreter::ScCode()
         RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
         RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
         RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
-    PushInt( (sal_uChar) OUStringToOString(OUString(aStr.GetChar(0)), osl_getThreadTextEncoding(), convertFlags).toChar() );
+    PushInt( (sal_uChar) OUStringToOString(OUString(aStr[0]), osl_getThreadTextEncoding(), convertFlags).toChar() );
 }
 
 
@@ -4299,7 +4299,7 @@ void ScInterpreter::ScTable()
             {
                 case svString :
                 {
-                    String aStr( PopString() );
+                    OUString aStr( PopString() );
                     if ( pDok->GetTable( aStr, nVal ) )
                         ++nVal;
                     else
@@ -5901,7 +5901,7 @@ void ScInterpreter::ScLookup()
 
     // The third parameter, result array, for double, string and single reference.
     double fResVal = 0.0;
-    String aResStr;
+    OUString aResStr;
     ScAddress aResAdr;
     StackVar eResArrayType = svUnknown;
 
@@ -7295,7 +7295,7 @@ void ScInterpreter::ScIndirect()
         }
         const ScAddress::Details aDetails( eConv, aPos );
         SCTAB nTab = aPos.Tab();
-        String sRefStr( GetString() );
+        OUString sRefStr( GetString() );
         ScRefAddress aRefAd, aRefAd2;
         ScAddress::ExternalInfo aExtInfo;
         if (ConvertDoubleRef(pDok, sRefStr, nTab, aRefAd, aRefAd2, aDetails, &aExtInfo))
@@ -7421,7 +7421,7 @@ void ScInterpreter::ScAddressFunc()
 
     if( nParamCount >= 5 && !sTabStr.isEmpty() )
     {
-        String aDoc;
+        OUString aDoc;
         if (eConv == FormulaGrammar::CONV_OOO)
         {
             // Isolate Tab from 'Doc'#Tab
@@ -7438,7 +7438,7 @@ void ScInterpreter::ScAddressFunc()
          * need some extra handling to isolate Tab from Doc. */
         if (sTabStr[0] != '\'' || sTabStr[sTabStr.getLength()-1] != '\'')
             ScCompiler::CheckTabQuotes( sTabStr, eConv);
-        if (aDoc.Len())
+        if (!aDoc.isEmpty())
             sTabStr = aDoc + sTabStr;
         sTabStr += eConv == FormulaGrammar::CONV_XL_R1C1 ? OUString("!") : OUString(".");
         sTabStr += aRefStr;
@@ -8011,13 +8011,13 @@ void ScInterpreter::ScFind()
             fAnz = GetDouble();
         else
             fAnz = 1.0;
-        String sStr = GetString();
-        if( fAnz < 1.0 || fAnz > (double) sStr.Len() )
+        OUString sStr = GetString();
+        if( fAnz < 1.0 || fAnz > (double) sStr.getLength() )
             PushNoValue();
         else
         {
-            xub_StrLen nPos = sStr.Search( GetString(), (xub_StrLen) fAnz - 1 );
-            if (nPos == STRING_NOTFOUND)
+            sal_Int32 nPos = sStr.indexOf( GetString(), (xub_StrLen) fAnz - 1 );
+            if (nPos == -1)
                 PushNoValue();
             else
                 PushDouble((double)(nPos + 1));
@@ -8031,8 +8031,8 @@ void ScInterpreter::ScExact()
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
     if ( MustHaveParamCount( GetByte(), 2 ) )
     {
-        String s1( GetString() );
-        String s2( GetString() );
+        OUString s1( GetString() );
+        OUString s2( GetString() );
         PushInt( s1 == s2 );
     }
 }
@@ -8057,8 +8057,8 @@ void ScInterpreter::ScLeft()
         }
         else
             n = 1;
-        String aStr( GetString() );
-        aStr.Erase( n );
+        OUString aStr( GetString() );
+        aStr = aStr.copy( 0, n );
         PushString( aStr );
     }
 }
@@ -8258,9 +8258,9 @@ void ScInterpreter::ScRight()
         }
         else
             n = 1;
-        String aStr( GetString() );
-        if( n < aStr.Len() )
-            aStr.Erase( 0, aStr.Len() - n );
+        OUString aStr( GetString() );
+        if( n < aStr.getLength() )
+            aStr = aStr.copy( aStr.getLength() - n );
         PushString( aStr );
     }
 }
@@ -8312,11 +8312,11 @@ void ScInterpreter::ScMid()
     {
         double fAnz    = ::rtl::math::approxFloor(GetDouble());
         double fAnfang = ::rtl::math::approxFloor(GetDouble());
-        String aStr = GetString();
+        OUString aStr = GetString();
         if (fAnfang < 1.0 || fAnz < 0.0 || fAnfang > double(STRING_MAXLEN) || fAnz > double(STRING_MAXLEN))
             PushIllegalArgument();
         else
-            PushString(aStr.Copy( (xub_StrLen) fAnfang - 1, (xub_StrLen) fAnz ));
+            PushString(aStr.copy( (xub_StrLen) fAnfang - 1, (xub_StrLen) fAnz ));
     }
 }
 
@@ -8415,12 +8415,12 @@ void ScInterpreter::ScSubstitute()
         else
             nAnz = 0;
         OUString sNewStr = GetString();
-        String sOldStr = GetString();
+        OUString sOldStr = GetString();
         OUString sStr    = GetString();
         sal_Int32 nPos = 0;
         xub_StrLen nCount = 0;
         xub_StrLen nNewLen = sNewStr.getLength();
-        xub_StrLen nOldLen = sOldStr.Len();
+        xub_StrLen nOldLen = sOldStr.getLength();
         while( true )
         {
             nPos = sStr.indexOf( sOldStr, nPos );
@@ -8454,10 +8454,10 @@ void ScInterpreter::ScRept()
     if ( MustHaveParamCount( GetByte(), 2 ) )
     {
         double fAnz = ::rtl::math::approxFloor(GetDouble());
-        String aStr( GetString() );
+        OUString aStr( GetString() );
         if ( fAnz < 0.0 )
             PushIllegalArgument();
-        else if ( fAnz * aStr.Len() > STRING_MAXLEN )
+        else if ( fAnz * aStr.getLength() > STRING_MAXLEN )
         {
             PushError( errStringOverflow );
         }
@@ -8465,7 +8465,7 @@ void ScInterpreter::ScRept()
             PushString( EMPTY_STRING );
         else
         {
-            const xub_StrLen nLen = aStr.Len();
+            const xub_StrLen nLen = aStr.getLength();
             xub_StrLen n = (xub_StrLen) fAnz;
             OUStringBuffer aRes(n*nLen);
             while( n-- )
@@ -8479,11 +8479,11 @@ void ScInterpreter::ScRept()
 void ScInterpreter::ScConcat()
 {
     sal_uInt8 nParamCount = GetByte();
-    String aRes;
+    OUString aRes;
     while( nParamCount-- > 0)
     {
         const OUString& rStr = GetString();
-        aRes.Insert( rStr, 0 );
+        aRes = rStr + aRes;
     }
     PushString( aRes );
 }
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 6f08958..ddaf4c5 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -531,7 +531,7 @@ void ScInterpreter::ScGetDateDif()
 
 void ScInterpreter::ScGetTimeValue()
 {
-    String aInputString = GetString();
+    OUString aInputString = GetString();
     sal_uInt32 nFIndex = 0;                 // damit default Land/Spr.
     double fVal;
     if (pFormatter->IsNumberFormat(aInputString, nFIndex, fVal))
@@ -1938,13 +1938,13 @@ void ScInterpreter::ScStyle()
     sal_uInt8 nParamCount = GetByte();
     if (nParamCount >= 1 && nParamCount <= 3)
     {
-        String aStyle2;                             // Vorlage nach Timer
+        OUString aStyle2;                             // Vorlage nach Timer
         if (nParamCount >= 3)
             aStyle2 = GetString();
         long nTimeOut = 0;                          // Timeout
         if (nParamCount >= 2)
             nTimeOut = (long)(GetDouble()*1000.0);
-        String aStyle1 = GetString();               // Vorlage fuer sofort
+        OUString aStyle1 = GetString();               // Vorlage fuer sofort
 
         if (nTimeOut < 0)
             nTimeOut = 0;
@@ -2280,8 +2280,8 @@ void ScInterpreter::ScConvert()
 {   // Value, FromUnit, ToUnit
     if ( MustHaveParamCount( GetByte(), 3 ) )
     {
-        String aToUnit( GetString() );
-        String aFromUnit( GetString() );
+        OUString aToUnit( GetString() );
+        OUString aFromUnit( GetString() );
         double fVal = GetDouble();
         if ( nGlobalError )
             PushError( nGlobalError);
@@ -2313,7 +2313,7 @@ void ScInterpreter::ScRoman()
             static const sal_uInt16 pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
             static const sal_uInt16 nMaxIndex = (sal_uInt16)((sizeof(pValues)/sizeof(pValues[0])) - 1);
 
-            String aRoman;
+            OUString aRoman;
             sal_uInt16 nVal = (sal_uInt16) fVal;
             sal_uInt16 nMode = (sal_uInt16) fMode;
 
@@ -2337,8 +2337,8 @@ void ScInterpreter::ScRoman()
                         else
                             nSteps = nMode;
                     }
-                    aRoman += pChars[ nIndex ];
-                    aRoman += pChars[ nIndex2 ];
+                    aRoman += OUString( pChars[ nIndex ] );
+                    aRoman += OUString( pChars[ nIndex2 ] );
                     nVal = sal::static_int_cast<sal_uInt16>( nVal + pValues[ nIndex ] );
                     nVal = sal::static_int_cast<sal_uInt16>( nVal - pValues[ nIndex2 ] );
                 }
@@ -2348,7 +2348,7 @@ void ScInterpreter::ScRoman()
                     {
                         // assert can't happen with nVal<4000 precondition
                         assert( nIndex >= 1 );
-                        aRoman += pChars[ nIndex - 1 ];
+                        aRoman += OUString( pChars[ nIndex - 1 ] );
                     }
                     sal_Int32 nPad = nDigit % 5;
                     if (nPad)
@@ -2503,7 +2503,7 @@ void ScInterpreter::ScHyperLink()
                     SetError( errIllegalArgument);
             }
         }
-        String aUrl = GetString();
+        OUString aUrl = GetString();
         ScMatrixRef pResMat = GetNewMat( 1, 2);
         if (nGlobalError)
         {
@@ -2595,7 +2595,7 @@ void ScInterpreter::ScEuroConvert()
             double fToRate;
             int    nFromDec;
             int    nToDec;
-            String aEur( "EUR");
+            OUString aEur( "EUR");
             if ( lclConvertMoney( aFromUnit, fFromRate, nFromDec )
                 && lclConvertMoney( aToUnit, fToRate, nToDec ) )
             {
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index fedda31..8a6652dd 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -460,7 +460,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, ScRefCellValue&
                 }
                 else
                 {
-                    String aStr = pFCell->GetString();
+                    OUString aStr = pFCell->GetString();
                     fValue = ConvertStringToValue( aStr );
                 }
             }
@@ -662,7 +662,7 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                 aCell.assign(*pDok, ScAddress(nCol, nRow, nTab));
                 if (!aCell.isEmpty())
                 {
-                    String  aStr;
+                    OUString  aStr;
                     sal_uInt16  nErr = 0;
                     bool    bOk = true;
                     switch (aCell.meType)
@@ -767,7 +767,7 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                     sal_uInt16  nErr = 0;
                     sal_uInt16  nType = 0; // 0 = Zahl; 1 = String
                     double  nVal = 0.0;
-                    String  aStr;
+                    OUString  aStr;
                     bool    bOk = true;
                     switch (aCell.meType)
                     {
@@ -1688,7 +1688,7 @@ bool ScInterpreter::ConvertMatrixParameters()
                     if (eType == ScParameterClassification::Array)
                     {
                         sal_uInt16 nFileId = p->GetIndex();
-                        const String& rTabName = p->GetString();
+                        const OUString& rTabName = p->GetString();
                         const ScComplexRefData& rRef = static_cast<ScToken*>(p)->GetDoubleRef();
                         ScExternalRefCache::TokenArrayRef pArray;
                         GetExternalDoubleRef(nFileId, rTabName, rRef, pArray);
@@ -1851,7 +1851,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
             }
             else
             {
-                String aStr( nMatVal.GetString());
+                OUString aStr( nMatVal.GetString());
                 FormulaTokenRef xRes = new FormulaStringToken( aStr);
                 PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
                 rRetTypeExpr = NUMBERFORMAT_TEXT;
@@ -2478,8 +2478,8 @@ void ScInterpreter::ScDBGet()
 void ScInterpreter::ScExternal()
 {
     sal_uInt8 nParamCount = GetByte();
-    String aUnoName;
-    String aFuncName( ScGlobal::pCharClass->uppercase( pCur->GetExternal() ) );
+    OUString aUnoName;
+    OUString aFuncName( ScGlobal::pCharClass->uppercase( pCur->GetExternal() ) );
     FuncData* pFuncData = ScGlobal::GetFuncCollection()->findByName(aFuncName);
     if (pFuncData)
     {
@@ -2604,7 +2604,7 @@ void ScInterpreter::ScExternal()
                             sal_Char* pcErg = new sal_Char[ADDIN_MAXSTRLEN];
                             ppParam[0] = pcErg;
                             pFuncData->Call(ppParam);
-                            String aUni( pcErg, osl_getThreadTextEncoding() );
+                            OUString aUni( pcErg, strlen(pcErg), osl_getThreadTextEncoding() );
                             PushString( aUni );
                             delete[] pcErg;
                         }
@@ -2675,7 +2675,7 @@ void ScInterpreter::ScExternal()
             PushIllegalParameter();
         }
     }
-    else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).Len()  )
+    else if ( !( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).isEmpty()  )
     {
         //  bLocalFirst=false in FindFunction, cFunc should be the stored
         //  internal name
@@ -3066,7 +3066,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe
     uno::Reference< uno::XInterface > xIf;
     if ( pBasMgr && !pBasMgr->GetName().isEmpty() )
     {
-        String sProj = String( "Standard" );
+        OUString sProj( "Standard" );
         if ( !pDok->GetDocumentShell()->GetBasicManager()->GetName().isEmpty() )
         {
             sProj = pDok->GetDocumentShell()->GetBasicManager()->GetName();
@@ -3097,7 +3097,7 @@ static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPa
         xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( pDok->GetDocumentShell(), "ooo.vba.excel.Range", aArgs );
         if ( xVBARange.is() )
         {
-            String sDummy("A-Range");
+            OUString sDummy("A-Range");
             SbxObjectRef aObj = GetSbUnoObject( sDummy, uno::Any( xVBARange ) );
             SetSbUnoObjectDfltPropName( aObj );
             bOk = pPar->PutObject( aObj );
@@ -3121,7 +3121,7 @@ void ScInterpreter::ScMacro()
     SbxBase::ResetError();
 
     sal_uInt8 nParamCount = GetByte();
-    String aMacro( pCur->GetExternal() );
+    OUString aMacro( pCur->GetExternal() );
 
     SfxObjectShell* pDocSh = pDok->GetDocumentShell();
     if ( !pDocSh || !pDok->CheckMacroWarn() )
@@ -3154,12 +3154,8 @@ void ScInterpreter::ScMacro()
     bool bUseVBAObjects = pModule->IsVBACompat();
     SbxObject* pObject = pModule->GetParent();
     OSL_ENSURE(pObject->IsA(TYPE(StarBASIC)), "No Basic found!");
-    String aMacroStr = pObject->GetName();
-    aMacroStr += '.';
-    aMacroStr += pModule->GetName();
-    aMacroStr += '.';
-    aMacroStr += pMethod->GetName();
-    String aBasicStr;
+    OUString aMacroStr = pObject->GetName() + "." + pModule->GetName() + "." + pMethod->GetName();
+    OUString aBasicStr;
     if (pObject->GetParent())
     {
         aBasicStr = pObject->GetParent()->GetName();    // Dokumentenbasic
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 0f52e43..dc6d71cc 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -439,7 +439,7 @@ ScMatrixRef ScInterpreter::GetMatrix()
         break;
         case svString :
         {
-            String aStr = GetString();
+            OUString aStr = GetString();
             pMat = GetNewMat( 1, 1);
             if ( pMat )
             {
@@ -1083,7 +1083,7 @@ ScMatrixRef ScInterpreter::MatConcat(const ScMatrixRef& pMat1, const ScMatrixRef
                     xResMat->PutError( nErr, i, j);
                 else
                 {
-                    String aTmp( pMat1->GetString( *pFormatter, i, j));
+                    OUString aTmp( pMat1->GetString( *pFormatter, i, j));
                     aTmp += pMat2->GetString( *pFormatter, i, j);
                     xResMat->PutString( aTmp, i, j);
                 }
@@ -1279,7 +1279,7 @@ void ScInterpreter::ScAmpersand()
     }
     else if (pMat1 || pMat2)
     {
-        String sStr;
+        OUString sStr;
         bool bFlag;
         ScMatrixRef pMat = pMat1;
         if (!pMat)
@@ -1314,7 +1314,7 @@ void ScInterpreter::ScAmpersand()
                             pResMat->PutError( nErr, i, j);
                         else
                         {
-                            String aTmp( sStr);
+                            OUString aTmp( sStr);
                             aTmp += pMat->GetString( *pFormatter, i, j);
                             pResMat->PutString( aTmp, i, j);
                         }
@@ -1330,7 +1330,7 @@ void ScInterpreter::ScAmpersand()
                             pResMat->PutError( nErr, i, j);
                         else
                         {
-                            String aTmp( pMat->GetString( *pFormatter, i, j));
+                            OUString aTmp( pMat->GetString( *pFormatter, i, j));
                             aTmp += sStr;
                             pResMat->PutString( aTmp, i, j);
                         }
@@ -3185,17 +3185,17 @@ void ScInterpreter::ScInfo()
 {
     if( MustHaveParamCount( GetByte(), 1 ) )
     {
-        String aStr = GetString();
+        OUString aStr = GetString();
         ScCellKeywordTranslator::transKeyword(aStr, ScGlobal::GetLocale(), ocInfo);
-        if( aStr.EqualsAscii( "SYSTEM" ) )
-            PushString( String( SC_INFO_OSVERSION ) );
-        else if( aStr.EqualsAscii( "OSVERSION" ) )
-            PushString( String( "Windows (32-bit) NT 5.01" ) );
-        else if( aStr.EqualsAscii( "RELEASE" ) )
+        if( aStr.equalsAscii( "SYSTEM" ) )
+            PushString( OUString( SC_INFO_OSVERSION ) );
+        else if( aStr.equalsAscii( "OSVERSION" ) )
+            PushString( OUString( "Windows (32-bit) NT 5.01" ) );
+        else if( aStr.equalsAscii( "RELEASE" ) )
             PushString( ::utl::Bootstrap::getBuildIdData( OUString() ) );
-        else if( aStr.EqualsAscii( "NUMFILE" ) )
+        else if( aStr.equalsAscii( "NUMFILE" ) )
             PushDouble( 1 );
-        else if( aStr.EqualsAscii( "RECALC" ) )
+        else if( aStr.equalsAscii( "RECALC" ) )
             PushString( ScGlobal::GetRscString( pDok->GetAutoCalc() ? STR_RECALC_AUTO : STR_RECALC_MANUAL ) );
         else
             PushIllegalArgument();
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 470c8d8..efde90f 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -398,7 +398,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
             {
                 if( eFunc == ifCOUNT )
                 {
-                    String aStr( PopString() );
+                    OUString aStr( PopString() );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list