[PATCH] daily wacking of Strings

Norbert Thiebaud (via Code Review) gerrit at gerrit.libreoffice.org
Thu Jun 13 06:18:47 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4242

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/42/4242/1

daily wacking of Strings

This is done by 'disabling' include/tools/string.hxx
and fixing some of the fall-out chasing for a connexe changeset
by re-enabling include/tools/strings.hxx after a while.

Change-Id: I3b6097255684aeb1f177aac0c5787d0ec67d9f80
---
M connectivity/source/drivers/file/quotedstring.cxx
M connectivity/source/drivers/flat/ETable.cxx
M connectivity/source/inc/file/quotedstring.hxx
M connectivity/source/inc/flat/ETable.hxx
M editeng/source/editeng/impedit4.cxx
M include/tools/cachestr.hxx
M include/tools/globname.hxx
M include/tools/inetstrm.hxx
M include/tools/stream.hxx
M include/tools/tempfile.hxx
M include/tools/wldcrd.hxx
M include/unotools/calendarwrapper.hxx
M include/unotools/charclass.hxx
M rsc/inc/rscdb.hxx
M rsc/source/parser/rscyacc.y
M sw/source/ui/dbui/createaddresslistdialog.cxx
M sw/source/ui/index/cnttab.cxx
M sw/source/ui/uno/unomailmerge.cxx
M tools/source/fsys/tempfile.cxx
M tools/source/fsys/wldcrd.cxx
M tools/source/generic/bigint.cxx
M tools/source/generic/config.cxx
M tools/source/inet/inetmsg.cxx
M tools/source/inet/inetstrm.cxx
M tools/source/ref/globname.cxx
M tools/source/stream/cachestr.cxx
M tools/source/stream/stream.cxx
M tools/source/stream/strmunx.cxx
M unotools/source/config/defaultoptions.cxx
M unotools/source/i18n/calendarwrapper.cxx
M unotools/source/i18n/charclass.cxx
31 files changed, 352 insertions(+), 342 deletions(-)



diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index 2d199e0..cfea74a 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "file/quotedstring.hxx"
+#include <rtl/ustrbuf.hxx>
 #include <rtl/logfile.hxx>
 
 namespace connectivity
@@ -26,21 +27,21 @@
     //= QuotedTokenizedString
     //==================================================================
     //------------------------------------------------------------------
-    xub_StrLen QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const
+    sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const
     {
         RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "QuotedTokenizedString::GetTokenCount" );
-        const xub_StrLen nLen = m_sString.Len();
+        const sal_Int32 nLen = m_sString.getLength();
         if ( !nLen )
             return 0;
 
-        xub_StrLen nTokCount = 1;
+        sal_Int32 nTokCount = 1;
         sal_Bool bStart = sal_True;     // Are we on the first character in the Token?
         sal_Bool bInString = sal_False; // Are we WITHIN a (cStrDel delimited) String?
 
         // Search for String-end after the first not matching character
-        for( xub_StrLen i = 0; i < nLen; ++i )
+        for( sal_Int32 i = 0; i < nLen; ++i )
         {
-            const sal_Unicode cChar = m_sString.GetChar(i);
+            const sal_Unicode cChar = m_sString[i];
             if (bStart)
             {
                 bStart = sal_False;
@@ -57,7 +58,7 @@
                 // when now the String-Delimiter-character occurs ...
                 if ( cChar == cStrDel )
                 {
-                    if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
+                    if ((i+1 < nLen) && (m_sString[i+1] == cStrDel))
                     {
                         // double String-Delimter-character:
                         ++i;    // no string-end, skip next character.
@@ -85,49 +86,47 @@
     }
 
     //------------------------------------------------------------------
-    String QuotedTokenizedString::GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const
+    OUString QuotedTokenizedString::GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const
     {
         RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "QuotedTokenizedString::GetTokenCount" );
-        String aStr;
-        const xub_StrLen nLen = m_sString.Len();
+        const sal_Int32 nLen = m_sString.getLength();
         if ( nLen )
         {
-            sal_Bool bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel);   // are we WITHIN a (cStrDel delimited) String?
+            sal_Bool bInString = (nStartPos < nLen) && (m_sString[nStartPos] == cStrDel);   // are we WITHIN a (cStrDel delimited) String?
 
             // First character a String-Delimiter?
             if (bInString )
                 ++nStartPos;            // skip this character!
             if ( nStartPos >= nLen )
-                return aStr;
+                return OUString();
 
-            sal_Unicode* pData = aStr.AllocBuffer( nLen - nStartPos + 1 );
-            const sal_Unicode* pStart = pData;
+            OUStringBuffer aStr(nLen - nStartPos + 1);
+
             // Search until end of string for the first not matching character
-            for( xub_StrLen i = nStartPos; i < nLen; ++i )
+            for( sal_Int32 i = nStartPos; i < nLen; ++i )
             {
-                const sal_Unicode cChar = m_sString.GetChar(i);
+                const sal_Unicode cChar = m_sString[i];
                 if (bInString)
                 {
                     // when now the String-Delimiter-character occurs ...
                     if ( cChar == cStrDel )
                     {
-                        if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
+                        if ((i+1 < nLen) && (m_sString[i+1] == cStrDel))
                         {
                             // double String Delimiter-character
                             // no end of string, skip next character.
                             ++i;
-                            *pData++ = m_sString.GetChar(i);    // character belongs to Result-String
+                            aStr.append(m_sString[i]);    // character belongs to Result-String
                         }
                         else
                         {
                             //end of String
                             bInString = sal_False;
-                            *pData = 0;
                         }
                     }
                     else
                     {
-                        *pData++ = cChar;   // character belongs to Result-String
+                        aStr.append(cChar);   // character belongs to Result-String
                     }
 
                 }
@@ -142,14 +141,16 @@
                     }
                     else
                     {
-                        *pData++ = cChar;   // character belongs to Result-String
+                        aStr.append(cChar);   // character belongs to Result-String
                     }
                 }
             } // for( xub_StrLen i = nStartPos; i < nLen; ++i )
-            *pData = 0;
-            aStr.ReleaseBufferAccess(xub_StrLen(pData - pStart));
+            return aStr.makeStringAndClear();
         }
-        return aStr;
+        else
+        {
+            return OUString();
+        }
     }
 }
 
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 4a81462..a456c89 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -107,7 +107,7 @@
         aHeaderLine = m_aCurrentLine;
     }
     // column count
-    const xub_StrLen nFieldCount = aHeaderLine.GetTokenCount(m_cFieldDelimiter,m_cStringDelimiter);
+    const sal_Int32 nFieldCount = aHeaderLine.GetTokenCount(m_cFieldDelimiter,m_cStringDelimiter);
 
     if(!m_aColumns.is())
         m_aColumns = new OSQLColumns();
@@ -131,24 +131,26 @@
     OUString aColumnName;
     ::comphelper::UStringMixEqual aCase(bCase);
     vector<OUString> aColumnNames;
-    vector<String> m_aTypeNames;
+    vector<OUString> m_aTypeNames;
     m_aTypeNames.resize(nFieldCount);
     const sal_Int32 nMaxRowsToScan = pConnection->getMaxRowsToScan();
     sal_Int32 nRowCount = 0;
 
     do
     {
-        xub_StrLen nStartPosHeaderLine = 0; // use for efficient way to get the tokens
-        xub_StrLen nStartPosFirstLine = 0; // use for efficient way to get the tokens
-        xub_StrLen nStartPosFirstLine2 = 0;
-        for (xub_StrLen i = 0; i < nFieldCount; i++)
+        sal_Int32 nStartPosHeaderLine = 0; // use for efficient way to get the tokens
+        sal_Int32 nStartPosFirstLine = 0; // use for efficient way to get the tokens
+        sal_Int32 nStartPosFirstLine2 = 0;
+        for (sal_Int32 i = 0; i < nFieldCount; i++)
         {
             if ( nRowCount == 0)
             {
                 if ( bHasHeaderLine )
                 {
-                    aColumnName = aHeaderLine.GetTokenSpecial(nStartPosHeaderLine,m_cFieldDelimiter,m_cStringDelimiter);
-                    if ( !aColumnName.getLength() )
+                    aColumnName = aHeaderLine.GetTokenSpecial(nStartPosHeaderLine,
+                                                              m_cFieldDelimiter,
+                                                              m_cStringDelimiter);
+                    if ( aColumnName.isEmpty() )
                     {
                         aColumnName = "C" + OUString::number(i+1);
                     }
@@ -161,7 +163,10 @@
                 aColumnNames.push_back(aColumnName);
             }
             if(bRead)
-                impl_fillColumnInfo_nothrow(m_aCurrentLine,nStartPosFirstLine,nStartPosFirstLine2,m_aTypes[i],m_aPrecisions[i],m_aScales[i],m_aTypeNames[i],cDecimalDelimiter,cThousandDelimiter,aCharClass);
+                impl_fillColumnInfo_nothrow(m_aCurrentLine, nStartPosFirstLine,
+                                            nStartPosFirstLine2,m_aTypes[i], m_aPrecisions[i],
+                                            m_aScales[i], m_aTypeNames[i], cDecimalDelimiter,
+                                            cThousandDelimiter, aCharClass);
         }
         ++nRowCount;
         bRead = readLine(&rowPos.second, &rowPos.first, false);
@@ -170,7 +175,7 @@
     }
     while(nRowCount < nMaxRowsToScan && bRead);
 
-    for (xub_StrLen i = 0; i < nFieldCount; i++)
+    for (sal_Int32 i = 0; i < nFieldCount; i++)
     {
         // check if the columname already exists
         OUString aAlias(aColumnNames[i]);
@@ -198,9 +203,9 @@
 
     m_pFileStream->Seek(m_aRowPosToFilePos[0].second);
 }
-void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2
-                                             ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName
-                                             ,const sal_Unicode cDecimalDelimiter,const sal_Unicode cThousandDelimiter,const CharClass&  aCharClass)
+void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2
+                                             ,sal_Int32& io_nType, sal_Int32& io_nPrecisions, sal_Int32& io_nScales, OUString& o_sTypeName
+                                             ,const sal_Unicode cDecimalDelimiter, const sal_Unicode cThousandDelimiter, const CharClass&  aCharClass)
 {
     if ( io_nType != DataType::VARCHAR )
     {
@@ -210,37 +215,37 @@
         if ( bNumeric )
         {
             // first without fielddelimiter
-            String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
-            if (aField.Len() == 0 ||
-                (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
+            OUString aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
+            if (aField.isEmpty() ||
+                (m_cStringDelimiter && m_cStringDelimiter == aField[0]))
             {
                 bNumeric = sal_False;
                 if ( m_cStringDelimiter != '\0' )
-                    aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2, m_cFieldDelimiter, m_cStringDelimiter);
                 else
                     nStartPosFirstLine2 = nStartPosFirstLine;
             }
             else
             {
-                String aField2;
+                OUString aField2;
                 if ( m_cStringDelimiter != '\0' )
-                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2, m_cFieldDelimiter, m_cStringDelimiter);
                 else
                     aField2 = aField;
 
-                if (aField2.Len() == 0)
+                if (aField2.isEmpty())
                 {
                     bNumeric = sal_False;
                 }
                 else
                 {
                     bNumeric = sal_True;
-                    xub_StrLen nDot = 0;
-                    xub_StrLen nDecimalDelCount = 0;
-                    xub_StrLen nSpaceCount = 0;
-                    for (xub_StrLen j = 0; j < aField2.Len(); j++)
+                    sal_Int32 nDot = 0;
+                    sal_Int32 nDecimalDelCount = 0;
+                    sal_Int32 nSpaceCount = 0;
+                    for (sal_Int32 j = 0; j < aField2.getLength(); j++)
                     {
-                        const sal_Unicode c = aField2.GetChar(j);
+                        const sal_Unicode c = aField2[j];
                         if ( j == nSpaceCount && m_cFieldDelimiter != 32 && c == 32 )
                         {
                             ++nSpaceCount;
@@ -270,10 +275,10 @@
                     if (bNumeric && cThousandDelimiter)
                     {
                         // Is the delimiter correct?
-                        const String aValue = aField2.GetToken(0,cDecimalDelimiter);
-                        for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
+                        const OUString aValue = aField2.getToken(0, cDecimalDelimiter);
+                        for (sal_Int32 j = aValue.getLength() - 4; j >= 0; j -= 4)
                         {
-                            const sal_Unicode c = aValue.GetChar(static_cast<sal_uInt16>(j));
+                            const sal_Unicode c = aValue[j];
                             // just digits, decimal- and thousands-delimiter?
                             if (c == cThousandDelimiter && j)
                                 continue;
@@ -301,19 +306,19 @@
         }
         else if ( io_nType == DataType::DATE || io_nType == DataType::TIMESTAMP || io_nType == DataType::TIME)
         {
-            String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
-            if (aField.Len() == 0 ||
-                (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
+            OUString aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine, m_cFieldDelimiter, '\0');
+            if (aField.isEmpty() ||
+                (m_cStringDelimiter && m_cStringDelimiter == aField[0]))
             {
             }
             else
             {
-                String aField2;
+                OUString aField2;
                 if ( m_cStringDelimiter != '\0' )
-                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2, m_cFieldDelimiter, m_cStringDelimiter);
                 else
                     aField2 = aField;
-                if (aField2.Len() )
+                if (!aField2.isEmpty() )
                 {
                     try
                     {
@@ -391,19 +396,19 @@
     }
     else
     {
-        String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
-        if (aField.Len() == 0 ||
-                (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
+        OUString aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine, m_cFieldDelimiter, '\0');
+        if (aField.isEmpty() ||
+                (m_cStringDelimiter && m_cStringDelimiter == aField[0]))
         {
             if ( m_cStringDelimiter != '\0' )
-                aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2, m_cFieldDelimiter, m_cStringDelimiter);
             else
                 nStartPosFirstLine2 = nStartPosFirstLine;
         }
         else
         {
             if ( m_cStringDelimiter != '\0' )
-                aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                aFirstLine.GetTokenSpecial(nStartPosFirstLine2, m_cFieldDelimiter, m_cStringDelimiter);
         }
     }
 }
@@ -447,7 +452,7 @@
     if(aURL.getExtension() != OUString(m_pConnection->getExtension()))
         aURL.setExtension(m_pConnection->getExtension());
 
-    String aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
+    OUString aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
 
     m_pFileStream = createStream_simpleError( aFileName,STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
 
@@ -471,7 +476,7 @@
     }
 }
 // -------------------------------------------------------------------------
-String OFlatTable::getEntry()
+OUString OFlatTable::getEntry()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen at sun.com", "OFlatTable::getEntry" );
     OUString sURL;
@@ -489,7 +494,7 @@
         {
             sName = xRow->getString(1);
             aURL.SetSmartProtocol(INET_PROT_FILE);
-            String sUrl = m_pConnection->getURL() +  s_sSeparator + sName;
+            OUString sUrl = m_pConnection->getURL() +  s_sSeparator + sName;
             aURL.SetSmartURL( sUrl );
 
             // cut the extension
@@ -631,7 +636,7 @@
     const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
     const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
     // Fields:
-    xub_StrLen nStartPos = 0;
+    sal_Int32 nStartPos = 0;
     OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
     OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
     const OValueRefVector::Vector::size_type nCount = _rRow->get().size();
@@ -639,9 +644,9 @@
          aIter != aEnd && i < nCount;
          ++aIter, i++)
     {
-        String aStr = m_aCurrentLine.GetTokenSpecial(nStartPos,m_cFieldDelimiter,m_cStringDelimiter);
+        OUString aStr = m_aCurrentLine.GetTokenSpecial(nStartPos, m_cFieldDelimiter, m_cStringDelimiter);
 
-        if (aStr.Len() == 0)
+        if (aStr.isEmpty())
             (_rRow->get())[i]->setNull();
         else
         {
@@ -699,11 +704,11 @@
                                    (!cDecimalDelimiter && nType == DataType::INTEGER),
                                    "FalscherTyp");
 
-                        OUStringBuffer aBuf(aStr.Len());
+                        OUStringBuffer aBuf(aStr.getLength());
                         // convert to Standard-Notation (DecimalPOINT without thousands-comma):
-                        for (xub_StrLen j = 0; j < aStr.Len(); ++j)
+                        for (sal_Int32 j = 0; j < aStr.getLength(); ++j)
                         {
-                            const sal_Unicode cChar = aStr.GetChar(j);
+                            const sal_Unicode cChar = aStr[j];
                             if (cDecimalDelimiter && cChar == cDecimalDelimiter)
                                 aBuf.append('.');
                             else if ( cChar == '.' ) // special case, if decimal separator isn't '.' we have to put the string after it
@@ -946,7 +951,7 @@
             m_pFileStream->ReadByteStringLine(sLine,nEncoding);
             if ( !m_pFileStream->IsEof() )
             {
-                m_aCurrentLine.GetString().Append('\n');
+                m_aCurrentLine.GetString() += "\n";
                 m_aCurrentLine.GetString() += sLine.GetString();
                 sLine = m_aCurrentLine;
             }
diff --git a/connectivity/source/inc/file/quotedstring.hxx b/connectivity/source/inc/file/quotedstring.hxx
index b7b13d7..d6a511f 100644
--- a/connectivity/source/inc/file/quotedstring.hxx
+++ b/connectivity/source/inc/file/quotedstring.hxx
@@ -20,7 +20,7 @@
 #ifndef CONNECTIVITY_QUOTED_STRING_HXX
 #define CONNECTIVITY_QUOTED_STRING_HXX
 
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
 #include "file/filedllapi.hxx"
 
 namespace connectivity
@@ -31,16 +31,16 @@
     //==================================================================
     class OOO_DLLPUBLIC_FILE QuotedTokenizedString
     {
-        String m_sString;
+        OUString m_sString;
     public:
         QuotedTokenizedString() {}
-        QuotedTokenizedString(const String& _sString) : m_sString(_sString){}
+        QuotedTokenizedString(const OUString& _sString) : m_sString(_sString){}
 
-        xub_StrLen  GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
-        String      GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
-        inline String& GetString() { return m_sString; }
-        inline xub_StrLen Len() const { return m_sString.Len(); }
-        inline operator String&() { return m_sString; }
+        sal_Int32  GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
+        OUString   GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
+        inline OUString& GetString() { return m_sString; }
+        inline sal_Int32 Len() const { return m_sString.getLength(); }
+        inline operator OUString&() { return m_sString; }
     };
 }
 
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index c5b3608..7481336 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -60,9 +60,9 @@
             sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
             bool readLine(sal_Int32 *pEndPos = NULL, sal_Int32 *pStartPos = NULL, bool nonEmpty = false);
             void setRowPos(::std::vector<TRowPositionInFile>::size_type rowNum, const TRowPositionInFile &rowPos);
-            void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2
-                                             ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName
-                                             ,const sal_Unicode cDecimalDelimiter,const sal_Unicode cThousandDelimiter,const CharClass& aCharClass);
+            void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2
+                                             ,sal_Int32& io_nType, sal_Int32& io_nPrecisions, sal_Int32& io_nScales, OUString& o_sTypeName
+                                             ,const sal_Unicode cDecimalDelimiter, const sal_Unicode cThousandDelimiter, const CharClass& aCharClass);
             OFlatConnection* getFlatConnection()
             {
 #if OSL_DEBUG_LEVEL>1
@@ -101,7 +101,7 @@
             virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
             static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
 
-            String getEntry();
+            OUString getEntry();
         };
     }
 }
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 39e8156..69fac7d 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -123,11 +123,14 @@
         aSel = ImpDeleteSelection( aSel );
     EditPaM aPaM = aSel.Max();
 
-    XubString aTmpStr;
+    OUString aTmpStr;
     sal_Bool bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() );
     while ( bDone )
     {
-        aTmpStr.Erase( MAXCHARSINPARA );
+        if(aTmpStr.getLength() > MAXCHARSINPARA)
+        {
+            aTmpStr = aTmpStr.copy(0, MAXCHARSINPARA);
+        }
         aPaM = ImpInsertText( EditSelection( aPaM, aPaM ), aTmpStr );
         aPaM = ImpInsertParaBreak( aPaM );
         bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() );
diff --git a/include/tools/cachestr.hxx b/include/tools/cachestr.hxx
index 60c31e2..b4e9bcb 100644
--- a/include/tools/cachestr.hxx
+++ b/include/tools/cachestr.hxx
@@ -28,7 +28,7 @@
 class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
 {
 private:
-    String          aFileName;
+    OUString        aFileName;
     sal_uIntPtr     nMaxSize;
     int             bPersistent;
 
@@ -48,9 +48,9 @@
                     SvCacheStream( sal_uIntPtr nMaxMemSize = 0 );
                     ~SvCacheStream();
 
-    void            SetFilename( const String& rFN )
+    void            SetFilename( const OUString& rFN )
                  { aFileName = rFN; } // call only from FilenameHdl
-    const String&   GetFilename() const { return aFileName; }
+    const OUString& GetFilename() const { return aFileName; }
 
     void            SwapOut();
     const void*     GetBuffer();
diff --git a/include/tools/globname.hxx b/include/tools/globname.hxx
index 2ea6850..9c4e3cb 100644
--- a/include/tools/globname.hxx
+++ b/include/tools/globname.hxx
@@ -90,9 +90,9 @@
     sal_Bool    operator != ( const SvGlobalName & rObj ) const
             { return !(*this == rObj); }
 
-    void    MakeFromMemory( void * pData );
-    sal_Bool    MakeId( const String & rId );
-    String  GetHexName() const;
+    void      MakeFromMemory( void * pData );
+    sal_Bool  MakeId( const OUString & rId );
+    OUString  GetHexName() const;
 
                   SvGlobalName( const CLSID & rId );
     const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; }
diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx
index d7b4e14..70c5cef 100644
--- a/include/tools/inetstrm.hxx
+++ b/include/tools/inetstrm.hxx
@@ -182,7 +182,7 @@
     SvMemoryStream        *pMsgBuffer;
 
     static INetMessageEncoding GetMsgEncoding (
-        const String& rContentType);
+        const OUString& rContentType);
 
     // Not implemented.
     INetMIMEMessageStream (const INetMIMEMessageStream& rStrm);
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 78a0bc3..1044eca 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -231,7 +231,7 @@
     sal_uInt16  nNumberFormatInt;
     sal_uInt16  nCompressMode;
     LineEnd     eLineDelimiter;
-    CharSet     eStreamCharSet;
+    rtl_TextEncoding eStreamCharSet;
 
     // Encryption
     OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0  -> Encryption used
@@ -294,9 +294,9 @@
     void SetCryptMaskKey(const OString& rCryptMaskKey);
     const OString& GetCryptMaskKey() const { return m_aCryptMaskKey; }
 
-    void            SetStreamCharSet( CharSet eCharSet )
+    void            SetStreamCharSet( rtl_TextEncoding eCharSet )
                         { eStreamCharSet = eCharSet; }
-    CharSet         GetStreamCharSet() const { return eStreamCharSet; }
+    rtl_TextEncoding GetStreamCharSet() const { return eStreamCharSet; }
 
     void            SetLineDelimiter( LineEnd eLineEnd )
                         { eLineDelimiter = eLineEnd; }
@@ -381,9 +381,9 @@
               causing endless loops ...
     */
     sal_Bool        ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet,
-                                        sal_Int32 nMaxBytesToRead = 0xFFFE );
-    sal_Bool        ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet );
-    sal_Bool        WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet );
+                                        sal_Int32 nMaxBytesToRead);
+    sal_Bool        ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet );
+    sal_Bool        WriteByteStringLine( const OUString& rStr, rtl_TextEncoding eDestCharSet );
 
     /// Switch to no endian swapping and write 0xfeff
     sal_Bool        StartWritingUnicodeText();
@@ -443,8 +443,8 @@
     /** Write a sequence of Unicode characters if
         eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write a sequence of
         Bytecodes converted to eDestCharSet */
-    sal_Bool        WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet );
-    sal_Bool        WriteUnicodeOrByteText( const String& rStr )
+    sal_Bool        WriteUnicodeOrByteText( const OUString& rStr, rtl_TextEncoding eDestCharSet );
+    sal_Bool        WriteUnicodeOrByteText( const OUString& rStr )
                     { return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); }
 
     /** Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE,
@@ -653,7 +653,7 @@
 {
 private:
     StreamData*     pInstanceData;
-    String          aFilename;
+    OUString        aFilename;
     sal_uInt16      nLockCounter;
     sal_Bool        bIsOpen;
 #ifdef UNX
@@ -677,19 +677,19 @@
 
 public:
                     // Switches to Read StreamMode on failed attempt of Write opening
-                    SvFileStream( const String& rFileName, StreamMode eOpenMode );
+                    SvFileStream( const OUString& rFileName, StreamMode eOpenMode );
                     SvFileStream();
                     ~SvFileStream();
 
     virtual void    ResetError();
 
-    void            Open( const String& rFileName, StreamMode eOpenMode );
+    void            Open( const OUString& rFileName, StreamMode eOpenMode );
     void            Close();
     sal_Bool        IsOpen() const { return bIsOpen; }
     sal_Bool        IsLocked() const { return ( nLockCounter!=0 ); }
     virtual sal_uInt16 IsA() const;
 
-    const String&   GetFileName() const { return aFilename; }
+    const OUString&   GetFileName() const { return aFilename; }
 };
 
 // MemoryStream
diff --git a/include/tools/tempfile.hxx b/include/tools/tempfile.hxx
index 8ef8c57..0c279d0 100644
--- a/include/tools/tempfile.hxx
+++ b/include/tools/tempfile.hxx
@@ -19,7 +19,7 @@
 #ifndef _TOOLS_TEMPFILE_HXX
 #define _TOOLS_TEMPFILE_HXX
 
-#include <tools/string.hxx>
+#include "rtl/ustring.hxx"
 #include "tools/toolsdllapi.h"
 
 struct TempFile_Impl;
@@ -40,7 +40,7 @@
         The extension string may be f.e. ".txt" or "", if no extension string is
         given, ".tmp" is used.
     */
-    TempFile( const String& rLeadingChars, const String* pExtension=NULL );
+    TempFile( const OUString& rLeadingChars, const OUString* pExtension=NULL );
 
     /** TempFile will be removed from disk in dtor if EnableKillingTempFile was
         called before. TempDirs will be removed recursively in that case. */
@@ -49,7 +49,7 @@
     sal_Bool IsValid() const;
 
     /** Returns the real name of the tempfile in file URL scheme. */
-    String GetName() const;
+    OUString GetName() const;
 
     /** If enabled the file will be removed from disk when the dtor is called
         (default is not enabled) */
@@ -58,7 +58,7 @@
     sal_Bool IsKillingFileEnabled() const { return bKillingFileEnabled; }
 
     /** Only create a name for a temporary file that would be valid at that moment. */
-    static String   CreateTempName();
+    static OUString   CreateTempName();
 };
 
 #endif
diff --git a/include/tools/wldcrd.hxx b/include/tools/wldcrd.hxx
index 8991b88..c47d918 100644
--- a/include/tools/wldcrd.hxx
+++ b/include/tools/wldcrd.hxx
@@ -54,7 +54,7 @@
         aWildString = OUStringToOString(rString, osl_getThreadTextEncoding());
     }
 
-    sal_Bool Matches( const String& rStr ) const;
+    sal_Bool Matches( const OUString& rStr ) const;
 };
 
 #endif
diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx
index d7e66de..372374d 100644
--- a/include/unotools/calendarwrapper.hxx
+++ b/include/unotools/calendarwrapper.hxx
@@ -20,8 +20,8 @@
 #ifndef _UNOTOOLS_CALENDARWRAPPER_HXX
 #define _UNOTOOLS_CALENDARWRAPPER_HXX
 
+#include <rtl/ustring.hxx>
 #include <tools/datetime.hxx>
-#include <tools/string.hxx>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/i18n/Calendar2.hpp>
@@ -79,7 +79,7 @@
     sal_Int16 getFirstDayOfWeek() const;
     sal_Int16 getNumberOfMonthsInYear() const;
     sal_Int16 getNumberOfDaysInWeek() const;
-    String getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const;
+    OUString getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const;
 
     /** Convenience method to get timezone offset in milliseconds, taking both
         fields ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS into account. */
@@ -91,7 +91,7 @@
 
     // wrapper implementations of XExtendedCalendar
 
-    String getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
+    OUString getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
 
 
     // wrapper implementations of XCalendar3
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 6ea11f6..4c7ea5b 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -33,7 +33,6 @@
 #include <com/sun/star/i18n/XCharacterClassification.hpp>
 #include <osl/mutex.hxx>
 
-class String;
 namespace com { namespace sun { namespace star {
     namespace uno {
         class XComponentContext;
@@ -111,13 +110,13 @@
     }
 
     /// isdigit() on ascii values of entire string
-    static sal_Bool isAsciiNumeric( const String& rStr );
+    static sal_Bool isAsciiNumeric( const OUString& rStr );
 
     /// isalpha() on ascii values of entire string
-    static sal_Bool isAsciiAlpha( const String& rStr );
+    static sal_Bool isAsciiAlpha( const OUString& rStr );
 
     /// isalnum() on ascii values of entire string
-    static sal_Bool isAsciiAlphaNumeric( const String& rStr );
+    static sal_Bool isAsciiAlphaNumeric( const OUString& rStr );
 
     /// whether type is pure alpha or not, e.g. return of getStringType
     static inline sal_Bool isAlphaType( sal_Int32 nType )
@@ -178,42 +177,42 @@
         return titlecase(_rStr, 0, _rStr.getLength());
     }
 
-    sal_Int16 getType( const String& rStr, xub_StrLen nPos ) const;
-    sal_Int16 getCharacterDirection( const String& rStr, xub_StrLen nPos ) const;
-    sal_Int16 getScript( const String& rStr, xub_StrLen nPos ) const;
-    sal_Int32 getCharacterType( const String& rStr, xub_StrLen nPos ) const;
-    sal_Int32 getStringType( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const;
+    sal_Int16 getType( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Int16 getCharacterDirection( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Int16 getScript( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Int32 getCharacterType( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Int32 getStringType( const OUString& rStr, sal_Int32 nPos, sal_Int32 nCount ) const;
 
     ::com::sun::star::i18n::ParseResult parseAnyToken(
-                                    const String& rStr,
+                                    const OUString& rStr,
                                     sal_Int32 nPos,
                                     sal_Int32 nStartCharFlags,
-                                    const String& userDefinedCharactersStart,
+                                    const OUString& userDefinedCharactersStart,
                                     sal_Int32 nContCharFlags,
-                                    const String& userDefinedCharactersCont ) const;
+                                    const OUString& userDefinedCharactersCont ) const;
 
     ::com::sun::star::i18n::ParseResult parsePredefinedToken(
                                     sal_Int32 nTokenType,
-                                    const String& rStr,
+                                    const OUString& rStr,
                                     sal_Int32 nPos,
                                     sal_Int32 nStartCharFlags,
-                                    const String& userDefinedCharactersStart,
+                                    const OUString& userDefinedCharactersStart,
                                     sal_Int32 nContCharFlags,
-                                    const String& userDefinedCharactersCont ) const;
+                                    const OUString& userDefinedCharactersCont ) const;
 
 
     // Functionality of class International methods
 
-    sal_Bool isAlpha( const String& rStr, xub_StrLen nPos ) const;
-    sal_Bool isLetter( const String& rStr, xub_StrLen nPos ) const;
-    sal_Bool isDigit( const String& rStr, xub_StrLen nPos ) const;
-    sal_Bool isAlphaNumeric( const String& rStr, xub_StrLen nPos ) const;
-    sal_Bool isLetterNumeric( const String& rStr, xub_StrLen nPos ) const;
-    sal_Bool isAlpha( const String& rStr ) const;
-    sal_Bool isLetter( const String& rStr ) const;
-    sal_Bool isNumeric( const String& rStr ) const;
-    sal_Bool isAlphaNumeric( const String& rStr ) const;
-    sal_Bool isLetterNumeric( const String& rStr ) const;
+    sal_Bool isAlpha( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Bool isLetter( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Bool isDigit( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Bool isAlphaNumeric( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Bool isLetterNumeric( const OUString& rStr, sal_Int32 nPos ) const;
+    sal_Bool isAlpha( const OUString& rStr ) const;
+    sal_Bool isLetter( const OUString& rStr ) const;
+    sal_Bool isNumeric( const OUString& rStr ) const;
+    sal_Bool isAlphaNumeric( const OUString& rStr ) const;
+    sal_Bool isLetterNumeric( const OUString& rStr ) const;
 
 private:
 
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index c0a4165..ae2c031 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -63,7 +63,7 @@
 
 class RscTypCont
 {
-    CharSet             nSourceCharSet;
+    rtl_TextEncoding    nSourceCharSet;
     sal_uInt32          nMachineId;         // Globaler Maschinentyp
     RSCBYTEORDER_TYPE   nByteOrder;         // Intel oder
     OString        aLanguage;          // output language
@@ -306,10 +306,10 @@
     { return aLangFallbacks; }
 
     RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
-    CharSet         GetSourceCharSet() const { return nSourceCharSet; }
-    CharSet         SetSourceCharSet( CharSet aCharSet )
+    rtl_TextEncoding         GetSourceCharSet() const { return nSourceCharSet; }
+    rtl_TextEncoding         SetSourceCharSet( rtl_TextEncoding aCharSet )
     {
-        CharSet aOld = nSourceCharSet;
+        rtl_TextEncoding aOld = nSourceCharSet;
         nSourceCharSet = aCharSet;
         return aOld;
     }
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index 8373ec6..d67787e 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -262,26 +262,28 @@
 /* Compilerstack */
 
 %union {
-	Atom			varid;
-	struct {
-		Atom			hashid;
-		sal_Int32			nValue;
-	}				constname;
-	RscTop *		pClass;
-	RSCHEADER		header;
-	struct {
-		CLASS_DATA	pData;
-		RscTop *	pClass;
-	}				instance;
-	sal_Int32			value;
-	sal_uInt16			ushort;
-	short			exp_short;
-	char *			string;
-	sal_Bool			svbool;
-	REF_ENUM		copyref;
-	RscDefine	  * defineele;
-	CharSet 		charset;
-	RscExpType		macrostruct;
+	Atom varid;
+	struct
+        {
+            Atom hashid;
+            sal_Int32 nValue;
+	} constname;
+	RscTop* pClass;
+	RSCHEADER header;
+	struct
+        {
+            CLASS_DATA pData;
+            RscTop* pClass;
+	} instance;
+	sal_Int32 value;
+	sal_uInt16 ushort;
+	short exp_short;
+	char* string;
+	sal_Bool svbool;
+	REF_ENUM copyref;
+	RscDefine* defineele;
+	rtl_TextEncoding charset;
+	RscExpType macrostruct;
 }
 
 /* Token */
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 3db7ac0..7b093f4 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -406,26 +406,24 @@
             pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
 
             OUString sQuote('"');
-            String sTempMiddle(sQuote);
-            sTempMiddle += sal_Unicode(9);
 
-            String sLine;
+            OUString sLine;
             sal_Bool bRead = pStream->ReadByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
 
             if(bRead)
             {
                 //header line
-                xub_StrLen nHeaders = comphelper::string::getTokenCount(sLine, '\t');
+                sal_Int32 nHeaders = comphelper::string::getTokenCount(sLine, '\t');
                 sal_Int32 nIndex = 0;
-                for( xub_StrLen nToken = 0; nToken < nHeaders; ++nToken)
+                for( sal_Int32 nToken = 0; nToken < nHeaders; ++nToken)
                 {
-                    String sHeader = sLine.GetToken( 0, '\t', nIndex );
-                    OSL_ENSURE(sHeader.Len() > 2 &&
-                            sHeader.GetChar(0) == '\"' && sHeader.GetChar(sHeader.Len() - 1) == '\"',
+                    OUString sHeader = sLine.getToken( 0, '\t', nIndex );
+                    OSL_ENSURE(sHeader.getLength() > 2 &&
+                            sHeader[0] == '\"' && sHeader[sHeader.getLength() - 1] == '\"',
                             "Wrong format of header");
-                    if(sHeader.Len() > 2)
+                    if(sHeader.getLength() > 2)
                     {
-                        m_pCSVData->aDBColumnHeaders.push_back( sHeader.Copy(1, sHeader.Len() -2));
+                        m_pCSVData->aDBColumnHeaders.push_back( sHeader.copy(1, sHeader.getLength() -2));
                     }
                 }
             }
@@ -433,16 +431,16 @@
             {
                 ::std::vector<OUString> aNewData;
                 //analyze data line
-                xub_StrLen nDataCount = comphelper::string::getTokenCount(sLine, '\t');
+                sal_Int32 nDataCount = comphelper::string::getTokenCount(sLine, '\t');
                 sal_Int32 nIndex = 0;
-                for( xub_StrLen nToken = 0; nToken < nDataCount; ++nToken)
+                for( sal_Int32 nToken = 0; nToken < nDataCount; ++nToken)
                 {
-                    String sData = sLine.GetToken( 0, '\t', nIndex );
-                    OSL_ENSURE(sData.Len() >= 2 &&
-                                sData.GetChar(0) == '\"' && sData.GetChar(sData.Len() - 1) == '\"',
+                    OUString sData = sLine.getToken( 0, '\t', nIndex );
+                    OSL_ENSURE(sData.getLength() >= 2 &&
+                                sData[0] == '\"' && sData[sData.getLength() - 1] == '\"',
                             "Wrong format of line");
-                    if(sData.Len() >= 2)
-                        aNewData.push_back(sData.Copy(1, sData.Len() - 2));
+                    if(sData.getLength() >= 2)
+                        aNewData.push_back(sData.copy(1, sData.getLength() - 2));
                     else
                         aNewData.push_back(sData);
                 }
@@ -458,7 +456,7 @@
         for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader)
             m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
         ::std::vector<OUString> aNewData;
-        String sTemp;
+        OUString sTemp;
         aNewData.insert(aNewData.begin(), nCount, sTemp);
         m_pCSVData->aDBData.push_back(aNewData);
     }
@@ -480,7 +478,7 @@
 {
     sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
     ::std::vector<OUString> aNewData;
-    String sTemp;
+    OUString sTemp;
     aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), sTemp);
     m_pCSVData->aDBData.insert(m_pCSVData->aDBData.begin() + ++nCurrent, aNewData);
     m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
@@ -504,7 +502,7 @@
     else
     {
         // if only one set is available then clear the data
-        String sTemp;
+        OUString sTemp;
         m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
         m_aDeletePB.Enable(sal_False);
     }
@@ -565,8 +563,8 @@
         sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
         uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
 
-        String sPath( SvtPathOptions().SubstituteVariable(
-                    OUString("$(userurl)/database") ));
+        OUString sPath( SvtPathOptions().SubstituteVariable(
+                                OUString("$(userurl)/database") ));
         aDlgHelper.SetDisplayDirectory( sPath );
         uno::Reference< XFilterManager > xFltMgr(xFP, uno::UNO_QUERY);
         OUString sCSV("*.csv");
@@ -589,10 +587,7 @@
         pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
 
         OUString sQuote('"');
-        String sTempMiddle(sQuote);
-        sTempMiddle += sal_Unicode(9);
-        OUString sMiddle(sTempMiddle);
-        sMiddle += sQuote;
+        OUString sMiddle("\"\0x09\"");
 
         //create a string for the header line
         OUString sLine(sQuote);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 783d38d..833b852 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -4103,33 +4103,33 @@
     rtl_TextEncoding  eTEnc = osl_getThreadTextEncoding();
     while( !rInStr.GetError() && !rInStr.IsEof() )
     {
-        String sLine;
+        OUString sLine;
         rInStr.ReadByteStringLine( sLine, eTEnc );
 
         // # -> comment
         // ; -> delimiter between entries ->
         // Format: TextToSearchFor;AlternativeString;PrimaryKey;SecondaryKey
         // Leading and trailing blanks are ignored
-        if( sLine.Len() )
+        if( !sLine.isEmpty() )
         {
             //comments are contained in separate lines but are put into the struct of the following data
             //line (if available)
-            if( '#' != sLine.GetChar(0) )
+            if( '#' != sLine[0] )
             {
                 if( !pToInsert )
                     pToInsert = new AutoMarkEntry;
 
                 sal_Int32 nSttPos = 0;
-                pToInsert->sSearch      = sLine.GetToken(0, ';', nSttPos );
-                pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos );
-                pToInsert->sPrimKey     = sLine.GetToken(0, ';', nSttPos );
-                pToInsert->sSecKey      = sLine.GetToken(0, ';', nSttPos );
+                pToInsert->sSearch      = sLine.getToken(0, ';', nSttPos );
+                pToInsert->sAlternative = sLine.getToken(0, ';', nSttPos );
+                pToInsert->sPrimKey     = sLine.getToken(0, ';', nSttPos );
+                pToInsert->sSecKey      = sLine.getToken(0, ';', nSttPos );
 
-                String sStr = sLine.GetToken(0, ';', nSttPos );
-                pToInsert->bCase = sStr.Len() && !comphelper::string::equals(sStr, '0');
+                OUString sStr = sLine.getToken(0, ';', nSttPos );
+                pToInsert->bCase = !sStr.isEmpty() && !comphelper::string::equals(sStr, '0');
 
-                sStr = sLine.GetToken(0, ';', nSttPos );
-                pToInsert->bWord = sStr.Len() && !comphelper::string::equals(sStr, '0');
+                sStr = sLine.getToken(0, ';', nSttPos );
+                pToInsert->bWord = !sStr.isEmpty() && !comphelper::string::equals(sStr, '0');
 
                 aEntryArr.push_back( pToInsert );
                 pToInsert = 0;
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index fecb485..412612f 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -754,7 +754,7 @@
     const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat(
             OUString( FILTER_XML ),
             SwDocShell::Factory().GetFilterContainer() );
-    String aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*'));
+    OUString aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*'));
     TempFile aTempFile( OUString("SwMM"), &aExtension );
     aTmpFileName = aTempFile.GetName();
 
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index 1aaac18..14d6dc0 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -34,7 +34,7 @@
 
 struct TempFile_Impl
 {
-    String      aName;
+    OUString      aName;
 };
 
 OUString ConstructTempDir_Impl()
@@ -52,16 +52,16 @@
     return aName;
 }
 
-void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_True )
+void CreateTempName_Impl( OUString& rName, sal_Bool bKeep, sal_Bool bDir = sal_True )
 {
     // add a suitable tempname
     // Prefix can have 5 chars, leaving 3 for numbers. 26 ** 3 == 17576
     // ER 13.07.00  why not radix 36 [0-9A-Z] ?!?
     const unsigned nRadix = 26;
-    String aName( rName );
+    OUString aName( rName );
     aName += OUString("sv");
 
-    rName.Erase();
+    rName = "";
     static unsigned long u = Time::GetSystemTicks();
     for ( unsigned long nOld = u; ++u != nOld; )
     {
@@ -107,10 +107,10 @@
     }
 }
 
-String TempFile::CreateTempName()
+OUString TempFile::CreateTempName()
 {
     // get correct directory
-    String aName = ConstructTempDir_Impl();
+    OUString aName = ConstructTempDir_Impl();
 
     // get TempFile name with default naming scheme
     CreateTempName_Impl( aName, sal_False );
@@ -129,12 +129,12 @@
     CreateTempName_Impl( pImp->aName, sal_True, false );
 }
 
-TempFile::TempFile( const String& rLeadingChars, const String* pExtension )
+TempFile::TempFile( const OUString& rLeadingChars, const OUString* pExtension )
     : pImp( new TempFile_Impl )
     , bKillingFileEnabled( sal_False )
 {
     // get correct directory
-    String aName = ConstructTempDir_Impl();
+    OUString aName = ConstructTempDir_Impl();
 
     // now use special naming scheme ( name takes leading chars and an index counting up from zero
     aName += rLeadingChars;
@@ -172,7 +172,7 @@
     delete pImp;
 }
 
-String TempFile::GetName() const
+OUString TempFile::GetName() const
 {
     OUString aTmp;
     aTmp = pImp->aName;
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index a38c66e..88747ab 100644
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -86,7 +86,7 @@
     return ( *pStr == '\0' ) && ( *pWild == '\0' );
 }
 
-sal_Bool WildCard::Matches( const String& rString ) const
+sal_Bool WildCard::Matches( const OUString& rString ) const
 {
     OString aTmpWild = aWildString;
     OString aString(OUStringToOString(rString, osl_getThreadTextEncoding()));
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 7104fe2..098c44a 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -17,12 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <math.h>
+#include <rtl/ustring.hxx>
 
 #include <tools/tools.h>
 #include <tools/bigint.hxx>
-#include <tools/string.hxx>
 
+#include <math.h>
 #include <string.h>
 #include <ctype.h>
 
@@ -608,7 +608,7 @@
 
 OUString BigInt::GetString() const
 {
-    String aString;
+    OUString aString;
 
     if ( !bIsBig )
         aString = OUString::number( nVal );
@@ -624,19 +624,21 @@
             a    %= a1000000000;
             aTmp /= a1000000000;
 
-            String aStr = aString;
+            OUString aStr = aString;
             if ( a.nVal < 100000000L )
             { // leading 0s
                 aString = OUString::number( a.nVal + 1000000000L );
-                aString.Erase(0,1);
+                aString = OUString(aString.getStr() + 1, aString.getLength() - 1);
             }
             else
+            {
                 aString = OUString::number( a.nVal );
+            }
             aString += aStr;
         }
         while( aTmp.bIsBig );
 
-        String aStr = aString;
+        OUString aStr = aString;
         if ( bIsNeg )
             aString = OUString::number( -aTmp.nVal );
         else
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 317fe1d..801b26c 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -63,16 +63,19 @@
     sal_Bool            mbIsUTF8BOM;
 };
 
-static String toUncPath( const String& rPath )
+static OUString toUncPath( const OUString& rPath )
 {
     OUString aFileURL;
 
     // check if rFileName is already a URL; if not make it so
-    if( rPath.CompareToAscii( "file://", 7 ) == COMPARE_EQUAL )
+    if( rPath.compareToAscii( "file://") == 0 )
+    {
         aFileURL = rPath;
+    }
     else if( ::osl::FileBase::getFileURLFromSystemPath( rPath, aFileURL ) != ::osl::FileBase::E_None )
+    {
         aFileURL = rPath;
-
+    }
     return aFileURL;
 }
 
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index 120a1db..2a70cd9 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -84,7 +84,7 @@
     const OUString &rValue,
     sal_uIntPtr &rnIndex)
 {
-    INetMIMEStringOutputSink aSink (0, STRING_MAXLEN);
+    INetMIMEStringOutputSink aSink (0, 32767); /* Fixme: why do we have to give a 'limit' ? */
     INetMIME::writeHeaderFieldBody (
         aSink, eType, rValue, osl_getThreadTextEncoding(), false);
     SetHeaderField_Impl (
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index 9bef89c..8c3eaaf 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -1123,23 +1123,23 @@
 }
 
 INetMessageEncoding
-INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
+INetMIMEMessageStream::GetMsgEncoding (const OUString& rContentType)
 {
-    if ((rContentType.CompareIgnoreCaseToAscii ("message"  , 7) == 0) ||
-        (rContentType.CompareIgnoreCaseToAscii ("multipart", 9) == 0)    )
+    if ((rContentType.compareToIgnoreAsciiCase("message") == 0) ||
+        (rContentType.compareToIgnoreAsciiCase("multipart") == 0)    )
         return INETMSG_ENCODING_7BIT;
 
-    if (rContentType.CompareIgnoreCaseToAscii ("text", 4) == 0)
+    if (rContentType.compareToIgnoreAsciiCase("text") == 0)
     {
-        if (rContentType.CompareIgnoreCaseToAscii ("text/plain", 10) == 0)
+        if (rContentType.compareToIgnoreAsciiCase("text/plain") == 0)
         {
             if (comphelper::string::getTokenCount(rContentType, '=') > 1)
             {
-                String aCharset (rContentType.GetToken (1, '='));
+                OUString aCharset (rContentType.getToken (1, '='));
                 aCharset = comphelper::string::stripStart(aCharset, ' ');
                 aCharset = comphelper::string::stripStart(aCharset, '"');
 
-                if (aCharset.CompareIgnoreCaseToAscii ("us-ascii", 8) == 0)
+                if (aCharset.compareToIgnoreAsciiCase("us-ascii") == 0)
                     return INETMSG_ENCODING_7BIT;
                 else
                     return INETMSG_ENCODING_QUOTED;
@@ -1169,11 +1169,11 @@
             // Prepare special header fields.
             if (pMsg->GetParent())
             {
-                String aPCT (pMsg->GetParent()->GetContentType());
-                if (aPCT.CompareIgnoreCaseToAscii ("message/rfc822", 14) == 0)
+                OUString aPCT (pMsg->GetParent()->GetContentType());
+                if (aPCT.compareToIgnoreAsciiCase("message/rfc822") == 0)
                     pMsg->SetMIMEVersion ("1.0");
                 else
-                    pMsg->SetMIMEVersion (String());
+                    pMsg->SetMIMEVersion (OUString());
             }
             else
             {
@@ -1181,8 +1181,8 @@
             }
 
             // Check ContentType.
-            String aContentType (pMsg->GetContentType());
-            if (aContentType.Len())
+            OUString aContentType (pMsg->GetContentType());
+            if (!aContentType.isEmpty())
             {
                 // Determine default Content-Type.
                 OUString aDefaultType = pMsg->GetDefaultContentType();
@@ -1190,20 +1190,20 @@
                 if (aDefaultType.equalsIgnoreAsciiCase(aContentType))
                 {
                     // No need to specify default.
-                    pMsg->SetContentType (String());
+                    pMsg->SetContentType (OUString());
                 }
             }
 
             // Check Encoding.
-            String aEncoding (pMsg->GetContentTransferEncoding());
-            if (aEncoding.Len())
+            OUString aEncoding (pMsg->GetContentTransferEncoding());
+            if (!aEncoding.isEmpty())
             {
                 // Use given Encoding.
-                if (aEncoding.CompareIgnoreCaseToAscii (
-                    "base64", 6) == 0)
+                if (aEncoding.compareToIgnoreAsciiCase(
+                    "base64") == 0)
                     eEncoding = INETMSG_ENCODING_BASE64;
-                else if (aEncoding.CompareIgnoreCaseToAscii (
-                    "quoted-printable", 16) == 0)
+                else if (aEncoding.compareToIgnoreAsciiCase(
+                    "quoted-printable") == 0)
                     eEncoding = INETMSG_ENCODING_QUOTED;
                 else
                     eEncoding = INETMSG_ENCODING_7BIT;
@@ -1211,7 +1211,7 @@
             else
             {
                 // Use default Encoding for (given|default) Content-Type.
-                if (aContentType.Len() == 0)
+                if (aContentType.isEmpty())
                 {
                     // Determine default Content-Type.
                     aContentType = pMsg->GetDefaultContentType();
@@ -1233,7 +1233,7 @@
             else
             {
                 // No need to specify default.
-                pMsg->SetContentTransferEncoding (String());
+                pMsg->SetContentTransferEncoding(OUString());
             }
 
             // Mark we're done.
@@ -1569,12 +1569,12 @@
 
             if (eEncoding == INETMSG_ENCODING_BINARY)
             {
-                String aEncoding (pMsg->GetContentTransferEncoding());
-                if (aEncoding.CompareIgnoreCaseToAscii (
-                    "base64", 6) == COMPARE_EQUAL)
+                OUString aEncoding (pMsg->GetContentTransferEncoding());
+                if (aEncoding.compareToIgnoreAsciiCase(
+                    "base64") == 0)
                     eEncoding = INETMSG_ENCODING_BASE64;
-                else if (aEncoding.CompareIgnoreCaseToAscii (
-                    "quoted-printable", 16) == COMPARE_EQUAL)
+                else if (aEncoding.compareToIgnoreAsciiCase(
+                    "quoted-printable") == 0)
                     eEncoding = INETMSG_ENCODING_QUOTED;
                 else
                     eEncoding = INETMSG_ENCODING_7BIT;
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 1ed7b0e..842d6eb 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -220,12 +220,12 @@
     memcpy( pImp->szData, pData, sizeof( pImp->szData ) );
 }
 
-sal_Bool SvGlobalName::MakeId( const String & rIdStr )
+sal_Bool SvGlobalName::MakeId( const OUString & rIdStr )
 {
     OString aStr(OUStringToOString(rIdStr,
         RTL_TEXTENCODING_ASCII_US));
     const sal_Char *pStr = aStr.getStr();
-    if( rIdStr.Len() == 36
+    if( rIdStr.getLength() == 36
       && '-' == pStr[ 8 ]  && '-' == pStr[ 13 ]
       && '-' == pStr[ 18 ] && '-' == pStr[ 23 ] )
     {
@@ -298,7 +298,7 @@
     return sal_False;
 }
 
-String SvGlobalName::GetHexName() const
+OUString SvGlobalName::GetHexName() const
 {
     OStringBuffer aHexBuffer;
 
diff --git a/tools/source/stream/cachestr.cxx b/tools/source/stream/cachestr.cxx
index e8d34fd..d7426a4 100644
--- a/tools/source/stream/cachestr.cxx
+++ b/tools/source/stream/cachestr.cxx
@@ -52,7 +52,7 @@
 {
     if( pCurrentStream != pSwapStream )
     {
-        if( !pSwapStream && !aFileName.Len() )
+        if( !pSwapStream && aFileName.isEmpty() )
         {
             pTempFile = new TempFile;
             aFileName = pTempFile->GetName();
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index e802566..84df34b 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -527,7 +527,7 @@
     return bRet;
 }
 
-sal_Bool SvStream::ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet )
+sal_Bool SvStream::ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet )
 {
     OString aStr;
     sal_Bool bRet = ReadLine(aStr);
@@ -772,11 +772,11 @@
     return nWritten;
 }
 
-sal_Bool SvStream::WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet )
+sal_Bool SvStream::WriteUnicodeOrByteText( const OUString& rStr, rtl_TextEncoding eDestCharSet )
 {
     if ( eDestCharSet == RTL_TEXTENCODING_UNICODE )
     {
-        write_uInt16s_FromOUString(*this, rStr, rStr.Len());
+        write_uInt16s_FromOUString(*this, rStr, rStr.getLength());
         return nError == SVSTREAM_OK;
     }
     else
@@ -787,7 +787,7 @@
     }
 }
 
-sal_Bool SvStream::WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet )
+sal_Bool SvStream::WriteByteStringLine( const OUString& rStr, rtl_TextEncoding eDestCharSet )
 {
     return WriteLine(OUStringToOString(rStr, eDestCharSet));
 }
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 65b051a..c453239 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -294,7 +294,7 @@
     return nRetVal;
 }
 
-SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
+SvFileStream::SvFileStream( const OUString& rFileName, StreamMode nOpenMode )
 {
     bIsOpen             = sal_False;
     nLockCounter        = 0;
@@ -492,7 +492,7 @@
     return UnlockRange( 0UL, 0UL );
 }
 
-void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
+void SvFileStream::Open( const OUString& rFilename, StreamMode nOpenMode )
 {
     sal_uInt32 uFlags;
     oslFileHandle nHandleTmp;
diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx
index b31176c..2006b26 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -67,32 +67,32 @@
 class SvtDefaultOptions_Impl : public utl::ConfigItem
 {
 public:
-    String          m_aAddinPath;
-    String          m_aAutoCorrectPath;
-    String          m_aAutoTextPath;
-    String          m_aBackupPath;
-    String          m_aBasicPath;
-    String          m_aBitmapPath;
-    String          m_aConfigPath;
-    String          m_aDictionaryPath;
-    String          m_aFavoritesPath;
-    String          m_aFilterPath;
-    String          m_aGalleryPath;
-    String          m_aGraphicPath;
-    String          m_aHelpPath;
-    String          m_aLinguisticPath;
-    String          m_aModulePath;
-    String          m_aPalettePath;
-    String          m_aPluginPath;
-    String          m_aTempPath;
-    String          m_aTemplatePath;
-    String          m_aUserConfigPath;
-    String          m_aWorkPath;
-    String          m_aUserDictionaryPath;
+    OUString        m_aAddinPath;
+    OUString        m_aAutoCorrectPath;
+    OUString        m_aAutoTextPath;
+    OUString        m_aBackupPath;
+    OUString        m_aBasicPath;
+    OUString        m_aBitmapPath;
+    OUString        m_aConfigPath;
+    OUString        m_aDictionaryPath;
+    OUString        m_aFavoritesPath;
+    OUString        m_aFilterPath;
+    OUString        m_aGalleryPath;
+    OUString        m_aGraphicPath;
+    OUString        m_aHelpPath;
+    OUString        m_aLinguisticPath;
+    OUString        m_aModulePath;
+    OUString        m_aPalettePath;
+    OUString        m_aPluginPath;
+    OUString        m_aTempPath;
+    OUString        m_aTemplatePath;
+    OUString        m_aUserConfigPath;
+    OUString        m_aWorkPath;
+    OUString        m_aUserDictionaryPath;
 
                     SvtDefaultOptions_Impl();
 
-    String          GetDefaultPath( sal_uInt16 nId ) const;
+    OUString        GetDefaultPath( sal_uInt16 nId ) const;
     virtual void    Commit();
     virtual void    Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames);
 };
@@ -102,7 +102,7 @@
 static SvtDefaultOptions_Impl*  pOptions = NULL;
 static sal_Int32                nRefCount = 0;
 
-typedef String SvtDefaultOptions_Impl:: *PathStrPtr;
+typedef OUString SvtDefaultOptions_Impl:: *PathStrPtr;
 
 struct PathToDefaultMapping_Impl
 {
@@ -185,7 +185,7 @@
 
 // class SvtDefaultOptions_Impl ------------------------------------------
 
-String SvtDefaultOptions_Impl::GetDefaultPath( sal_uInt16 nId ) const
+OUString SvtDefaultOptions_Impl::GetDefaultPath( sal_uInt16 nId ) const
 {
     OUString aRet;
     sal_uInt16 nIdx = 0;
@@ -277,28 +277,28 @@
 
                 switch ( nProp )
                 {
-                    case DEFAULTPATH__ADDIN:            m_aAddinPath = String( aFullPath );         break;
-                    case DEFAULTPATH__AUTOCORRECT:      m_aAutoCorrectPath = String( aFullPath );   break;
-                    case DEFAULTPATH__AUTOTEXT:         m_aAutoTextPath = String( aFullPath );      break;
-                    case DEFAULTPATH__BACKUP:           m_aBackupPath = String( aFullPath );        break;
-                    case DEFAULTPATH__BASIC:            m_aBasicPath = String( aFullPath );         break;
-                    case DEFAULTPATH__BITMAP:           m_aBitmapPath = String( aFullPath );        break;
-                    case DEFAULTPATH__CONFIG:           m_aConfigPath = String( aFullPath );        break;
-                    case DEFAULTPATH__DICTIONARY:       m_aDictionaryPath = String( aFullPath );    break;
-                    case DEFAULTPATH__FAVORITES:        m_aFavoritesPath = String( aFullPath );     break;
-                    case DEFAULTPATH__FILTER:           m_aFilterPath = String( aFullPath );        break;
-                    case DEFAULTPATH__GALLERY:          m_aGalleryPath = String( aFullPath );       break;
-                    case DEFAULTPATH__GRAPHIC:          m_aGraphicPath = String( aFullPath );       break;
-                    case DEFAULTPATH__HELP:             m_aHelpPath = String( aFullPath );          break;
-                    case DEFAULTPATH__LINGUISTIC:       m_aLinguisticPath = String( aFullPath );    break;
-                    case DEFAULTPATH__MODULE:           m_aModulePath = String( aFullPath );        break;
-                    case DEFAULTPATH__PALETTE:          m_aPalettePath = String( aFullPath );       break;
-                    case DEFAULTPATH__PLUGIN:           m_aPluginPath = String( aFullPath );        break;
-                    case DEFAULTPATH__TEMP:             m_aTempPath = String( aFullPath );          break;
-                    case DEFAULTPATH__TEMPLATE:         m_aTemplatePath = String( aFullPath );      break;
-                    case DEFAULTPATH__USERCONFIG:       m_aUserConfigPath = String( aFullPath );    break;
-                    case DEFAULTPATH__WORK:             m_aWorkPath = String( aFullPath );          break;
-                    case DEFAULTPATH__USERDICTIONARY:   m_aUserDictionaryPath = String( aFullPath );break;
+                    case DEFAULTPATH__ADDIN:            m_aAddinPath = OUString( aFullPath );         break;
+                    case DEFAULTPATH__AUTOCORRECT:      m_aAutoCorrectPath = OUString( aFullPath );   break;
+                    case DEFAULTPATH__AUTOTEXT:         m_aAutoTextPath = OUString( aFullPath );      break;
+                    case DEFAULTPATH__BACKUP:           m_aBackupPath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__BASIC:            m_aBasicPath = OUString( aFullPath );         break;
+                    case DEFAULTPATH__BITMAP:           m_aBitmapPath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__CONFIG:           m_aConfigPath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__DICTIONARY:       m_aDictionaryPath = OUString( aFullPath );    break;
+                    case DEFAULTPATH__FAVORITES:        m_aFavoritesPath = OUString( aFullPath );     break;
+                    case DEFAULTPATH__FILTER:           m_aFilterPath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__GALLERY:          m_aGalleryPath = OUString( aFullPath );       break;
+                    case DEFAULTPATH__GRAPHIC:          m_aGraphicPath = OUString( aFullPath );       break;
+                    case DEFAULTPATH__HELP:             m_aHelpPath = OUString( aFullPath );          break;
+                    case DEFAULTPATH__LINGUISTIC:       m_aLinguisticPath = OUString( aFullPath );    break;
+                    case DEFAULTPATH__MODULE:           m_aModulePath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__PALETTE:          m_aPalettePath = OUString( aFullPath );       break;
+                    case DEFAULTPATH__PLUGIN:           m_aPluginPath = OUString( aFullPath );        break;
+                    case DEFAULTPATH__TEMP:             m_aTempPath = OUString( aFullPath );          break;
+                    case DEFAULTPATH__TEMPLATE:         m_aTemplatePath = OUString( aFullPath );      break;
+                    case DEFAULTPATH__USERCONFIG:       m_aUserConfigPath = OUString( aFullPath );    break;
+                    case DEFAULTPATH__WORK:             m_aWorkPath = OUString( aFullPath );          break;
+                    case DEFAULTPATH__USERDICTIONARY:   m_aUserDictionaryPath = OUString( aFullPath );break;
 
                     default:
                         SAL_WARN( "unotools.config", "invalid index to load a default path" );
diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx
index 700a8d0..5c5832e 100644
--- a/unotools/source/i18n/calendarwrapper.cxx
+++ b/unotools/source/i18n/calendarwrapper.cxx
@@ -379,7 +379,7 @@
 }
 
 
-String CalendarWrapper::getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const
+OUString CalendarWrapper::getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const
 {
     try
     {
@@ -390,13 +390,13 @@
     {
         SAL_WARN( "unotools.i18n", "getDisplayName: Exception caught " << e.Message );
     }
-    return String();
+    return OUString();
 }
 
 
 // --- XExtendedCalendar -----------------------------------------------------
 
-String CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const
+OUString CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const
 {
     try
     {
@@ -407,7 +407,7 @@
     {
         SAL_WARN( "unotools.i18n", "getDisplayString: Exception caught " << e.Message );
     }
-    return String();
+    return OUString();
 }
 
 
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx
index cd8d036..f2cd0d1 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -77,12 +77,12 @@
 
 
 // static
-sal_Bool CharClass::isAsciiNumeric( const String& rStr )
+sal_Bool CharClass::isAsciiNumeric( const OUString& rStr )
 {
-    if ( !rStr.Len() )
+    if ( rStr.isEmpty() )
         return sal_False;
-    register const sal_Unicode* p = rStr.GetBuffer();
-    register const sal_Unicode* const pStop = p + rStr.Len();
+    register const sal_Unicode* p = rStr.getStr();
+    register const sal_Unicode* const pStop = p + rStr.getLength();
     do
     {
         if ( !isAsciiDigit( *p ) )
@@ -93,12 +93,12 @@
 
 
 // static
-sal_Bool CharClass::isAsciiAlpha( const String& rStr )
+sal_Bool CharClass::isAsciiAlpha( const OUString& rStr )
 {
-    if ( !rStr.Len() )
+    if ( rStr.isEmpty() )
         return sal_False;
-    register const sal_Unicode* p = rStr.GetBuffer();
-    register const sal_Unicode* const pStop = p + rStr.Len();
+    register const sal_Unicode* p = rStr.getStr();
+    register const sal_Unicode* const pStop = p + rStr.getLength();
     do
     {
         if ( !isAsciiAlpha( *p ) )
@@ -109,9 +109,9 @@
 
 
 
-sal_Bool CharClass::isAlpha( const String& rStr, xub_StrLen nPos ) const
+sal_Bool CharClass::isAlpha( const OUString& rStr, sal_Int32 nPos ) const
 {
-    sal_Unicode c = rStr.GetChar( nPos );
+    sal_Unicode c = rStr[ nPos ];
     if ( c < 128 )
         return isAsciiAlpha( c );
 
@@ -132,9 +132,9 @@
 
 
 
-sal_Bool CharClass::isLetter( const String& rStr, xub_StrLen nPos ) const
+sal_Bool CharClass::isLetter( const OUString& rStr, sal_Int32 nPos ) const
 {
-    sal_Unicode c = rStr.GetChar( nPos );
+    sal_Unicode c = rStr[ nPos ];
     if ( c < 128 )
         return isAsciiAlpha( c );
 
@@ -154,12 +154,12 @@
 }
 
 
-sal_Bool CharClass::isLetter( const String& rStr ) const
+sal_Bool CharClass::isLetter( const OUString& rStr ) const
 {
     try
     {
         if ( xCC.is() )
-            return isLetterType( xCC->getStringType( rStr, 0, rStr.Len(), getMyLocale() ) );
+            return isLetterType( xCC->getStringType( rStr, 0, rStr.getLength(), getMyLocale() ) );
         else
             return sal_False;
     }
@@ -171,9 +171,9 @@
 }
 
 
-sal_Bool CharClass::isDigit( const String& rStr, xub_StrLen nPos ) const
+sal_Bool CharClass::isDigit( const OUString& rStr, sal_Int32 nPos ) const
 {
-    sal_Unicode c = rStr.GetChar( nPos );
+    sal_Unicode c = rStr[nPos];
     if ( c < 128 )
         return isAsciiDigit( c );
 
@@ -193,12 +193,12 @@
 }
 
 
-sal_Bool CharClass::isNumeric( const String& rStr ) const
+sal_Bool CharClass::isNumeric( const OUString& rStr ) const
 {
     try
     {
         if ( xCC.is() )
-            return isNumericType( xCC->getStringType( rStr, 0, rStr.Len(), getMyLocale() ) );
+            return isNumericType( xCC->getStringType( rStr, 0, rStr.getLength(), getMyLocale() ) );
         else
             return sal_False;
     }
@@ -210,9 +210,9 @@
 }
 
 
-sal_Bool CharClass::isAlphaNumeric( const String& rStr, xub_StrLen nPos ) const
+sal_Bool CharClass::isAlphaNumeric( const OUString& rStr, sal_Int32 nPos ) const
 {
-    sal_Unicode c = rStr.GetChar( nPos );
+    sal_Unicode c = rStr[nPos];
     if ( c < 128 )
         return isAsciiAlphaNumeric( c );
 
@@ -232,9 +232,9 @@
 }
 
 
-sal_Bool CharClass::isLetterNumeric( const String& rStr, xub_StrLen nPos ) const
+sal_Bool CharClass::isLetterNumeric( const OUString& rStr, sal_Int32 nPos ) const
 {
-    sal_Unicode c = rStr.GetChar( nPos );
+    sal_Unicode c = rStr[nPos];
     if ( c < 128 )
         return isAsciiAlphaNumeric( c );
 
@@ -254,12 +254,12 @@
 }
 
 
-sal_Bool CharClass::isLetterNumeric( const String& rStr ) const
+sal_Bool CharClass::isLetterNumeric( const OUString& rStr ) const
 {
     try
     {
         if ( xCC.is() )
-            return isLetterNumericType( xCC->getStringType( rStr, 0, rStr.Len(), getMyLocale() ) );
+            return isLetterNumericType( xCC->getStringType( rStr, 0, rStr.getLength(), getMyLocale() ) );
         else
             return sal_False;
     }
@@ -318,7 +318,7 @@
     }
 }
 
-sal_Int16 CharClass::getType( const String& rStr, xub_StrLen nPos ) const
+sal_Int16 CharClass::getType( const OUString& rStr, sal_Int32 nPos ) const
 {
     try
     {
@@ -335,7 +335,7 @@
 }
 
 
-sal_Int16 CharClass::getCharacterDirection( const String& rStr, xub_StrLen nPos ) const
+sal_Int16 CharClass::getCharacterDirection( const OUString& rStr, sal_Int32 nPos ) const
 {
     try
     {
@@ -352,7 +352,7 @@
 }
 
 
-sal_Int16 CharClass::getScript( const String& rStr, xub_StrLen nPos ) const
+sal_Int16 CharClass::getScript( const OUString& rStr, sal_Int32 nPos ) const
 {
     try
     {
@@ -369,7 +369,7 @@
 }
 
 
-sal_Int32 CharClass::getCharacterType( const String& rStr, xub_StrLen nPos ) const
+sal_Int32 CharClass::getCharacterType( const OUString& rStr, sal_Int32 nPos ) const
 {
     try
     {
@@ -386,7 +386,7 @@
 }
 
 
-sal_Int32 CharClass::getStringType( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const
+sal_Int32 CharClass::getStringType( const OUString& rStr, sal_Int32 nPos, sal_Int32 nCount ) const
 {
     try
     {
@@ -404,12 +404,12 @@
 
 
 ::com::sun::star::i18n::ParseResult CharClass::parseAnyToken(
-            const String& rStr,
+            const OUString& rStr,
             sal_Int32 nPos,
             sal_Int32 nStartCharFlags,
-            const String& userDefinedCharactersStart,
+            const OUString& userDefinedCharactersStart,
             sal_Int32 nContCharFlags,
-            const String& userDefinedCharactersCont ) const
+            const OUString& userDefinedCharactersCont ) const
 {
     try
     {
@@ -430,12 +430,12 @@
 
 ::com::sun::star::i18n::ParseResult CharClass::parsePredefinedToken(
             sal_Int32 nTokenType,
-            const String& rStr,
+            const OUString& rStr,
             sal_Int32 nPos,
             sal_Int32 nStartCharFlags,
-            const String& userDefinedCharactersStart,
+            const OUString& userDefinedCharactersStart,
             sal_Int32 nContCharFlags,
-            const String& userDefinedCharactersCont ) const
+            const OUString& userDefinedCharactersCont ) const
 {
     try
     {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b6097255684aeb1f177aac0c5787d0ec67d9f80
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Norbert Thiebaud <nthiebaud at gmail.com>



More information about the LibreOffice mailing list