Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2586

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/86/2586/1

fdo#38838: Converting String/UniString to OUString

Change-Id: If64db96005fcd8a42e4fa24041867b99183965f9
---
M basctl/source/basicide/macrodlg.cxx
M cui/source/dialogs/scriptdlg.cxx
M cui/source/options/optjava.cxx
M cui/source/tabpages/autocdlg.cxx
M dbaccess/source/ui/misc/HtmlReader.cxx
M filter/source/msfilter/util.cxx
M fpicker/source/office/iodlg.cxx
M sc/source/core/tool/compiler.cxx
M sc/source/filter/excel/xecontent.cxx
M sc/source/filter/excel/xlformula.cxx
M sc/source/filter/html/htmlexp.cxx
M sc/source/filter/html/htmlimp.cxx
M sc/source/filter/html/htmlpars.cxx
M sc/source/ui/dbgui/csvgrid.cxx
M sc/source/ui/dbgui/validate.cxx
M sc/source/ui/docshell/arealink.cxx
M sc/source/ui/view/hintwin.cxx
M sc/source/ui/view/prevwsh.cxx
M sfx2/source/appl/childwin.cxx
M sfx2/source/appl/linkmgr2.cxx
M sfx2/source/appl/lnkbase2.cxx
M sfx2/source/appl/newhelp.cxx
M sfx2/source/dialog/srchdlg.cxx
M svtools/source/contnr/fileview.cxx
M svtools/source/urlobj/inetimg.cxx
M sw/source/core/doc/docnum.cxx
M sw/source/core/edit/edtox.cxx
M sw/source/core/fields/docufld.cxx
M sw/source/core/fields/expfld.cxx
M sw/source/core/graphic/ndgrf.cxx
M sw/source/core/swg/SwXMLBlockExport.cxx
M sw/source/core/swg/SwXMLTextBlocks.cxx
M sw/source/core/unocore/unofield.cxx
M sw/source/filter/basflt/fltini.cxx
M sw/source/filter/html/css1atr.cxx
M sw/source/filter/html/htmlform.cxx
M sw/source/filter/html/htmlforw.cxx
M sw/source/filter/html/swhtml.cxx
M sw/source/filter/ww8/writerhelper.cxx
M sw/source/filter/ww8/writerwordglue.cxx
M sw/source/filter/ww8/ww8atr.cxx
M sw/source/filter/ww8/ww8par5.cxx
M sw/source/ui/app/appenv.cxx
M sw/source/ui/dbui/createaddresslistdialog.cxx
M sw/source/ui/dbui/dbinsdlg.cxx
M sw/source/ui/dbui/mailmergechildwindow.cxx
M sw/source/ui/envelp/envimg.cxx
M sw/source/ui/fldui/fldfunc.cxx
M sw/source/ui/fldui/fldpage.cxx
M sw/source/ui/index/cnttab.cxx
M sw/source/ui/uiview/view.cxx
M sw/source/ui/utlui/content.cxx
M tools/inc/tools/string.hxx
M tools/source/string/tustring.cxx
M unotools/inc/unotools/fontdefs.hxx
M unotools/source/misc/fontcvt.cxx
M unotools/source/misc/fontdefs.cxx
M vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
M vcl/generic/fontmanager/fontsubst.cxx
M vcl/generic/glyphs/gcach_ftyp.cxx
M vcl/generic/glyphs/glyphcache.cxx
M vcl/inc/outdev.h
M vcl/inc/outfont.hxx
M vcl/source/control/combobox.cxx
M vcl/source/gdi/font.cxx
M vcl/source/gdi/outdev3.cxx
M vcl/source/window/window.cxx
67 files changed, 320 insertions(+), 302 deletions(-)



diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index cb843d6..f172160 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -355,7 +355,7 @@
             // extract the module name from the string like "Sheet1 (Example1)"
             if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
             {
-                sal_uInt16 nIndex = 0;
+                sal_Int32 nIndex = 0;
                 aModName = aModName.GetToken( 0, ' ', nIndex );
             }
             pModule = pBasic->FindModule( aModName );
@@ -663,7 +663,7 @@
         // extract the module name from the string like "Sheet1 (Example1)"
         if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
         {
-            sal_uInt16 nIndex = 0;
+            sal_Int32 nIndex = 0;
             aMod = aMod.GetToken( 0, ' ', nIndex );
         }
         String aSub( aDesc.GetMethodName() );
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 7bfbbf5..cc3bcc0 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1232,8 +1232,8 @@
     if( aStoredEntry.Len() <= 0 )
         return;
     SvTreeListEntry* pEntry = 0;
-    sal_uInt16 nIndex = 0;
-    while ( nIndex != STRING_NOTFOUND )
+    sal_Int32 nIndex = 0;
+    while ( nIndex != -1 )
     {
         String aTmp( aStoredEntry.GetToken( 0, ';', nIndex ) );
         SvTreeListEntry* pTmpEntry = m_pScriptsBox->FirstChild( pEntry );
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 47f1f9b..23e37a9 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1080,7 +1080,8 @@
     if ( m_sOldPath.Len() == 0 )
         m_sOldPath = _rPath;
     m_aPathList.Clear();
-    xub_StrLen i, nIdx = 0;
+    xub_StrLen i;
+    sal_Int32 nIdx = 0;
     xub_StrLen nCount = comphelper::string::getTokenCount(_rPath, CLASSPATH_DELIMITER);
     for ( i = 0; i < nCount; ++i )
     {
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 6df09af..2f11b4c 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -350,7 +350,7 @@
         aFont.SetWeight( WEIGHT_BOLD );
 
         sal_Bool bFett = sal_True;
-        sal_uInt16 nPos = 0;
+        sal_Int32 nPos = 0;
         do {
             String sTxt( pUserData->pString->GetToken( 0, 1, nPos ));
 
@@ -359,14 +359,14 @@
 
             rDev.DrawText( aNewPos, sTxt );
 
-            if( STRING_NOTFOUND != nPos )
+            if( -1 != nPos )
                 aNewPos.X() += rDev.GetTextWidth( sTxt );
 
             if( bFett )
                 rDev.SetFont( aOldFont );
 
             bFett = !bFett;
-        } while( STRING_NOTFOUND != nPos );
+        } while( -1 != nPos );
     }
 }
 
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 8071cd8..3cb6690 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -386,8 +386,8 @@
             {
                 const String& rFace = rOption.GetString();
                 String aFontName;
-                xub_StrLen nPos = 0;
-                while( nPos != STRING_NOTFOUND )
+                sal_Int32 nPos = 0;
+                while( nPos != -1 )
                 {
                     // list fo fonts, VCL: semicolon as separator, HTML: comma
                     String aFName = rFace.GetToken( 0, ',', nPos );
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index db8aa6c..d3144fc 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -163,7 +163,7 @@
           let words own font substitution kick in
         */
         rChrSet = RTL_TEXTENCODING_UNICODE;
-        xub_StrLen nIndex = 0;
+        sal_Int32 nIndex = 0;
         rFontName = ::GetNextFontToken(rFontName, nIndex);
     }
     else
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 74bf784..592005c 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1467,8 +1467,8 @@
 
         if ( _bMultiExt )
         {
-            sal_uInt16 nIdx = 0;
-            while ( !pFoundFilter && nIdx != STRING_NOTFOUND )
+            sal_Int32 nIdx = 0;
+            while ( !pFoundFilter && nIdx != -1 )
             {
                 aSingleType = rType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nIdx );
 #ifdef UNX
@@ -3305,7 +3305,8 @@
     if ( ! aType.EqualsAscii(FILEDIALOG_FILTER_ALL) )
     {
         sal_uInt16 nWildCard = comphelper::string::getTokenCount(aType, FILEDIALOG_DEF_EXTSEP);
-        sal_uInt16 nIndex, nPos = 0;
+        sal_uInt16 nIndex;
+        sal_Int32 nPos = 0;
 
         for ( nIndex = 0; nIndex < nWildCard; nIndex++ )
         {
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 09e61c9..c31a39a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3395,7 +3395,7 @@
             if ( nRefs > 2 )
             {   // duplicated or too many ':'? B:2::C10 => B2:C10
                 bColons = true;
-                xub_StrLen nIndex = 0;
+                sal_Int32 nIndex = 0;
                 String aTmp1( aSymbol.GetToken( 0, ':', nIndex ) );
                 xub_StrLen nLen1 = aTmp1.Len();
                 String aSym, aTmp2;
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 9a7b96e..1ff9441 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1558,7 +1558,7 @@
                         Excel uses the NUL character as string list separator. */
                     mxString1.reset( new XclExpString( EXC_STR_8BITLENGTH ) );
                     xub_StrLen nTokenCnt = comphelper::string::getTokenCount(aString, '\n');
-                    xub_StrLen nStringIx = 0;
+                    sal_Int32 nStringIx = 0;
                     for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken )
                     {
                         String aToken( aString.GetToken( 0, '\n', nStringIx ) );
@@ -1798,7 +1798,7 @@
     // comma separated list of HTML table names or indexes
     xub_StrLen nTokenCnt = comphelper::string::getTokenCount(rSource, ';');
     String aNewTables, aAppendTable;
-    xub_StrLen nStringIx = 0;
+    sal_Int32 nStringIx = 0;
     bool bExitLoop = false;
     for( xub_StrLen nToken = 0; (nToken < nTokenCnt) && !bExitLoop; ++nToken )
     {
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index a96b263..5c11ee5 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -747,7 +747,7 @@
     {
         rScTokArr.Clear();
         xub_StrLen nTokenCnt = comphelper::string::getTokenCount(aString, cStringSep);
-        xub_StrLen nStringIx = 0;
+        sal_Int32 nStringIx = 0;
         for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken )
         {
             String aToken( aString.GetToken( 0, cStringSep, nStringIx ) );
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index fbadc83..e7c74b8 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -385,7 +385,7 @@
     {   // Fontliste, VCL: Semikolon als Separator,
         // CSS1: Komma als Separator und jeder einzelne Fontname quoted
         const String& rList = aHTMLStyle.aFontFamilyName;
-        for ( xub_StrLen j = 0, nPos = 0; j < nFonts; j++ )
+        for ( sal_Int32 j = 0, nPos = 0; j < (sal_Int32) nFonts; j++ )
         {
             rStrm << '\"';
             OUT_STR( rList.GetToken( 0, ';', nPos ) );
@@ -1109,7 +1109,7 @@
             else
             {   // Fontliste, VCL: Semikolon als Separator, HTML: Komma
                 const String& rList = rFontItem.GetFamilyName();
-                for ( xub_StrLen j = 0, nPos = 0; j < nFonts; j++ )
+                for ( sal_Int32 j = 0, nPos = 0; j < (sal_Int32)nFonts; j++ )
                 {
                     rtl::OString aTmpStr = HTMLOutFuncs::ConvertStringToHTML(
                         rList.GetToken( 0, ';', nPos ), eDestEnc,
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 98ff6f1..e833a8e 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -212,7 +212,7 @@
     ScRangeName* pRangeNames = pDoc->GetRangeName();
     ScRangeList aRangeList;
     xub_StrLen nTokenCnt = comphelper::string::getTokenCount(rOrigName, ';');
-    xub_StrLen nStringIx = 0;
+    sal_Int32 nStringIx = 0;
     for( xub_StrLen nToken = 0; nToken < nTokenCnt; nToken++ )
     {
         String aToken( rOrigName.GetToken( 0, ';', nStringIx ) );
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 717c183..a0274f9 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1555,8 +1555,8 @@
                 {
                     const String& rFace = rOption.GetString();
                     String aFontName;
-                    xub_StrLen nPos = 0;
-                    while( nPos != STRING_NOTFOUND )
+                    sal_Int32 nPos = 0;
+                    while( nPos != -1 )
                     {
                         // Fontliste, VCL: Semikolon als Separator, HTML: Komma
                         String aFName = rFace.GetToken( 0, ',', nPos );
@@ -3068,8 +3068,8 @@
             {
                 const String& rFace = itr->GetString();
                 String aFontName;
-                xub_StrLen nPos = 0;
-                while( nPos != STRING_NOTFOUND )
+                sal_Int32 nPos = 0;
+                while( nPos != -1 )
                 {
                     // font list separator: VCL = ';' HTML = ','
                     String aFName = comphelper::string::strip(rFace.GetToken(0, ',', nPos), ' ');
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 6da66eb..74eaac2 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1072,10 +1072,10 @@
         U+0020 may be drawn with a wrong width (from non-fixed-width Asian or
         Complex font). Now we draw every non-space portion separately. */
     xub_StrLen nTokenCount = comphelper::string::getTokenCount(aPlainText, ' ');
-    xub_StrLen nCharIx = 0;
+    sal_Int32 nCharIx = 0;
     for( xub_StrLen nToken = 0; nToken < nTokenCount; ++nToken )
     {
-        xub_StrLen nBeginIx = nCharIx;
+        sal_Int32 nBeginIx = nCharIx;
         String aToken = aPlainText.GetToken( 0, ' ', nCharIx );
         if( aToken.Len() > 0 )
         {
@@ -1086,7 +1086,7 @@
     }
 
     nCharIx = 0;
-    while( (nCharIx = rText.Search( '\t', nCharIx )) != STRING_NOTFOUND )
+    while( (nCharIx = rText.Search( '\t', nCharIx )) != -1 )
     {
         sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx;
         sal_Int32 nX2 = nX1 + GetCharWidth() - 2;
@@ -1099,7 +1099,7 @@
         ++nCharIx;
     }
     nCharIx = 0;
-    while( (nCharIx = rText.Search( '\n', nCharIx )) != STRING_NOTFOUND )
+    while( (nCharIx = rText.Search( '\n', nCharIx )) != -1 )
     {
         sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx;
         sal_Int32 nX2 = nX1 + GetCharWidth() - 2;
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index ecce534..c92eb3a 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -256,7 +256,7 @@
 {
     rFmlaStr.Erase();
     xub_StrLen nTokenCnt = comphelper::string::getTokenCount(rStringList, '\n');
-    for( xub_StrLen nToken = 0, nStringIx = 0; nToken < nTokenCnt; ++nToken )
+    for( sal_Int32 nToken = 0, nStringIx = 0; nToken < (sal_Int32) nTokenCnt; ++nToken )
     {
         String aToken( rStringList.GetToken( 0, '\n', nStringIx ) );
         ScGlobal::AddQuotes( aToken, '"' );
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 9ae8861..260801e 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -278,7 +278,7 @@
     SCCOL nWidth = 0;
     SCROW nHeight = 0;
     xub_StrLen nTokenCnt = comphelper::string::getTokenCount(aTempArea, ';');
-    xub_StrLen nStringIx = 0;
+    sal_Int32 nStringIx = 0;
     xub_StrLen nToken;
 
     for( nToken = 0; nToken < nTokenCnt; nToken++ )
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index e277e96..47aeac7 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -46,8 +46,8 @@
     SetFont( aTextFont );
 
     Size aTextSize;
-    xub_StrLen nIndex = 0;
-    while ( nIndex != STRING_NOTFOUND )
+    sal_Int32 nIndex = 0;
+    while ( nIndex != -1 )
     {
         String aLine = aMessage.GetToken( 0, CHAR_CR, nIndex );
         Size aLineSize( GetTextWidth( aLine ), GetTextHeight() );
@@ -78,9 +78,9 @@
     DrawText( Point(HINT_MARGIN,HINT_MARGIN), aTitle );
 
     SetFont( aTextFont );
-    xub_StrLen nIndex = 0;
+    sal_Int32 nIndex = 0;
     Point aLineStart = aTextStart;
-    while ( nIndex != STRING_NOTFOUND )
+    while ( nIndex != -1 )
     {
         String aLine = aMessage.GetToken( 0, CHAR_CR, nIndex );
         DrawText( aLineStart, aLine );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index a8537b6..42b4fb4 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -937,7 +937,7 @@
     xub_StrLen nCount = comphelper::string::getTokenCount(rData, ';');
     if (nCount)
     {
-        xub_StrLen nIndex = 0;
+        sal_Int32 nIndex = 0;
         pPreview->SetZoom((sal_uInt16)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
         pPreview->SetPageNo(rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32());
         eZoom = SVX_ZOOM_PERCENT;
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 798da8c..0df9829 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -104,7 +104,7 @@
     if ( comphelper::string::getTokenCount(rStr, '/') != 4 )
         return sal_False;
 
-    xub_StrLen nIdx = 0;
+    sal_Int32 nIdx = 0;
     rPos.X() = rStr.GetToken(0, '/', nIdx).ToInt32();
     rPos.Y() = rStr.GetToken(0, '/', nIdx).ToInt32();
     rSize.Width() = rStr.GetToken(0, '/', nIdx).ToInt32();
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 91cf2e7..32d3919 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -238,7 +238,7 @@
             case OBJECT_CLIENT_GRF:
             case OBJECT_CLIENT_OLE:
                 {
-                    sal_uInt16 nPos = 0;
+                    sal_Int32 nPos = 0;
                     String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
                     String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
 
@@ -262,7 +262,7 @@
                 break;
             case OBJECT_CLIENT_DDE:
                 {
-                    sal_uInt16 nTmp = 0;
+                    sal_Int32 nTmp = 0;
                     String sCmd( sLNm );
                     String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
                     String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 9cbd3b2..f649c60 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -602,7 +602,7 @@
         return 0;
 
     String sNm( rLinkName );
-    sal_uInt16 nTokenPos = 0;
+    sal_Int32 nTokenPos = 0;
     rtl::OUString sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) );
 
     DdeServices& rSvc = DdeService::GetServices();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1bd5f8d..40f9420 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -320,7 +320,7 @@
     {
         String aRow( pEntries[i] );
         String aTitle, aURL;
-        xub_StrLen nIdx = 0;
+        sal_Int32 nIdx = 0;
         aTitle = aRow.GetToken( 0, '\t', nIdx );
         aURL = aRow.GetToken( 0, '\t', nIdx );
         sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
@@ -364,7 +364,7 @@
                 {
                     String aRow( pEntries[i] );
                     String aTitle, aURL;
-                    xub_StrLen nIdx = 0;
+                    sal_Int32 nIdx = 0;
                     aTitle = aRow.GetToken( 0, '\t', nIdx );
                     aURL = aRow.GetToken( 0, '\t', nIdx );
                     sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
@@ -1082,7 +1082,7 @@
         {
             String aRow( pFacs[i] );
             String aTitle, aType;
-            xub_StrLen nIdx = 0;
+            sal_Int32 nIdx = 0;
             aTitle = aRow.GetToken( 0, '\t', nIdx );
             aType = aRow.GetToken( 0, '\t', nIdx );
             String* pURL = new String( aRow.GetToken( 0, '\t', nIdx ) );
@@ -1601,7 +1601,7 @@
     {
         String aRow( pFacs[i] );
         String aTitle, aType, aURL;
-        xub_StrLen nIdx = 0;
+        sal_Int32 nIdx = 0;
         aTitle = aRow.GetToken( 0, '\t', nIdx );
         aType = aRow.GetToken( 0, '\t', nIdx );
         aURL = aRow.GetToken( 0, '\t', nIdx );
@@ -2952,7 +2952,7 @@
         {
             aUserData = String( aTemp );
             DBG_ASSERT( comphelper::string::getTokenCount(aUserData, ';') == 6, "invalid user 
data" );
-            sal_uInt16 nIdx = 0;
+            sal_Int32 nIdx = 0;
             nIndexSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
             nTextSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
             sal_Int32 nWidth = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 7d7c45a..c5745f0 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -89,7 +89,7 @@
         {
             String sUserData( aTemp );
             DBG_ASSERT( comphelper::string::getTokenCount(sUserData, ';') == 5, "invalid config 
data" );
-            xub_StrLen nIdx = 0;
+            sal_Int32 nIdx = 0;
             String sSearchText = sUserData.GetToken( 0, ';', nIdx );
             m_aWholeWordsBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
             m_aMatchCaseBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
@@ -97,7 +97,7 @@
             m_aBackwardsBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
 
             nIdx = 0;
-            while ( nIdx != STRING_NOTFOUND )
+            while ( nIdx != -1 )
                 m_aSearchEdit.InsertEntry( sSearchText.GetToken( 0, '\t', nIdx ) );
             m_aSearchEdit.SelectEntryPos(0);
         }
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index dfb0a10..5b021fb 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1599,7 +1599,7 @@
     HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
     DBG_ASSERT( pBar, "invalid headerbar" );
 
-    sal_uInt16 nIdx = 0;
+    sal_Int32 nIdx = 0;
     mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
     sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
     HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
@@ -1616,7 +1616,7 @@
     }
     pBar->SetItemBits( mpImp->mnSortColumn, nBits );
 
-    while ( nIdx != STRING_NOTFOUND )
+    while ( nIdx != -1 )
     {
         sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
         pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 185e024..263404c 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -64,7 +64,7 @@
     case SOT_FORMATSTR_ID_INET_IMAGE:
         {
             String sINetImg = read_zeroTerminated_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_UTF8);
-            xub_StrLen nStart = 0;
+            sal_Int32 nStart = 0;
             aImageURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
             aTargetURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
             aTargetFrame = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index d706557..2e4ae81 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -598,9 +598,9 @@
     //  ([Number]+\.)+  (as a regular expression!)
     //  (Number follwed by a period, with 5 repetitions)
     //  i.e.: "1.1.", "1.", "1.1.1."
-    xub_StrLen nPos = 0;
+    sal_Int32 nPos = 0;
     String sNum = rName.GetToken( 0, '.', nPos );
-    if( STRING_NOTFOUND == nPos )
+    if( -1 == nPos )
         return USHRT_MAX;           // invalid number!
 
     sal_uInt16 nLevelVal[ MAXLEVEL ];       // numbers of all levels
@@ -608,7 +608,7 @@
     sal_uInt8 nLevel = 0;
     String sName( rName );
 
-    while( STRING_NOTFOUND != nPos )
+    while( -1 != nPos )
     {
         sal_uInt16 nVal = 0;
         sal_Unicode c;
@@ -630,7 +630,7 @@
         sNum = sName.GetToken( 0, '.', nPos );
         // #i4533# without this check all parts delimited by a dot are treated as outline numbers
         if(!comphelper::string::isdigitAsciiString(sNum))
-            nPos = STRING_NOTFOUND;
+            nPos = -1;
     }
     rName = sName;      // that's the follow-up text
 
@@ -643,7 +643,7 @@
     SwTxtNode* pNd;
     nPos = 0;
     // search in the existing outline nodes for the required outline num array
-    for( ; nPos < rOutlNds.size(); ++nPos )
+    for( ; nPos < (sal_Int32) rOutlNds.size(); ++nPos )
     {
         pNd = rOutlNds[ nPos ]->GetTxtNode();
         const int nLvl = pNd->GetAttrOutlineLevel()-1;   //<-end,zhaojianwei
@@ -679,7 +679,7 @@
             }
         }
     }
-    if( nPos >= rOutlNds.size() )
+    if( nPos >= (sal_Int32) rOutlNds.size() )
         nPos = USHRT_MAX;
     return nPos;
 }
@@ -710,10 +710,10 @@
             //#i4533# leading numbers followed by a dot have been remove while
             //searching for the outline position
             //to compensate this they must be removed from the paragraphs text content, too
-            sal_uInt16 nPos = 0;
+            sal_Int32 nPos = 0;
             String sTempNum;
             while(sExpandedText.Len() && (sTempNum = sExpandedText.GetToken(0, '.', nPos)).Len() &&
-                    STRING_NOTFOUND != nPos &&
+                    -1 != nPos &&
                     comphelper::string::isdigitAsciiString(sTempNum))
             {
                 sExpandedText.Erase(0, nPos);
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 8737885..598547f 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -382,7 +382,7 @@
             {
                 String sLine(rtl::OStringToOUString(aRdLine, eChrSet));
 
-                xub_StrLen nTokenPos = 0;
+                sal_Int32 nTokenPos = 0;
                 String sToSelect( sLine.GetToken(0, ';', nTokenPos ) );
                 if( sToSelect.Len() )
                 {
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 5cb8400..5a2e88a 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1339,13 +1339,13 @@
 {
     if(nSubType == TYP_CONDTXTFLD)
     {
-        sal_uInt16 nPos = 0;
+        sal_Int32 nPos = 0;
         aTRUETxt = rStr.GetToken(0, '|', nPos);
 
-        if(nPos != STRING_NOTFOUND)
+        if(nPos != -1)
         {
             aFALSETxt = rStr.GetToken(0, '|', nPos);
-            if(nPos != STRING_NOTFOUND)
+            if(nPos != -1)
             {
                 aContent = rStr.GetToken(0, '|', nPos);
                 bValid = sal_True;
@@ -1507,7 +1507,7 @@
     if (nSubType == TYP_CONDTXTFLD)
     {
         sal_Int32 nPos = rStr.indexOf('|');
-        if (nPos == STRING_NOTFOUND)
+        if (nPos == -1)
             aTRUETxt = rStr;
         else
         {
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 77af7de..4407919 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -722,7 +722,7 @@
         //#59900# Die Sortierung soll die Nummer korrekt einordnen
         //also "10" nach "9" und nicht "10" nach "1"
         const String& rTmp2 = rNew.sDlgEntry;
-        xub_StrLen nFndPos2 = 0;
+        sal_Int32 nFndPos2 = 0;
         String sNum2( rTmp2.GetToken( 0, ' ', nFndPos2 ));
         sal_Bool bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
         sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.ToInt32() : 0;
@@ -735,7 +735,7 @@
             //#59900# Die Sortierung soll die Nummer korrekt einordnen
             //also "10" nach "9" und nicht "10" nach "1"
             const String& rTmp1 = maData[nM]->sDlgEntry;
-            xub_StrLen nFndPos1 = 0;
+            sal_Int32 nFndPos1 = 0;
             String sNum1( rTmp1.GetToken( 0, ' ', nFndPos1 ));
             sal_Int32 nCmp;
 
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index a555430..b30c26d 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -614,7 +614,7 @@
         refLink->SetVisible( pIDLA->IsVisibleLinks() );
         if( rFltName.EqualsAscii( "DDE" ))
         {
-            sal_uInt16 nTmp = 0;
+            sal_Int32 nTmp = 0;
             String sApp, sTopic, sItem;
             sApp = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
             sTopic = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx
index 9239474..d35b5cf 100644
--- a/sw/source/core/swg/SwXMLBlockExport.cxx
+++ b/sw/source/core/swg/SwXMLBlockExport.cxx
@@ -121,13 +121,13 @@
         {
             SvXMLElementExport aBody (*this, XML_NAMESPACE_OFFICE, XML_BODY, sal_True, sal_True);
             {
-                xub_StrLen nPos = 0;
+                sal_Int32 nPos = 0;
                 do
                 {
                     String sTemp ( rText.GetToken( 0, '\015', nPos ) );
                      SvXMLElementExport aPara (*this, XML_NAMESPACE_TEXT, XML_P, sal_True, 
sal_False);
                     GetDocHandler()->characters(sTemp);
-                } while (STRING_NOTFOUND != nPos );
+                } while (-1 != nPos );
             }
 
         }
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 98f9eb1..f8759ae 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -595,7 +595,7 @@
     if( pTxtNode->GetTxtColl() == pDoc->GetDfltTxtFmtColl() )
         pTxtNode->ChgFmtColl( pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
 
-    xub_StrLen nPos = 0;
+    sal_Int32 nPos = 0;
     do
     {
         if ( nPos )
@@ -605,7 +605,7 @@
         SwIndex aIdx( pTxtNode );
         String sTemp(rText.GetToken( 0, '\015', nPos ) );
         pTxtNode->InsertText( sTemp, aIdx );
-    } while ( STRING_NOTFOUND != nPos );
+    } while ( -1 != nPos );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 106e777..2962b58 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2471,7 +2471,7 @@
         rName.Erase(0, 30);
 
     sal_uInt16 nResId = USHRT_MAX;
-    xub_StrLen nFound = 0;
+    sal_Int32 nFound = 0;
     rTypeName = rName.GetToken( 0, '.', nFound );
     if(rTypeName.EqualsAscii("User"))
         nResId = RES_USERFLD;
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 51bce34..243774f 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -602,7 +602,7 @@
 
 void SwAsciiOptions::ReadUserData( const String& rStr )
 {
-        xub_StrLen nToken = 0;
+        sal_Int32 nToken = 0;
         sal_uInt16 nCnt = 0;
         String sToken;
         do {
@@ -630,7 +630,7 @@
                         }
                 }
                 ++nCnt;
-        } while( STRING_NOTFOUND != nToken );
+        } while( -1 != nToken );
 }
 
 void SwAsciiOptions::WriteUserData( String& rStr )
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index d7f0d74..098e6f0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1187,8 +1187,8 @@
     sal_Bool bContainsKeyword = sal_False;
     if( rName.Len() )
     {
-        xub_StrLen nStrPos = 0;
-        while( nStrPos != STRING_NOTFOUND )
+        sal_Int32 nStrPos = 0;
+        while( nStrPos != -1 )
         {
             String aName = rName.GetToken( 0, ';', nStrPos );
             aName = comphelper::string::strip(aName, ' ');
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index f03b761..41d488e 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -826,10 +826,10 @@
     for( i=0; i< rUnoMacroTbl.size(); i++ )
     {
         const String& rStr(rUnoMacroTbl[i]);
-        xub_StrLen nIndex = 0;
-        if( !rStr.GetToken( 0, '-', nIndex ).Len() || STRING_NOTFOUND == nIndex )
+        sal_Int32 nIndex = 0;
+        if( !rStr.GetToken( 0, '-', nIndex ).Len() || -1 == nIndex )
             continue;
-        if( !rStr.GetToken( 0, '-', nIndex ).Len() || STRING_NOTFOUND == nIndex )
+        if( !rStr.GetToken( 0, '-', nIndex ).Len() || -1 == nIndex )
             continue;
         if( nIndex < rStr.Len() )
             nEvents++;
@@ -859,13 +859,13 @@
     for( i=0; i< rUnoMacroTbl.size(); ++i )
     {
         const String& rStr = rUnoMacroTbl[i];
-        xub_StrLen nIndex = 0;
+        sal_Int32 nIndex = 0;
         String sListener( rStr.GetToken( 0, '-', nIndex ) );
-        if( !sListener.Len() || STRING_NOTFOUND == nIndex )
+        if( !sListener.Len() || -1 == nIndex )
             continue;
 
         String sMethod( rStr.GetToken( 0, '-', nIndex ) );
-        if( !sMethod.Len() || STRING_NOTFOUND == nIndex )
+        if( !sMethod.Len() || -1 == nIndex )
             continue;
 
         String sCode( rStr.Copy( nIndex ) );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 3be35bd..2973f61 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1301,8 +1301,8 @@
         if( sVal.Len() )
         {
             sVal = convertLineEnd(sVal, LINEEND_LF);
-            xub_StrLen nPos = 0;
-            while ( nPos != STRING_NOTFOUND )
+            sal_Int32 nPos = 0;
+            while ( nPos != -1 )
             {
                 if( nPos )
                     rWrt.Strm() << SwHTMLWriter::sNewLine;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 48113a6..9d8d8db 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3771,8 +3771,8 @@
         }
 
         sal_Bool bFound = sal_False;
-        xub_StrLen nStrPos = 0;
-        while( nStrPos!=STRING_NOTFOUND )
+        sal_Int32 nStrPos = 0;
+        while( nStrPos!= -1 )
         {
             String aFName = aFace.GetToken( 0, ',', nStrPos );
             aFName = comphelper::string::strip(aFName, ' ');
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 8e70845..31f6d89 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -633,7 +633,7 @@
 
         bool IsStarSymbol(const rtl::OUString &rFontName)
         {
-            xub_StrLen nIndex = 0;
+            sal_Int32 nIndex = 0;
             rtl::OUString sFamilyNm(GetNextFontToken(rFontName, nIndex));
             return (sFamilyNm.equalsIgnoreAsciiCase("starsymbol") ||
                 sFamilyNm.equalsIgnoreAsciiCase("opensymbol"));
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index c0149d5..9fd2dc7 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -453,10 +453,10 @@
 
         FontMapExport::FontMapExport(const String &rFamilyName)
         {
-            xub_StrLen nIndex = 0;
+            sal_Int32 nIndex = 0;
             msPrimary = GetNextFontToken(rFamilyName, nIndex);
             msSecondary = myImplHelpers::FindBestMSSubstituteFont(msPrimary);
-            if (!msSecondary.Len() && nIndex != STRING_NOTFOUND)
+            if (!msSecondary.Len() && nIndex != -1)
                 msSecondary = GetNextFontToken(rFamilyName, nIndex);
         }
 
@@ -735,14 +735,14 @@
             SwapQuotesInField(rParams);
 
             // Force to Japanese when finding one of 'geaE'
-            rtl::OUString sJChars( "geE" );
+            OUString sJChars( "geE" );
             bool bForceJapanese = ( STRING_NOTFOUND != rParams.SearchChar( sJChars.getStr() ) );
             if ( bForceJapanese )
             {
-                rParams.SearchAndReplaceAll( rtl::OUString( "ee" ),
-                                             rtl::OUString( "yyyy" ) );
-                rParams.SearchAndReplaceAll( rtl::OUString( "EE" ),
-                                             rtl::OUString( "YYYY" ) );
+                rParams.SearchAndReplaceAll( OUString( "ee" ),
+                                             OUString( "yyyy" ) );
+                rParams.SearchAndReplaceAll( OUString( "EE" ),
+                                             OUString( "YYYY" ) );
             }
             if (LANGUAGE_FRENCH != nDocLang)
             {
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index baeb447..4f9161f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2194,8 +2194,8 @@
                         const String& rStyles = pTOX->GetStyleNames( n );
                         if( rStyles.Len() )
                         {
-                            xub_StrLen nPos = 0;
-                            String sLvl = rtl::OUString(',');
+                            sal_Int32 nPos = 0;
+                            String sLvl = OUString(',');
                             sLvl += OUString::number( n + 1 );
                             do {
                                 String sStyle( rStyles.GetToken( 0,
@@ -2210,7 +2210,7 @@
                                         ( sTOption += sStyle ) += sLvl;
                                     }
                                 }
-                            } while( STRING_NOTFOUND != nPos );
+                            } while( -1 != nPos );
                         }
                     }
 
@@ -2382,7 +2382,7 @@
 
 String FieldString(ww::eField eIndex)
 {
-    String sRet(rtl::OUString("  "));
+    String sRet(OUString("  "));
     if (const char *pField = ww::GetEnglishFieldName(eIndex))
         sRet.InsertAscii(pField, 1);
     return sRet;
@@ -2653,7 +2653,7 @@
                 case DI_CUSTOM:
                     eFld = ww::eDOCPROPERTY;
                     {
-                        rtl::OUString sQuotes('\"');
+                        OUString sQuotes('\"');
                         const SwDocInfoField * pDocInfoField =
                         dynamic_cast<const SwDocInfoField *> (pFld);
 
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 0760c96..97a6641 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -282,9 +282,9 @@
 
         String sParams( GetResult() );
 
-        xub_StrLen nIndex = 0;
+        sal_Int32 nIndex = 0;
         String sStart( sParams.GetToken(0, '-', nIndex) );
-        if( STRING_NOTFOUND != nIndex )
+        if( -1 != nIndex )
         {
             nStart = static_cast<sal_uInt16>(sStart.ToInt32());
             nEnd   = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
@@ -2824,17 +2824,17 @@
         String sParams( rParam.GetResult() );
         if( sParams.Len() )
         {
-            xub_StrLen nIndex = 0;
+            sal_Int32 nIndex = 0;
 
             // Delimiters between styles and style levels appears to allow both ; and ,
 
             String sTemplate( sParams.GetToken(0, ';', nIndex) );
-            if( STRING_NOTFOUND == nIndex )
+            if( -1 == nIndex )
             {
                 nIndex=0;
                 sTemplate = sParams.GetToken(0, ',', nIndex);
             }
-            if( STRING_NOTFOUND == nIndex )
+            if( -1 == nIndex )
             {
                 const SwFmt* pStyle = rReader.GetStyleWithOrgWWName(sTemplate);
                 if( pStyle )
@@ -2842,12 +2842,12 @@
                 // Store Style for Level 0 into TOXBase
                 rBase.SetStyleNames( sTemplate, 0 );
             }
-            else while( STRING_NOTFOUND != nIndex )
+            else while( -1 != nIndex )
             {
-                xub_StrLen nOldIndex=nIndex;
+                sal_Int32 nOldIndex=nIndex;
                 sal_uInt16 nLevel = static_cast<sal_uInt16>(
                     sParams.GetToken(0, ';', nIndex).ToInt32());
-                if( STRING_NOTFOUND == nIndex )
+                if( -1 == nIndex )
                 {
                     nIndex = nOldIndex;
                     nLevel = static_cast<sal_uInt16>(
@@ -2873,7 +2873,7 @@
                 // read next style name...
                 nOldIndex = nIndex;
                 sTemplate = sParams.GetToken(0, ';', nIndex);
-                if( STRING_NOTFOUND == nIndex )
+                if( -1 == nIndex )
                 {
                     nIndex=nOldIndex;
                     sTemplate = sParams.GetToken(0, ',', nIndex);
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index fb1da43..3b47034 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -78,8 +78,8 @@
     String sRet;
     String aText(comphelper::string::remove(rText, '\r'));
 
-    sal_uInt16 nTokenPos = 0;
-    while( STRING_NOTFOUND != nTokenPos )
+    sal_Int32 nTokenPos = 0;
+    while( -1 != nTokenPos )
     {
         String aLine = aText.GetToken( 0, '\n', nTokenPos );
         while ( aLine.Len() )
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx 
b/sw/source/ui/dbui/createaddresslistdialog.cxx
index f7f8532..ad83d23 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -404,7 +404,7 @@
             {
                 //header line
                 xub_StrLen nHeaders = comphelper::string::getTokenCount(sLine, '\t');
-                xub_StrLen nIndex = 0;
+                sal_Int32 nIndex = 0;
                 for( xub_StrLen nToken = 0; nToken < nHeaders; ++nToken)
                 {
                     String sHeader = sLine.GetToken( 0, '\t', nIndex );
@@ -422,7 +422,7 @@
                 ::std::vector<OUString> aNewData;
                 //analyze data line
                 xub_StrLen nDataCount = comphelper::string::getTokenCount(sLine, '\t');
-                xub_StrLen nIndex = 0;
+                sal_Int32 nIndex = 0;
                 for( xub_StrLen nToken = 0; nToken < nDataCount; ++nToken)
                 {
                     String sData = sLine.GetToken( 0, '\t', nIndex );
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 9c6cc3e..4a89b6e 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1770,7 +1770,7 @@
 
                 pNewData->aDBColumns.insert(pInsDBColumn);
             }
-            sal_uInt16 n = 0;
+            sal_Int32 n = 0;
             String sTmp( pNewData->sTblList );
             if( sTmp.Len() )
             {
@@ -1826,7 +1826,7 @@
 
             // now copy the user defined Numberformat strings to the
             // Shell. Then only these are available as ID
-            for( n = 0; n < aDBColumns.size() ; ++n )
+            for( n = 0; n < (sal_Int32) aDBColumns.size() ; ++n )
             {
                 SwInsDBColumn& rSet = *aDBColumns[ n ];
                 for( sal_uInt16 m = 0; m < pNewData->aDBColumns.size() ; ++m )
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index de02632..d9d7087 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -590,7 +590,7 @@
         {
             String sTokens( pCurrentMailDescriptor->sCC );
             sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';');
-            xub_StrLen nPos = 0;
+            sal_Int32 nPos = 0;
             for( sal_uInt16 nToken = 0; nToken < nTokens; ++nToken)
             {
                 String sTmp = sTokens.GetToken( 0, ';', nPos);
@@ -602,7 +602,7 @@
         {
             String sTokens( pCurrentMailDescriptor->sBCC );
             sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';');
-            xub_StrLen nPos = 0;
+            sal_Int32 nPos = 0;
             for( sal_uInt16 nToken = 0; nToken < nTokens; ++nToken)
             {
                 String sTmp = sTokens.GetToken( 0, ';', nPos);
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index c0ed4f2..d7760d8 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -55,7 +55,8 @@
 
     String sRet;
     String sSenderToken(SW_RES(STR_SENDER_TOKENS));
-    xub_StrLen nSttPos = 0, nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';');
+    xub_StrLen nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';');
+    sal_Int32 nSttPos = 0;
     bool bLastLength = true;
     for( xub_StrLen i = 0; i < nTokenCount; i++ )
     {
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 3b7279a..86fe43d 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -615,9 +615,9 @@
     {
         // reverse content of aName
         String sTmp, sBuf;
-        sal_uInt16 nPos = 0;
+        sal_Int32 nPos = 0;
 
-        for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
+        for (sal_uInt16 i = 0; i < 4 && nPos != -1; i++)
         {
             if (i == 3)
                 sTmp = rMacro.Copy(nPos);
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 7053a41..13d3cc2 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -200,7 +200,7 @@
         case TYP_DBNUMSETFLD:
         case TYP_DBSETNUMBERFLD:
             {
-                xub_StrLen nPos = 0;
+                sal_Int32 nPos = 0;
                 SwDBData aData;
 
                 aData.sDataSource = rPar1.GetToken(0, DB_DELIM, nPos);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9546729..7d516a3 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -4068,7 +4068,7 @@
                 if( !pToInsert )
                     pToInsert = new AutoMarkEntry;
 
-                sal_uInt16 nSttPos = 0;
+                sal_Int32 nSttPos = 0;
                 pToInsert->sSearch      = sLine.GetToken(0, ';', nSttPos );
                 pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos );
                 pToInsert->sPrimKey     = sLine.GetToken(0, ';', nSttPos );
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index f8b7b3e..4caa7dc 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1160,7 +1160,7 @@
 
         SET_CURR_SHELL(pWrtShell);
 
-        sal_uInt16 nPos = 0;
+        sal_Int32 nPos = 0;
 
         // Nein, es ist *keine* gute Idee GetToken gleich im Point-Konstr.
         // aufzurufen, denn welcher Parameter wird zuerst ausgewertet?
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 65c0138..31b1b9c 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -3107,7 +3107,7 @@
     sal_Bool bRet = rData.GetString( SOT_FORMATSTR_ID_SONLK, sStr );
     if( bRet )
     {
-        xub_StrLen nPos = 0;
+        sal_Int32 nPos = 0;
         aUrl    = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
         aDescr  = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
         nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 6be3d7d..1c73fe4 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -274,7 +274,7 @@
 
     void                SetToken( xub_StrLen nToken, sal_Unicode cTok, const UniString& rStr,
                                   xub_StrLen nIndex = 0 );
-    UniString           GetToken( xub_StrLen nToken, sal_Unicode cTok, xub_StrLen& rIndex ) const;
+    UniString           GetToken( xub_StrLen nToken, sal_Unicode cTok, sal_Int32& rIndex ) const;
     UniString           GetToken( xub_StrLen nToken, sal_Unicode cTok = ';' ) const;
 
     const sal_Unicode*  GetBuffer() const { return mpData->maStr; }
@@ -303,7 +303,7 @@
 
 inline UniString UniString::GetToken( xub_StrLen nToken, sal_Unicode cTok ) const
 {
-    xub_StrLen nTempPos = 0;
+    sal_Int32 nTempPos = 0;
     return GetToken( nToken, cTok, nTempPos );
 }
 
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index a66dc60..b07cd3c 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -520,14 +520,14 @@
         Replace( nFirstChar, i-nFirstChar, rStr );
 }
 
-STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) const
+STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, sal_Int32& rIndex ) const
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
 
     const STRCODE*  pStr            = mpData->maStr;
     xub_StrLen      nLen            = (xub_StrLen)mpData->mnLen;
     xub_StrLen      nTok            = 0;
-    xub_StrLen      nFirstChar      = rIndex;
+    sal_Int32      nFirstChar      = rIndex;
     xub_StrLen      i               = nFirstChar;
 
     // Determine token position and length
@@ -557,12 +557,12 @@
         if ( i < nLen )
             rIndex = i+1;
         else
-            rIndex = STRING_NOTFOUND;
+            rIndex = -1;
         return Copy( nFirstChar, i-nFirstChar );
     }
     else
     {
-        rIndex = STRING_NOTFOUND;
+        rIndex = -1;
         return STRING();
     }
 }
diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx
index df79a0f..f923464 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -37,9 +37,9 @@
 #define SUBSFONT_PS         ((sal_uLong)0x00000004)
 #define SUBSFONT_HTML       ((sal_uLong)0x00000008)
 
-UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, sal_uLong nFlags );
+UNOTOOLS_DLLPUBLIC OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags );
 
-UNOTOOLS_DLLPUBLIC void AddTokenFontName( String& rName, const String& rNewToken );
+UNOTOOLS_DLLPUBLIC void AddTokenFontName( OUString& rName, const OUString& rNewToken );
 
 struct UNOTOOLS_DLLPUBLIC FontNameHash { int operator()(const String&) const; };
 
@@ -84,9 +84,9 @@
 #define DEFAULTFONT_CTL_HEADING         ((sal_uInt16)4003)
 #define DEFAULTFONT_CTL_DISPLAY         ((sal_uInt16)4004)
 
-UNOTOOLS_DLLPUBLIC String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex );
+UNOTOOLS_DLLPUBLIC OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex );
 
-UNOTOOLS_DLLPUBLIC void GetEnglishSearchFontName( String& rName );
+UNOTOOLS_DLLPUBLIC void GetEnglishSearchFontName( OUString& rName );
 
 #endif
 
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index a111488..fe870ed 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1432,40 +1432,40 @@
 const ConvertChar* ConvertChar::GetRecodeData( const String& rOrgFontName, const String& 
rMapFontName )
 {
     const ConvertChar* pCvt = NULL;
-    String aOrgName( rOrgFontName );
+    OUString aOrgName( rOrgFontName );
     GetEnglishSearchFontName( aOrgName );
-    String aMapName( rMapFontName );
+    OUString aMapName( rMapFontName );
     GetEnglishSearchFontName( aMapName );
 
-    if( aMapName.EqualsAscii( "starsymbol" )
-     || aMapName.EqualsAscii( "opensymbol" ) )
+    if( aMapName == "starsymbol"
+     || aMapName == "opensymbol" )
     {
         int nEntries = SAL_N_ELEMENTS(aStarSymbolRecodeTable);
         for( int i = 0; i < nEntries; ++i)
         {
             RecodeTable& r = aStarSymbolRecodeTable[i];
-            if( aOrgName.EqualsAscii( r.pOrgName ) )
+            if( aOrgName.equalsAscii( r.pOrgName ) )
                 { pCvt = &r.aCvt; break; }
         }
     }
     //It's plausible that it's better to implement this
     //as an additional encoding alongside the existing
     //adobe-symbol to unicode conversion in rtl instead
-    else if( aMapName.EqualsAscii("applesymbol") )
+    else if( aMapName == "applesymbol" )
     {
         int nEntries = SAL_N_ELEMENTS(aAppleSymbolRecodeTable);
         for( int i = 0; i < nEntries; ++i)
         {
             RecodeTable& r = aAppleSymbolRecodeTable[i];
-            if( aOrgName.EqualsAscii( r.pOrgName ) )
+            if( aOrgName.equalsAscii( r.pOrgName ) )
                 { pCvt = &r.aCvt; break; }
         }
     }
-    else if( aMapName.EqualsAscii( "starbats" ) )
+    else if( aMapName == "starbats" )
     {
-        if( aOrgName.EqualsAscii( "starsymbol" ) )
+        if( aOrgName == "starsymbol" )
             pCvt = &aImplStarSymbolCvt;
-        else if( aOrgName.EqualsAscii( "opensymbol" ) )
+        else if( aOrgName == "opensymbol" )
             pCvt = &aImplStarSymbolCvt;
     }
 
@@ -1479,7 +1479,7 @@
 {
     const ConvertChar* pCvt = NULL;
 
-    String aName = rOrgName;
+    OUString aName = rOrgName;
     GetEnglishSearchFontName( aName );
 
     if ( nFlags & FONTTOSUBSFONT_IMPORT )
@@ -1490,15 +1490,15 @@
         for( int i = 0; i < nEntries; ++i )
         {
             RecodeTable& r = aStarSymbolRecodeTable[i];
-            if( aName.EqualsAscii( r.pOrgName ) )
+            if( aName.equalsAscii( r.pOrgName ) )
                 { pCvt = &r.aCvt; break; }
         }
     }
     else
     {
         // TODO: FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS
-        if( aName.EqualsAscii( "starsymbol" ) )       pCvt = &aImplStarSymbolCvt;
-        else if( aName.EqualsAscii( "opensymbol" ) )  pCvt = &aImplStarSymbolCvt;
+        if( aName == "starsymbol" )       pCvt = &aImplStarSymbolCvt;
+        else if( aName == "opensymbol" )  pCvt = &aImplStarSymbolCvt;
     }
 
     return (FontToSubsFontConverter)pCvt;
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index 7785e807..35fe535 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -20,6 +20,7 @@
 #include <unotools/fontdefs.hxx>
 #include <unotools/fontcfg.hxx>
 #include <boost/unordered_map.hpp>
+#include <rtl/ustrbuf.hxx>
 
 struct ImplLocalizedFontName
 {
@@ -321,42 +322,42 @@
 
 // -----------------------------------------------------------------------
 
-void GetEnglishSearchFontName( String& rName )
+void GetEnglishSearchFontName( OUString& rName )
 {
     bool        bNeedTranslation = false;
-    xub_StrLen  nLen = rName.Len();
+    sal_Int32  nLen = rName.getLength();
 
     // Remove trailing whitespaces
-    xub_StrLen i = nLen;
-    while ( i && (rName.GetChar( i-1 ) < 32) )
+    sal_Int32 i = nLen;
+    while ( i && (rName[ i-1 ] < 32) )
         i--;
     if ( i != nLen )
-        rName.Erase( i );
+        rName.copy( 0, i );
 
     // Remove Script at the end
     // Scriptname must be the last part of the fontname and
     // looks like "fontname (scriptname)". So there can only be a
     // script name at the and of the fontname, when the last char is ')'
-    if ( (nLen >= 3) && rName.GetChar( nLen-1 ) == ')' )
+    if ( (nLen >= 3) && rName[ nLen-1 ] == ')' )
     {
         int nOpen = 1;
-        xub_StrLen nTempLen = nLen-2;
+        sal_Int32 nTempLen = nLen-2;
         while ( nTempLen )
         {
-            if ( rName.GetChar( nTempLen ) == '(' )
+            if ( rName[ nTempLen ] == '(' )
             {
                 nOpen--;
                 if ( !nOpen )
                 {
                     // Remove Space at the end
-                    if ( nTempLen && (rName.GetChar( nTempLen-1 ) == ' ') )
+                    if ( nTempLen && (rName[ nTempLen-1 ] == ' ') )
                         nTempLen--;
-                    rName.Erase( nTempLen );
+                    rName.copy( 0, nTempLen );
                     nLen = nTempLen;
                     break;
                 }
             }
-            if ( rName.GetChar( nTempLen ) == ')' )
+            if ( rName[ nTempLen ] == ')' )
                 nOpen++;
             nTempLen--;
         }
@@ -367,7 +368,7 @@
     i = 0;
     while ( i < nLen )
     {
-        sal_Unicode c = rName.GetChar( i );
+        sal_Unicode c = rName[ i ];
         if ( c > 127 )
         {
             // Translate to Lowercase-ASCII
@@ -378,8 +379,13 @@
                 // Upper to Lower
                 if ( (c >= 'A') && (c <= 'Z') )
                     c += 'a' - 'A';
-                rName.SetChar( i, c );
-            }
+                //rName[ i ] = c ;
+
+                OUStringBuffer aTmpStr( rName.getStr() ) ;
+                aTmpStr[ i ] = c ;
+                rName = aTmpStr.makeStringAndClear() ;
+
+           }
             else
             {
                 // Only Fontnames with None-Ascii-Characters must be translated
@@ -393,12 +399,21 @@
             if ( (c >= 'A') && (c <= 'Z') )
             {
                 c += 'a' - 'A';
-                rName.SetChar( i, c );
+                //rName[ i ] = c ;
+
+                OUStringBuffer aTmpStr( rName.getStr() ) ;
+                aTmpStr[ i ] = c ;
+                rName = aTmpStr.makeStringAndClear() ;
+
             }
             else if( ((c < '0') || (c > '9')) && (c != ';') ) // not 0-9 or semicolon
             {
                 // Remove white spaces and special characters
-                rName.Erase( i, 1 );
+
+                OUStringBuffer aTmpStr( rName.getStr() ) ;
+                aTmpStr.remove(i,1);
+                rName = aTmpStr.makeStringAndClear() ;
+
                 nLen--;
                 continue;
             }
@@ -423,41 +438,41 @@
 
         FontNameDictionary::const_iterator it = aDictionary.find( rName );
         if( it != aDictionary.end() )
-            rName.AssignAscii( it->second );
+            rName = OUString::createFromAscii ( it->second ) ;
     }
 }
 
 // -----------------------------------------------------------------------
 
-String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex )
+OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex )
 {
     // check for valid start index
-    int nStringLen = rTokenStr.Len();
+    int nStringLen = rTokenStr.getLength();
     if( rIndex >= nStringLen )
     {
-        rIndex = STRING_NOTFOUND;
-        return String();
+        rIndex = -1;
+        return OUString();
     }
 
     // find the next token delimiter and return the token substring
-    const sal_Unicode* pStr = rTokenStr.GetBuffer() + rIndex;
-    const sal_Unicode* pEnd = rTokenStr.GetBuffer() + nStringLen;
+    const sal_Unicode* pStr = rTokenStr.getStr() + rIndex;
+    const sal_Unicode* pEnd = rTokenStr.getStr() + nStringLen;
     for(; pStr < pEnd; ++pStr )
         if( (*pStr == ';') || (*pStr == ',') )
             break;
 
-    xub_StrLen nTokenStart = rIndex;
-    xub_StrLen nTokenLen;
+    sal_Int32 nTokenStart = rIndex;
+    sal_Int32 nTokenLen;
     if( pStr < pEnd )
     {
-        rIndex = sal::static_int_cast<xub_StrLen>(pStr - rTokenStr.GetBuffer());
+        rIndex = sal::static_int_cast<sal_Int32>(pStr - rTokenStr.getStr());
         nTokenLen = rIndex - nTokenStart;
         ++rIndex; // skip over token separator
     }
     else
     {
         // no token delimiter found => handle last token
-        rIndex = STRING_NOTFOUND;
+        rIndex = -1;
         nTokenLen = STRING_LEN;
 
         // optimize if the token string consists of just one token
@@ -470,35 +485,35 @@
 
 // =======================================================================
 
-static bool ImplIsFontToken( const String& rName, const String& rToken )
+static bool ImplIsFontToken( const OUString& rName, const String& rToken )
 {
-    String      aTempName;
-    xub_StrLen  nIndex = 0;
+    OUString      aTempName;
+    sal_Int32  nIndex = 0;
     do
     {
         aTempName = GetNextFontToken( rName, nIndex );
         if ( rToken == aTempName )
             return true;
     }
-    while ( nIndex != STRING_NOTFOUND );
+    while ( nIndex != -1 );
 
     return false;
 }
 
 // -----------------------------------------------------------------------
 
-static void ImplAppendFontToken( String& rName, const String& rNewToken )
+static void ImplAppendFontToken( OUString& rName, const String& rNewToken )
 {
-    if ( rName.Len() )
+    if ( rName.getLength() )
     {
-        rName.Append( ';' );
-        rName.Append( rNewToken );
+        rName += ";" ;
+        rName += rNewToken ;
     }
     else
         rName = rNewToken;
 }
 
-void AddTokenFontName( String& rName, const String& rNewToken )
+void AddTokenFontName( OUString& rName, const OUString& rNewToken )
 {
     if ( !ImplIsFontToken( rName, rNewToken ) )
         ImplAppendFontToken( rName, rNewToken );
@@ -506,18 +521,18 @@
 
 // =======================================================================
 
-String GetSubsFontName( const String& rName, sal_uLong nFlags )
+OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
 {
-    String aName;
+    OUString aName;
 
-    xub_StrLen nIndex = 0;
-    String aOrgName = GetNextFontToken( rName, nIndex );
+    sal_Int32 nIndex = 0;
+    OUString aOrgName = GetNextFontToken( rName, nIndex );
     GetEnglishSearchFontName( aOrgName );
 
     // #93662# do not try to replace StarSymbol with MS only font
     if( nFlags == (SUBSFONT_MS|SUBSFONT_ONLYONE)
-    &&  ( aOrgName.EqualsAscii( "starsymbol" )
-      ||  aOrgName.EqualsAscii( "opensymbol" ) ) )
+    &&  ( aOrgName == "starsymbol"
+      ||  aOrgName == "opensymbol" ) )
         return aName;
 
     const utl::FontNameAttr* pAttr = utl::FontSubstConfiguration::get().getSubstInfo( aOrgName );
diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index 8e2a4bb..5703eac 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -296,16 +296,16 @@
             continue;
 
         // convert to unicode name
-        UniString aUtf16Name;
+        OUString aUtf16Name;
         if( eEncoding == RTL_TEXTENCODING_UNICODE ) // we are just interested in UTF16 encoded 
names
-            aUtf16Name = rtl::OUString( (const sal_Unicode*)&aNameBuffer[0], nNameLength/2 );
+            aUtf16Name = OUString( (const sal_Unicode*)&aNameBuffer[0], nNameLength/2 );
         else if( eEncoding == RTL_TEXTENCODING_UCS4 )
-            aUtf16Name = UniString(); // TODO
+            aUtf16Name = OUString(); // TODO
         else // assume the non-unicode encoded names are byte encoded
-            aUtf16Name = UniString( &aNameBuffer[0], nNameLength, eEncoding );
++            aUtf16Name = OUString( &aNameBuffer[0], nNameLength, eEncoding );
 
         // ignore empty strings
-        if( aUtf16Name.Len() <= 0 )
+        if( aUtf16Name.getLength() <= 0 )
             continue;
 
         // handle the name depending on its namecode
@@ -313,7 +313,7 @@
         {
             case kFontFamilyName:
                 // ignore font names starting with '.'
-                if( aUtf16Name.GetChar(0) == '.' )
+                if( aUtf16Name[0] == '.' )
                     nNameValue = 0;
                 else if( rDFA.GetFamilyName().Len() )
                 {
diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
index 2234bdb..fac314c 100644
--- a/vcl/generic/fontmanager/fontsubst.cxx
+++ b/vcl/generic/fontmanager/fontsubst.cxx
@@ -160,8 +160,8 @@
     if( rFontSelData.IsSymbolFont() )
         return false;
     // StarSymbol is a unicode font, but it still deserves the symbol flag
-    if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10)
-    ||  0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
+    if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10)
+    ||  0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) )
         return false;
 
     //see fdo#41556 and fdo#47636
@@ -187,7 +187,7 @@
     rtl::OUString aDummy;
     const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, aDummy );
 
-    if( !aOut.maSearchName.Len() )
+    if( !aOut.maSearchName.getLength() )
         return false;
 
     const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut );
@@ -229,8 +229,8 @@
     if( rFontSelData.IsSymbolFont() )
         return false;
     // StarSymbol is a unicode font, but it still deserves the symbol flag
-    if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10)
-    ||  0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
+    if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10)
+    ||  0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) )
         return false;
 
     const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, rMissingCodes );
@@ -238,7 +238,7 @@
     // FC doing it would be preferable because it knows the invariables
     // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans
     // whereas we would have to check for every size or attribute
-    if( !aOut.maSearchName.Len() )
+    if( !aOut.maSearchName.getLength() )
         return false;
 
     const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut );
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index df24b76..aac8088 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -945,8 +945,8 @@
 
     //Always consider [star]symbol as symbol fonts
     if (
-         (rTo.GetFamilyName().EqualsAscii("OpenSymbol")) ||
-         (rTo.GetFamilyName().EqualsAscii("StarSymbol"))
+         (rTo.GetFamilyName() == "OpenSymbol" ) ||
+         (rTo.GetFamilyName() == "StarSymbol" )
        )
     {
         rTo.SetSymbolFlag( true );
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 79a2d7a..1d1322c 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -86,7 +86,7 @@
     // TODO: is it worth to improve this hash function?
     sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFontSelData.mpFontData );
 #ifdef ENABLE_GRAPHITE
-    if (rFontSelData.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
+    if (rFontSelData.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
         != STRING_NOTFOUND)
     {
         rtl::OString aFeatName = rtl::OUStringToOString( rFontSelData.maTargetName, 
RTL_TEXTENCODING_UTF8 );
@@ -138,9 +138,9 @@
    if (rA.meLanguage != rB.meLanguage)
         return false;
    // check for features
-   if ((rA.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
+   if ((rA.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
         != STRING_NOTFOUND ||
-        rB.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
+        rB.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
         != STRING_NOTFOUND) && rA.maTargetName != rB.maTargetName)
         return false;
 #endif
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index 20c1d36..0842a01 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -54,9 +54,9 @@
                         ImplDevFontListData( const String& rSearchName );
                         ~ImplDevFontListData();
 
-    const String&       GetFamilyName() const    { return maName; }
+    const OUString&     GetFamilyName() const    { return maName; }
     const String&       GetSearchName() const    { return maSearchName; }
-    const String&       GetAliasNames() const    { return maMapNames; }
+    const OUString&     GetAliasNames() const    { return maMapNames; }
     bool                IsScalable() const       { return mpFirst->IsScalable(); }
     int                 GetMinQuality() const    { return mnMinQuality; }
 
@@ -73,9 +73,9 @@
 private:
 friend class ImplDevFontList; // TODO: remove soon
     PhysicalFontFace*   mpFirst;            // linked list of physical font faces
-    String              maName;             // Fontname (original font family name)
+    OUString            maName;             // Fontname (original font family name)
     String              maSearchName;       // normalized font family name
-    String              maMapNames;         // fontname aliases
+    OUString            maMapNames;         // fontname aliases
     sal_uIntPtr         mnTypeFaces;        // Typeface Flags
     sal_uIntPtr         mnMatchType;        // MATCH - Type
     String              maMatchFamilyName;  // MATCH - FamilyName
@@ -148,13 +148,13 @@
 
 struct ImplFontSubstEntry
 {
-    String                  maName;
-    String                  maReplaceName;
-    String                  maSearchName;
-    String                  maSearchReplaceName;
-    sal_uInt16                  mnFlags;
+    String                    maName;
+    String                    maReplaceName;
+    OUString                  maSearchName;
+    OUString                  maSearchReplaceName;
+    sal_uInt16                mnFlags;
 
-    ImplFontSubstEntry(  const String& rFontName, const String& rSubstFontName, sal_uInt16 
nSubstFlags );
+    ImplFontSubstEntry(  const OUString& rFontName, const OUString& rSubstFontName, sal_uInt16 
nSubstFlags );
 };
 
 class ImplDirectFontSubstitution
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 42d552b..e3a516f 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -54,17 +54,17 @@
 class ImplFontAttributes
 {
 public: // TODO: create matching interface class
-    const String&   GetFamilyName() const   { return maName; }
-    const String&   GetStyleName() const    { return maStyleName; }
+    const OUString& GetFamilyName() const   { return maName; }
+    const OUString& GetStyleName() const    { return maStyleName; }
     FontWeight      GetWeight() const       { return meWeight; }
     FontItalic      GetSlant() const        { return meItalic; }
     FontFamily      GetFamilyType() const   { return meFamily; }
     FontPitch       GetPitch() const        { return mePitch; }
     FontWidth       GetWidthType() const    { return meWidthType; }
     bool            IsSymbolFont() const    { return mbSymbolFlag; }
-    void            SetFamilyName(const String sFamilyName)    { maName = sFamilyName; }
-    void            SetStyleName( const String sStyleName)           { maStyleName = sStyleName; }
-    void            SetFamilyType(const FontFamily eFontFamily)    { meFamily = eFontFamily; }
+    void            SetFamilyName(const OUString sFamilyName)    { maName = sFamilyName; }
+    void            SetStyleName( const OUString sStyleName)     { maStyleName = sStyleName; }
+    void            SetFamilyType(const FontFamily eFontFamily)  { meFamily = eFontFamily; }
     void            SetPitch(const FontPitch ePitch )          { mePitch = ePitch; }
     void            SetItalic(const FontItalic eItalic )       { meItalic = eItalic; }
     void            SetWeight(const FontWeight eWeight )       { meWeight = eWeight; }
@@ -77,8 +77,8 @@
     }
 
 private:
-    String          maName;         // Font Family Name
-    String          maStyleName;    // Font Style Name
+    OUString        maName;         // Font Family Name
+    OUString        maStyleName;    // Font Style Name
     FontWeight      meWeight;       // Weight Type
     FontItalic      meItalic;       // Slant Type
     FontFamily      meFamily;       // Family Type
@@ -138,8 +138,8 @@
     PhysicalFontFace*       CreateAlias() const         { return Clone(); }
 
     bool                    IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const;
-    StringCompare           CompareWithSize( const PhysicalFontFace& ) const;
-    StringCompare           CompareIgnoreSize( const PhysicalFontFace& ) const;
+    sal_Int32           CompareWithSize( const PhysicalFontFace& ) const;
+    sal_Int32           CompareIgnoreSize( const PhysicalFontFace& ) const;
     virtual                 ~PhysicalFontFace() {}
     virtual PhysicalFontFace* Clone() const = 0;
 
@@ -172,8 +172,8 @@
     }
 
 public:
-    String              maTargetName;       // name of the font name token that is chosen
-    String              maSearchName;       // name of the font that matches best
+    OUString            maTargetName;       // name of the font name token that is chosen
+    OUString            maSearchName;       // name of the font that matches best
     int                 mnWidth;            // width of font in pixel units
     int                 mnHeight;           // height of font in pixel units
     float               mfExactHeight;      // requested height (in pixels with subpixel details)
@@ -234,7 +234,7 @@
     // find the device font
     ImplDevFontListData*    FindFontFamily( const String& rFontName ) const;
     ImplDevFontListData*    ImplFindByFont( FontSelectPattern&, bool bPrinter, 
ImplDirectFontSubstitution* ) const;
-    ImplDevFontListData*    ImplFindBySearchName( const String& ) const;
+    ImplDevFontListData*    ImplFindBySearchName( const OUString& ) const;
 
     // suggest fonts for glyph fallback
     ImplDevFontListData*    GetGlyphFallbackFont( FontSelectPattern&,
@@ -362,7 +362,7 @@
     bool                mbInit;             // true if maMetric member is valid
 
     void                AddFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& 
rFontName );
-    bool                GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, String* pFontName ) 
const;
+    bool                GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, OUString* pFontName ) 
const;
     void                IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& 
rFontName );
 
 private:
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 13e3f2e..a6d8e48 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -382,10 +382,10 @@
             aText = mpSubEdit->GetText();
 
             // remove all entries to which there is an entry, but which is not selected
-            xub_StrLen nIndex = 0;
-            while ( nIndex != STRING_NOTFOUND )
+            sal_Int32 nIndex = 0;
+            while ( nIndex != -1 )
             {
-                xub_StrLen  nPrevIndex = nIndex;
+                sal_Int32  nPrevIndex = nIndex;
                 XubString   aToken = aText.GetToken( 0, mcMultiSep, nIndex );
                 xub_StrLen  nTokenLen = aToken.Len();
                 aToken = comphelper::string::strip(aToken, ' ');
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index b80e8e0..1ce1a0d 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -168,7 +168,7 @@
     sal_uLong       nType = 0;
     FontWeight  eWeight = WEIGHT_DONTKNOW;
     FontWidth   eWidthType = WIDTH_DONTKNOW;
-    String      aMapName = maFamilyName;
+    OUString    aMapName = maFamilyName;
     GetEnglishSearchFontName( aMapName );
     utl::FontSubstConfiguration::getMapName( aMapName,
         aShortName, aFamilyName, eWeight, eWidthType, nType );
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index da6d40e..59e6d0c 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -359,8 +359,8 @@
 
 // -----------------------------------------------------------------------
 
-ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
-    const String& rSubstFontName, sal_uInt16 nSubstFlags )
+ImplFontSubstEntry::ImplFontSubstEntry( const OUString& rFontName,
+    const OUString& rSubstFontName, sal_uInt16 nSubstFlags )
 :   maName( rFontName )
 ,   maReplaceName( rSubstFontName )
 ,   mnFlags( nSubstFlags )
@@ -434,11 +434,11 @@
 
 // -----------------------------------------------------------------------
 
-static void ImplFontSubstitute( String& rFontName,
+static void ImplFontSubstitute( OUString& rFontName,
     sal_uInt16 nFlags, ImplDirectFontSubstitution* pDevSpecific )
 {
 #ifdef DBG_UTIL
-    String aTempName = rFontName;
+    OUString aTempName = rFontName;
     GetEnglishSearchFontName( aTempName );
     DBG_ASSERT( aTempName == rFontName, "ImplFontSubstitute() called without a searchname" );
 #endif
@@ -553,9 +553,9 @@
             pOutDev->ImplInitFontList();
 
             // Search Font in the FontList
-            String      aName;
-            String      aSearchName;
-            xub_StrLen  nIndex = 0;
+            OUString      aName;
+            OUString      aSearchName;
+            sal_Int32     nIndex = 0;
             do
             {
                 aSearchName = GetNextFontToken( aSearch, nIndex );
@@ -568,7 +568,7 @@
                         break;
                 }
             }
-            while ( nIndex != STRING_NOTFOUND );
+            while ( nIndex != -1 );
             aFont.SetName( aName );
         }
 
@@ -582,7 +582,7 @@
                     pOutDev = (const OutputDevice *)ImplGetSVData()->mpDefaultWin;
                 if( !pOutDev )
                 {
-                    xub_StrLen nIndex = 0;
+                    sal_Int32 nIndex = 0;
                     aFont.SetName( aSearch.GetToken( 0, ';', nIndex ) );
                 }
                 else
@@ -744,14 +744,14 @@
 {
     // StarSymbol is a unicode font, but it still deserves the symbol flag
     if( !IsSymbolFont() )
-        if( 0 == GetFamilyName().CompareIgnoreCaseToAscii( "starsymbol", 10)
-        ||  0 == GetFamilyName().CompareIgnoreCaseToAscii( "opensymbol", 10) )
+        if( 0 == GetFamilyName().compareTo( "starsymbol", 10)
+        ||  0 == GetFamilyName().compareTo( "opensymbol", 10) )
             SetSymbolFlag( true );
 }
 
 // -----------------------------------------------------------------------
 
-StringCompare PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const
+sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const
 {
     // compare their width, weight, italic and style name
     if( GetWidthType() < rOther.GetWidthType() )
@@ -769,15 +769,15 @@
     else if( GetSlant() > rOther.GetSlant() )
         return COMPARE_GREATER;
 
-    StringCompare eCompare = GetFamilyName().CompareTo( rOther.GetFamilyName() );
+    sal_Int32 eCompare = GetFamilyName().compareTo( rOther.GetFamilyName() );
     return eCompare;
 }
 
 // -----------------------------------------------------------------------
 
-StringCompare PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const
+sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const
 {
-    StringCompare eCompare = CompareIgnoreSize( rOther );
+    sal_Int32 eCompare = CompareIgnoreSize( rOther );
     if( eCompare != COMPARE_EQUAL )
         return eCompare;
 
@@ -809,12 +809,12 @@
 {
     int nMatch = 0;
 
-    const String& rFontName = rFSD.maTargetName;
-    if( (rFontName == GetFamilyName()) || rFontName.EqualsIgnoreCaseAscii( GetFamilyName() ) )
+    const OUString& rFontName = rFSD.maTargetName;
+    if( (rFontName == GetFamilyName()) || rFontName.compareTo( GetFamilyName() ) )
         nMatch += 240000;
 
     if( rStatus.mpTargetStyleName
-    &&  GetStyleName().EqualsIgnoreCaseAscii( rStatus.mpTargetStyleName ) )
+    &&  GetStyleName().compareTo( rStatus.mpTargetStyleName ) )
         nMatch += 120000;
 
     if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) )
@@ -988,7 +988,7 @@
 
 // -----------------------------------------------------------------------
 
-inline bool ImplFontEntry::GetFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, String* 
pFontName ) const
+inline bool ImplFontEntry::GetFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, OUString* 
pFontName ) const
 {
     if( !mpUnicodeFallbackList )
         return false;
@@ -1113,7 +1113,7 @@
     PhysicalFontFace** ppHere = &mpFirst;
     for(; (pData=*ppHere) != NULL; ppHere=&pData->mpNext )
     {
-        StringCompare eComp = pNewData->CompareWithSize( *pData );
+        sal_Int32 eComp = pNewData->CompareWithSize( *pData );
         if( eComp == COMPARE_GREATER )
             continue;
         if( eComp == COMPARE_LESS )
@@ -1396,7 +1396,7 @@
             cChar = rMissingCodes.iterateCodePoints( &nStrIndex );
             bCached = rFontSelData.mpFontEntry->GetFallbackForUnicode( cChar, 
rFontSelData.GetWeight(), &rFontSelData.maSearchName );
             // ignore entries which don't have a fallback
-            if( !bCached || (rFontSelData.maSearchName.Len() != 0) )
+            if( !bCached || (rFontSelData.maSearchName.getLength() != 0) )
                 break;
         }
 
@@ -1406,7 +1406,7 @@
             // so update rMissingCodes with codepoints not yet resolved by this fallback
             int nRemainingLength = 0;
             sal_UCS4* pRemainingCodes = (sal_UCS4*)alloca( rMissingCodes.getLength() * 
sizeof(sal_UCS4) );
-            String aFontName;
+            OUString aFontName;
             while( nStrIndex < rMissingCodes.getLength() )
             {
                 cChar = rMissingCodes.iterateCodePoints( &nStrIndex );
@@ -1424,7 +1424,7 @@
                 // apply outdev3.cxx specific fontname normalization
                 GetEnglishSearchFontName( rFontSelData.maSearchName );
             else
-                rFontSelData.maSearchName = String();
+                rFontSelData.maSearchName = OUString();
 
             //See fdo#32665 for an example. FreeSerif that has glyphs in normal
             //font, but not in the italic or bold version
@@ -1443,7 +1443,7 @@
                          break;
                      cChar = aOldMissingCodes.iterateCodePoints( &nStrIndex );
                 }
-                if( rFontSelData.maSearchName.Len() != 0 )
+                if( rFontSelData.maSearchName.getLength() != 0 )
                 {
                     // remove cache entries that were still not resolved
                     for( nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); )
@@ -1456,7 +1456,7 @@
         }
 
         // find the matching device font
-        if( rFontSelData.maSearchName.Len() != 0 )
+        if( rFontSelData.maSearchName.getLength() != 0 )
             pFallbackData = FindFontFamily( rFontSelData.maSearchName );
     }
 
@@ -1478,7 +1478,7 @@
 
 void ImplDevFontList::Add( PhysicalFontFace* pNewData )
 {
-    String aSearchName = pNewData->GetFamilyName();
+    OUString aSearchName = pNewData->GetFamilyName();
     GetEnglishSearchFontName( aSearchName );
 
     DevFontList::const_iterator it = maDevFontList.find( aSearchName );
@@ -1501,7 +1501,7 @@
 // -----------------------------------------------------------------------
 
 // find the font from the normalized font family name
-ImplDevFontListData* ImplDevFontList::ImplFindBySearchName( const String& rSearchName ) const
+ImplDevFontListData* ImplDevFontList::ImplFindBySearchName( const OUString& rSearchName ) const
 {
 #ifdef DEBUG
     String aTempName = rSearchName;
@@ -1536,12 +1536,12 @@
     while( it != maDevFontList.end() )
     {
         ImplDevFontListData* pData = (*it).second;
-        if( !pData->maMapNames.Len() )
+        if( !pData->maMapNames.getLength() )
             continue;
 
         // if one alias name matches we found a matching font
         rtl::OUString aTempName;
-        xub_StrLen nIndex = 0;
+        sal_Int32 nIndex = 0;
         do
         {
            aTempName = GetNextFontToken( pData->maMapNames, nIndex );
@@ -1549,7 +1549,7 @@
            if ( (aTempName == rSearchName) || (aTempName == rShortName) )
               return pData;
         }
-        while ( nIndex != STRING_NOTFOUND );
+        while ( nIndex != -1 );
      }
 
      return NULL;
@@ -1560,7 +1560,7 @@
 ImplDevFontListData* ImplDevFontList::FindFontFamily( const String& rFontName ) const
 {
     // normalize the font fomily name and
-    String aName = rFontName;
+    OUString aName = rFontName;
     GetEnglishSearchFontName( aName );
     ImplDevFontListData* pFound = ImplFindBySearchName( aName );
     return pFound;
@@ -1573,10 +1573,10 @@
     ImplDevFontListData* pFoundData = NULL;
 
     // use normalized font name tokens to find the font
-    for( xub_StrLen nTokenPos = 0; nTokenPos != STRING_NOTFOUND; )
+    for( sal_Int32 nTokenPos = 0; nTokenPos != -1; )
     {
-        String aSearchName = GetNextFontToken( rTokenStr, nTokenPos );
-        if( !aSearchName.Len() )
+        OUString aSearchName = GetNextFontToken( rTokenStr, nTokenPos );
+        if( !aSearchName.getLength() )
             continue;
         GetEnglishSearchFontName( aSearchName );
         pFoundData = ImplFindBySearchName( aSearchName );
@@ -1597,7 +1597,7 @@
     ::std::vector< String >::const_iterator it = rFontAttr.Substitutions.begin();
     for(; it != rFontAttr.Substitutions.end(); ++it )
     {
-        String aSearchName( *it );
+        OUString aSearchName( *it );
         GetEnglishSearchFontName( aSearchName );
 
         pFoundData = ImplFindBySearchName( aSearchName );
@@ -2201,8 +2201,8 @@
     size_t nHash = aFontNameHash( maSearchName );
 #ifdef ENABLE_GRAPHITE
     // check for features and generate a unique hash if necessary
-    if (maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
-        != STRING_NOTFOUND)
+    if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
+        != -1)
     {
         nHash = aFontNameHash( maTargetName );
     }
@@ -2301,9 +2301,9 @@
 
 #ifdef ENABLE_GRAPHITE
     // check for features
-    if ((rA.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
+    if ((rA.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
          != STRING_NOTFOUND ||
-         rB.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
+         rB.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
          != STRING_NOTFOUND) && rA.maTargetName != rB.maTargetName)
         return false;
 #endif
@@ -2500,8 +2500,8 @@
         nSubstFlags |= FONT_SUBSTITUTE_SCREENONLY;
 
     bool bMultiToken = false;
-    xub_StrLen nTokenPos = 0;
-    String& aSearchName = rFSD.maSearchName; // TODO: get rid of reference
+    sal_Int32 nTokenPos = 0;
+    OUString& aSearchName = rFSD.maSearchName; // TODO: get rid of reference
     for(;;)
     {
         rFSD.maTargetName = GetNextFontToken( rFSD.GetFamilyName(), nTokenPos );
@@ -2510,11 +2510,11 @@
 #ifdef ENABLE_GRAPHITE
         // Until features are properly supported, they are appended to the
         // font name, so we need to strip them off so the font is found.
-        xub_StrLen nFeat = aSearchName.Search(grutils::GrFeatureParser::FEAT_PREFIX);
+        xub_StrLen nFeat = aSearchName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX);
         String aOrigName = rFSD.maTargetName;
-        String aBaseFontName(aSearchName, 0, (nFeat != STRING_NOTFOUND)?nFeat:aSearchName.Len());
+        String aBaseFontName(aSearchName, 0, (nFeat != 
STRING_NOTFOUND)?nFeat:aSearchName.getLength());
         if (nFeat != STRING_NOTFOUND && STRING_NOTFOUND !=
-            aSearchName.Search(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
+            aSearchName.indexOf(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
         {
             aSearchName = aBaseFontName;
             rFSD.maTargetName = aBaseFontName;
@@ -2527,23 +2527,23 @@
         // #114999# special emboldening for Ricoh fonts
         // TODO: smarter check for special cases by using PreMatch infrastructure?
         if( (rFSD.GetWeight() > WEIGHT_MEDIUM)
-        &&  aSearchName.EqualsAscii( "hg", 0, 2) )
+        &&  aSearchName.equalsIgnoreAsciiCase( "hg" ) )
         {
-            String aBoldName;
-            if( aSearchName.EqualsAscii( "hggothicb", 0, 9) )
-                aBoldName = String("hggothice");
-            else if( aSearchName.EqualsAscii( "hgpgothicb", 0, 10) )
-                aBoldName = String("hgpgothice");
-            else if( aSearchName.EqualsAscii( "hgminchol", 0, 9) )
-                aBoldName = String("hgminchob");
-            else if( aSearchName.EqualsAscii( "hgpminchol", 0, 10) )
-                aBoldName = String("hgpminchob");
-            else if( aSearchName.EqualsAscii( "hgminchob" ) )
-                aBoldName = String("hgminchoe");
-            else if( aSearchName.EqualsAscii( "hgpminchob" ) )
-                aBoldName = String("hgpminchoe");
+            OUString aBoldName;
+            if( aSearchName.equalsIgnoreAsciiCase( "hggothicb" ) )
+                aBoldName = OUString("hggothice");
+            else if( aSearchName.equalsIgnoreAsciiCase( "hgpgothicb" ) )
+                aBoldName = OUString("hgpgothice");
+            else if( aSearchName.equalsIgnoreAsciiCase( "hgminchol" ) )
+                aBoldName = OUString("hgminchob");
+            else if( aSearchName.equalsIgnoreAsciiCase( "hgpminchol" ) )
+                aBoldName = OUString("hgpminchob");
+            else if( aSearchName.equalsIgnoreAsciiCase( "hgminchob" ) )
+                aBoldName = OUString("hgminchoe");
+            else if( aSearchName.equalsIgnoreAsciiCase( "hgpminchob" ) )
+                aBoldName = OUString("hgpminchoe");
 
-            if( aBoldName.Len() && ImplFindBySearchName( aBoldName ) )
+            if( aBoldName.getLength() && ImplFindBySearchName( aBoldName ) )
             {
                 // the other font is available => use it
                 aSearchName = aBoldName;
@@ -2599,7 +2599,7 @@
             return pFoundData;
 
         // break after last font name token was checked unsuccessfully
-        if( nTokenPos == STRING_NOTFOUND)
+        if( nTokenPos == -1)
             break;
         bMultiToken = true;
     }
@@ -2609,7 +2609,7 @@
     // available when there is a matching entry in the Tools->Options->Fonts
     // dialog witho neither ALWAYS nor SCREENONLY flags set and the substitution
     // font is available
-    for( nTokenPos = 0; nTokenPos != STRING_NOTFOUND; )
+    for( nTokenPos = 0; nTokenPos != -1; )
     {
         if( bMultiToken )
         {
@@ -2618,7 +2618,7 @@
             GetEnglishSearchFontName( aSearchName );
         }
         else
-            nTokenPos = STRING_NOTFOUND;
+            nTokenPos = -1;
         if( mpPreMatchHook )
             if( mpPreMatchHook->FindFontSubstitute( rFSD ) )
                 GetEnglishSearchFontName( aSearchName );
@@ -2642,7 +2642,7 @@
     String      aSearchFamilyName;
     FontWeight  eSearchWeight   = rFSD.GetWeight();
     FontWidth   eSearchWidth    = rFSD.GetWidthType();
-    sal_uLong       nSearchType     = 0;
+    sal_uLong   nSearchType     = 0;
     FontSubstConfiguration::getMapName( aSearchName, aSearchShortName, aSearchFamilyName,
                                         eSearchWeight, eSearchWidth, nSearchType );
 
@@ -2672,7 +2672,7 @@
 
     // use font fallback
     const FontNameAttr* pFontAttr = NULL;
-    if( aSearchName.Len() )
+    if( aSearchName.getLength() )
     {
         // get fallback info using FontSubstConfiguration and
         // the target name, it's shortened name and family name in that order
@@ -2703,10 +2703,10 @@
     }
 
     // now try the other font name tokens
-    while( nTokenPos != STRING_NOTFOUND )
+    while( nTokenPos != -1 )
     {
         rFSD.maTargetName = GetNextFontToken( rFSD.GetFamilyName(), nTokenPos );
-        if( !rFSD.maTargetName.Len() )
+        if( !rFSD.maTargetName.getLength() )
             continue;
 
         aSearchName = rFSD.maTargetName;
@@ -2714,7 +2714,7 @@
 
         String      aTempShortName;
         String      aTempFamilyName;
-        sal_uLong       nTempType   = 0;
+        sal_uLong   nTempType   = 0;
         FontWeight  eTempWeight = rFSD.GetWeight();
         FontWidth   eTempWidth  = WIDTH_DONTKNOW;
         FontSubstConfiguration::getMapName( aSearchName, aTempShortName, aTempFamilyName,
@@ -3406,7 +3406,7 @@
     }
     else
     {
-        xub_StrLen nTokenPos = 0;
+        sal_Int32 nTokenPos = 0;
         SetFamilyName( GetNextFontToken( rFontSelData.GetFamilyName(), nTokenPos ) );
         SetStyleName( rFontSelData.GetStyleName() );
         mbDevice   = false;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 47437dd..0d81f69 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -319,8 +319,8 @@
     {
         ImplInitFontList();
         String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( 
rSettings.GetUILanguageTag().getLocale() );
-        xub_StrLen nIndex = 0;
-        while( nIndex != STRING_NOTFOUND )
+        sal_Int32 nIndex = 0;
+        while( nIndex != -1 )
         {
             String aName( aConfigFont.GetToken( 0, ';', nIndex ) );
             if ( aName.Len() && mpWindowImpl->mpFrameData->mpFontList->FindFontFamily( aName ) )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If64db96005fcd8a42e4fa24041867b99183965f9
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Prashant Pandey <prashant3.yishu@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.