[Libreoffice-commits] .: 2 commits - basic/source desktop/source extensions/source filter/source i18npool/source rsc/source sc/source svtools/source sw/source tools/inc tools/source unotools/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jun 19 01:14:40 PDT 2012


 basic/source/runtime/iosys.cxx                      |    2 +-
 desktop/source/app/lockfile2.cxx                    |    6 +++---
 extensions/source/scanner/sanedlg.cxx               |    4 ++--
 filter/source/graphicfilter/idxf/dxf2mtf.cxx        |    4 ++--
 i18npool/source/breakiterator/breakiterator_ctl.cxx |    2 --
 rsc/source/rsc/rsc.cxx                              |   20 ++++++++++----------
 sc/source/filter/lotus/lotform.cxx                  |    2 +-
 sc/source/filter/qpro/qproform.cxx                  |    2 +-
 svtools/source/edit/texteng.cxx                     |    4 ++--
 svtools/source/filter/wmf/wmfwr.cxx                 |    8 ++++----
 svtools/source/svhtml/parhtml.cxx                   |    2 +-
 sw/source/core/edit/edtox.cxx                       |    2 +-
 sw/source/core/swg/SwXMLTextBlocks.cxx              |    2 +-
 sw/source/filter/html/css1atr.cxx                   |    2 +-
 sw/source/ui/dbui/dbmgr.cxx                         |    2 +-
 sw/source/ui/dbui/mmoutputpage.cxx                  |    2 +-
 tools/inc/tools/inetmsg.hxx                         |    4 ++--
 tools/source/fsys/dirent.cxx                        |    8 ++++----
 tools/source/fsys/unx.cxx                           |    4 ++--
 unotools/source/i18n/textsearch.cxx                 |    2 +-
 unotools/source/ucbhelper/tempfile.cxx              |    2 +-
 vcl/unx/generic/printer/ppdparser.cxx               |   12 ++++++------
 vcl/unx/generic/printer/printerinfomanager.cxx      |    4 ++--
 23 files changed, 50 insertions(+), 52 deletions(-)

New commits:
commit bd6f2bb7eed1a866bfb8d63b0dcba9be8c283f7f
Author: Christophe Christophe Marion <christophe.jaillet at wanadoo.fr>
Date:   Mon Jun 18 22:48:25 2012 +0200

    Remove a useless include

diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx b/i18npool/source/breakiterator/breakiterator_ctl.cxx
index 5d1d7a1..3cf177c 100644
--- a/i18npool/source/breakiterator/breakiterator_ctl.cxx
+++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx
@@ -30,8 +30,6 @@
 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
 #include <breakiterator_ctl.hxx>
 
-#include <string.h> // for memset
-
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::rtl;
commit bd4f553ef03b45b4126314fa8287f933988575ea
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 18 18:40:40 2012 +0100

    remove some UniString ctors
    
    Change-Id: Ic2e712f4447b733b79d980e178d9d6d9d8bf0e40

diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index d3aab0b..0cf4578 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -888,7 +888,7 @@ void SbiIoSystem::CloseAll(void)
 
 void SbiIoSystem::ReadCon(rtl::OString& rIn)
 {
-    String aPromptStr( aPrompt, osl_getThreadTextEncoding() );
+    rtl::OUString aPromptStr(rtl::OStringToOUString(aPrompt, osl_getThreadTextEncoding()));
     SbiInputDialog aDlg( NULL, aPromptStr );
     if( aDlg.Execute() )
         rIn = rtl::OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding());
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index 1f00d65..1eebcca 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -55,11 +55,11 @@ bool Lockfile_execWarning( Lockfile * that )
     // insert values...
     String aMsgText = aBox.GetMessText( );
     aMsgText.SearchAndReplaceAscii(
-        "$u", String( aUser, RTL_TEXTENCODING_ASCII_US) );
+        "$u", rtl::OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) );
     aMsgText.SearchAndReplaceAscii(
-        "$h", String( aHost, RTL_TEXTENCODING_ASCII_US) );
+        "$h", rtl::OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) );
     aMsgText.SearchAndReplaceAscii(
-        "$t", String( aTime, RTL_TEXTENCODING_ASCII_US) );
+        "$t", rtl::OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) );
     aBox.SetMessText(aMsgText);
     // do it
     return aBox.Execute( ) == RET_YES;
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 4fbd382..ef2e0b1 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -832,7 +832,7 @@ void SaneDlg::EstablishStringOption()
     {
         maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) );
         maOptionDescTxt.Show( sal_True );
-        maStringEdit.SetText( String( aValue, osl_getThreadTextEncoding() ) );
+        maStringEdit.SetText(rtl::OStringToOUString(aValue, osl_getThreadTextEncoding()));
         maStringEdit.Show( sal_True );
     }
 }
@@ -845,7 +845,7 @@ void SaneDlg::EstablishStringRange()
         maStringRangeBox.InsertEntry( String( ppStrings[i], osl_getThreadTextEncoding() ) );
     rtl::OString aValue;
     mrSane.GetOptionValue( mnCurrentOption, aValue );
-    maStringRangeBox.SelectEntry( String( aValue, osl_getThreadTextEncoding() ) );
+    maStringRangeBox.SelectEntry(rtl::OStringToOUString(aValue, osl_getThreadTextEncoding()));
     maStringRangeBox.Show( sal_True );
     maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) );
     maOptionDescTxt.Show( sal_True );
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index d05abb4..b6ea30e 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -433,7 +433,7 @@ void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransfor
     aT.TransDir(DXFVector(1,0,0),aV);
     if ( SetFontAttribute( rE,nAng, nHeight, aV. Abs() ) )
     {
-        String aUString( aStr, pDXF->getTextEncoding() );
+        rtl::OUString aUString(rtl::OStringToOUString(aStr, pDXF->getTextEncoding()));
         aT.Transform( DXFVector( 0, 0, 0 ), aPt );
         pVirDev->DrawText( aPt, aUString );
     }
@@ -492,7 +492,7 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran
         aT.TransDir(DXFVector(1,0,0),aV);
         if (SetFontAttribute(rE,nAng,nHeight,aV.Abs()))
         {
-            String aUString( aStr, pDXF->getTextEncoding() );
+            rtl::OUString aUString(rtl::OStringToOUString(aStr, pDXF->getTextEncoding()));
             aT.Transform( DXFVector( 0, 0, 0 ), aPt );
             pVirDev->DrawText( aPt, aUString );
         }
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index d9018d4..45e5305 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -178,7 +178,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
                 if( *pEqual )
                 {
                     const rtl::OString aSPath( pEqual + 1 );
-                    DirEntry            aSDir( String( aSPath, RTL_TEXTENCODING_ASCII_US ) );
+                    DirEntry            aSDir(rtl::OStringToOUString(aSPath, RTL_TEXTENCODING_ASCII_US));
 
                     m_aReplacements.push_back( std::pair< OString, OString >( OString( (*ppStr)+4, pEqual - *ppStr - 4 ),
                         rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) );
@@ -654,9 +654,9 @@ ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey )
                 // Kein Pfad und Include Datei
                 if( pFNTmp && !pFNTmp->bLoaded )
                 {
-                    UniString aUniFileName( pFNTmp->aFileName, RTL_TEXTENCODING_ASCII_US );
-                    DirEntry aFullName( aUniFileName );
-                    if ( aFullName.Find( UniString( pCL->aPath, RTL_TEXTENCODING_ASCII_US ) ) )
+                    rtl::OUString aUniFileName(rtl::OStringToOUString(pFNTmp->aFileName, RTL_TEXTENCODING_ASCII_US));
+                    DirEntry aFullName(aUniFileName);
+                    if ( aFullName.Find(rtl::OStringToOUString(pCL->aPath, RTL_TEXTENCODING_ASCII_US)) )
                     {
                         pFNTmp->aPathName = rtl::OUStringToOString(
                             aFullName.GetFull(), RTL_TEXTENCODING_ASCII_US);
@@ -704,7 +704,7 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
             pFName->bLoaded = sal_False; //bei Fehler nicht geladenen
         else
         {
-            String      aTmpName( ::GetTmpFileName(), RTL_TEXTENCODING_ASCII_US );
+            rtl::OUString aTmpName(rtl::OStringToOUString(::GetTmpFileName(), RTL_TEXTENCODING_ASCII_US));
             DirEntry    aTmpPath( aTmpName ), aSrsPath(rtl::OStringToOUString(pFName->aPathName, RTL_TEXTENCODING_ASCII_US));
 
             aTmpPath.ToAbs();
@@ -982,7 +982,7 @@ ERRTYPE RscCompiler::Link()
         rtl::OString aHxx = pCL->aOutputHxx;
         if( aHxx.isEmpty() )
         {
-            UniString aUniOutputCxx( pCL->aOutputCxx, RTL_TEXTENCODING_ASCII_US );
+            rtl::OUString aUniOutputCxx(rtl::OStringToOUString(pCL->aOutputCxx, RTL_TEXTENCODING_ASCII_US));
             aHxx = rtl::OStringBuffer(rtl::OUStringToOString(DirEntry(aUniOutputCxx).GetBase(),
                 RTL_TEXTENCODING_ASCII_US)).append(".hxx").makeStringAndClear();
         }
@@ -1072,9 +1072,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
 
         while( ( aDirIter != rOutputFile.aSysSearchDirs.end() ) && !bFound )
         {
-            const DirEntry  aPath( String( *aDirIter, RTL_TEXTENCODING_ASCII_US ) );
+            const DirEntry  aPath( rtl::OStringToOUString(*aDirIter, RTL_TEXTENCODING_ASCII_US) );
             DirEntry        aRelPath( aPath );
-            DirEntry        aAbsPath( aRelPath += DirEntry( String( *aFileIter, RTL_TEXTENCODING_ASCII_US ) ) );
+            DirEntry        aAbsPath( aRelPath += DirEntry(rtl::OStringToOUString(*aFileIter, RTL_TEXTENCODING_ASCII_US)) );
 
             aAbsPath.ToAbs();
             const FileStat aFS( aAbsPath.GetFull() );
@@ -1114,8 +1114,8 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
 
                 if( bFound && pSysListFile )
                 {
-                    DirEntry    aSysPath( String( *aDirIter, RTL_TEXTENCODING_ASCII_US ) );
-                    String      aSysPathFull( ( aSysPath += DirEntry( String( *aFileIter, RTL_TEXTENCODING_ASCII_US ) ) ).GetFull() );
+                    DirEntry    aSysPath(rtl::OStringToOUString(*aDirIter, RTL_TEXTENCODING_ASCII_US));
+                    String      aSysPathFull( ( aSysPath += DirEntry( rtl::OStringToOUString( *aFileIter, RTL_TEXTENCODING_ASCII_US ) ) ).GetFull() );
                     OString     aSysPathStr( aSysPathFull.GetBuffer(), aSysPathFull.Len(), RTL_TEXTENCODING_ASCII_US );
 
                     fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPathStr ).getStr() );
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 2678f09..6fbd929 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -84,7 +84,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri
         if( eOc == ocNoName )
         {
             bAddIn = sal_True;
-            nMerk0 = aPool.Store( eOc, String( t, eSrcChar ) );
+            nMerk0 = aPool.Store(eOc, rtl::OStringToOUString(t, eSrcChar));
 
             aPool << nMerk0;
         }
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index e9f5dec..a68d439 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -103,7 +103,7 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr
         {
             rtl::OStringBuffer s(RTL_CONSTASCII_STRINGPARAM("QPRO_"));
             s.append(pExtString);
-            nPush = aPool.Store( eOc, String(s.makeStringAndClear(), maIn.GetStreamCharSet()) );
+            nPush = aPool.Store(eOc, rtl::OStringToOUString(s.makeStringAndClear(), maIn.GetStreamCharSet()));
             aPool << nPush;
         }
         else
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index aaf7def..9ea2dcd 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -2573,12 +2573,12 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
 
     rtl::OString aLine;
     sal_Bool bDone = rInput.ReadLine( aLine );
-    String aTmpStr( aLine, rInput.GetStreamCharSet() ), aStr;
+    rtl::OUString aTmpStr(rtl::OStringToOUString(aLine, rInput.GetStreamCharSet())), aStr;
     while ( bDone )
     {
         aSel = ImpInsertText( aSel, aTmpStr );
         bDone = rInput.ReadLine( aLine );
-        aTmpStr = String( aLine, rInput.GetStreamCharSet() );
+        aTmpStr = rtl::OStringToOUString(aLine, rInput.GetStreamCharSet());
         if ( bDone )
             aSel = ImpInsertParaBreak( aSel.GetEnd() );
     }
diff --git a/svtools/source/filter/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx
index 9cab2f0..c4fb193 100644
--- a/svtools/source/filter/wmf/wmfwr.cxx
+++ b/svtools/source/filter/wmf/wmfwr.cxx
@@ -559,8 +559,8 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
             const sal_Unicode* pBuf = rUniStr.GetBuffer();
             const rtl_TextEncoding aTextEncodingOrg = aSrcFont.GetCharSet();
             rtl::OString aByteStr(rtl::OUStringToOString(rUniStr, aTextEncodingOrg));
-            String     aUniStr2( aByteStr, aTextEncodingOrg );
-            const sal_Unicode* pConversion = aUniStr2.GetBuffer();  // this is the unicode array after bytestring <-> unistring conversion
+            rtl::OUString aUniStr2(rtl::OStringToOUString(aByteStr, aTextEncodingOrg));
+            const sal_Unicode* pConversion = aUniStr2.getStr();  // this is the unicode array after bytestring <-> unistring conversion
             for ( i = 0; i < nStringLen; i++ )
             {
                 if ( *pBuf++ != *pConversion++ )
@@ -581,8 +581,8 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
                 }
 
                 aByteStr = rtl::OUStringToOString(rUniStr,  aTextEncoding);
-                aUniStr2 = String ( aByteStr, aTextEncoding );
-                pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion
+                aUniStr2 = rtl::OStringToOUString(aByteStr, aTextEncoding);
+                pConversion = aUniStr2.getStr(); // this is the unicode array after bytestring <-> unistring conversion
                 for ( i = 0; i < nStringLen; i++ )
                 {
                     if ( *pBuf++ != *pConversion++ )
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 36b81ec..5427d86 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1953,7 +1953,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
     // the string following '<' has to be a known HTML token.
     // <DIR> is not interpreted as HTML. Otherwise the output of the DOS command "DIR"
     // could be interpreted as HTML.
-    String sTest( sCmp.copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
+    rtl::OUString sTest(rtl::OStringToOUString(sCmp.copy(nStart, nPos-nStart), RTL_TEXTENCODING_ASCII_US));
     int nTok = GetHTMLToken( sTest );
     if( 0 != nTok && HTML_DIRLIST_ON != nTok )
         return true;
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index a9c2fdb..bbe4460 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -389,7 +389,7 @@ void SwEditShell::ApplyAutoMark()
             // Leading and trailing blanks are ignored
             if( !aRdLine.isEmpty() && '#' != aRdLine[0] )
             {
-                String sLine( aRdLine, eChrSet );
+                String sLine(rtl::OStringToOUString(aRdLine, eChrSet));
 
                 xub_StrLen nTokenPos = 0;
                 String sToSelect( sLine.GetToken(0, ';', nTokenPos ) );
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 6f786b0..17d3b5f 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -568,7 +568,7 @@ rtl::OUString SwXMLTextBlocks::GeneratePackageName ( const String& rShort )
     xub_StrLen nPos = 0;
     sal_Unicode pDelims[] = { '!', '/', ':', '.', '\\', 0 };
     rtl::OString sByte(rtl::OUStringToOString(aRet, RTL_TEXTENCODING_UTF7));
-    aRet = String (sByte, RTL_TEXTENCODING_ASCII_US);
+    aRet = rtl::OStringToOUString(sByte, RTL_TEXTENCODING_ASCII_US);
     while( STRING_NOTFOUND != ( nPos = aRet.SearchChar( pDelims, nPos )))
     {
         aRet.SetChar( nPos, '_' );
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 116fca8..7c5c69c 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1063,7 +1063,7 @@ static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
     if( nDeep )
     {
         if( !aToken.isEmpty() )
-            rSelector = String( aToken, RTL_TEXTENCODING_ASCII_US );
+            rSelector = rtl::OStringToOUString(aToken, RTL_TEXTENCODING_ASCII_US);
         else
             rSelector.Erase();
 
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 6cb4473..38a34c5 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1207,7 +1207,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                                                     sal_Bool bDone = pInStream->ReadLine( sLine );
                                                     while ( bDone )
                                                     {
-                                                        sBody += String(sLine, eEncoding);
+                                                        sBody += rtl::OStringToOUString(sLine, eEncoding);
                                                         sBody += ::rtl::OUString('\n');
                                                         bDone = pInStream->ReadLine( sLine );
                                                     }
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 8a59351..460bb07 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1250,7 +1250,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
                 sal_Bool bDone = pInStream->ReadLine( sLine );
                 while ( bDone )
                 {
-                    sBody += rtl::OUString(String(sLine, eEncoding));
+                    sBody += rtl::OStringToOUString(sLine, eEncoding);
                     sBody += rtl::OUString('\n');
                     bDone = pInStream->ReadLine( sLine );
                 }
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index c65f9b0..040a7ac 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -116,9 +116,9 @@ protected:
         sal_uIntPtr nIndex, rtl_TextEncoding eEncoding) const
     {
         if ( nIndex < m_aHeaderList.size() ) {
-            return UniString( m_aHeaderList[ nIndex ]->GetName(), eEncoding );
+            return rtl::OStringToOUString(m_aHeaderList[ nIndex ]->GetName(), eEncoding);
         } else {
-            return UniString();
+            return rtl::OUString();
         }
     }
 
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 8365d42..a5c88a6 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -915,13 +915,13 @@ sal_Bool DirEntry::First()
         DIR *pDir = opendir(aPathName.getStr());
         if ( pDir )
         {
-                WildCard aWildeKarte( String(CMP_LOWER( aName ), osl_getThreadTextEncoding()) );
+                WildCard aWildeKarte(rtl::OStringToOUString(CMP_LOWER(aName), osl_getThreadTextEncoding()));
                 for ( dirent* pEntry = readdir( pDir );
                           pEntry;
                           pEntry = readdir( pDir ) )
                 {
                         rtl::OString aFound(pEntry->d_name);
-                        if ( aWildeKarte.Matches( String(CMP_LOWER( aFound ), osl_getThreadTextEncoding())))
+                        if (aWildeKarte.Matches(rtl::OStringToOUString(CMP_LOWER(aFound), osl_getThreadTextEncoding())))
                         {
                                 aName = aFound;
                                 closedir( pDir );
@@ -1330,7 +1330,7 @@ DirEntry &DirEntry::operator+=( const DirEntry& rEntry )
 
 String DirEntry::GetAccessDelimiter( FSysPathStyle eFormatter )
 {
-        return String( ACCESSDELIM_C( GetStyle( eFormatter ) ) );
+        return rtl::OUString( ACCESSDELIM_C( GetStyle( eFormatter ) ) );
 }
 
 /*************************************************************************
@@ -1774,7 +1774,7 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
     FileStat aDestStat(rNewName);
     if ( aDestStat.IsKind(FSYS_KIND_DIR ) )
     {
-        aDest += String(aName, osl_getThreadTextEncoding());
+        aDest += DirEntry(rtl::OStringToOUString(aName, osl_getThreadTextEncoding()));
     }
     if ( aDest.Exists() )
     {
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 1e3f408..6be35f1 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -237,8 +237,8 @@ String DirEntry::GetVolume() const
     mymnttab &rMnt = mymnt::get();
     return ((buf.st_dev == rMnt.mountdevice ||
                 GetMountEntry(buf.st_dev, &rMnt)) ?
-                    String(rMnt.mountspecial, osl_getThreadTextEncoding()) :
-                    String());
+                    rtl::OStringToOUString(rMnt.mountspecial, osl_getThreadTextEncoding()) :
+                    rtl::OUString());
 }
 
 /*************************************************************************
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index cabbba4..c541790 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -291,7 +291,7 @@ void TextSearch::ReplaceBackReferences( String& rReplaceStr, const String &rStr,
 {
     if( rResult.subRegExpressions > 0 )
     {
-        String sTab( '\t' );
+        rtl::OUString sTab( '\t' );
         sal_Unicode sSrchChrs[] = {'\\', '&', '$', 0};
         String sTmp;
         xub_StrLen nPos = 0;
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index ed19793..6b634cb 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -468,7 +468,7 @@ String TempFile::SetTempNameBaseDirectory( const String &rBaseName )
         bRet = sal_True;
         ::rtl::OUString &rTempNameBase_Impl = TempNameBase_Impl::get();
         rTempNameBase_Impl = rBaseName;
-        rTempNameBase_Impl += String( '/' );
+        rTempNameBase_Impl += rtl::OUString('/');
 
         TempFile aBase( NULL, sal_True );
         if ( aBase.IsValid() )
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 4516497..42b05fc 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1099,7 +1099,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
                 nTransPos = aLine.indexOf('"');
                 if (nTransPos == -1)
                     nTransPos = aLine.getLength();
-                aValue = String( aLine.copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 );
+                aValue = rtl::OStringToOUString(aLine.copy(0, nTransPos), RTL_TEXTENCODING_MS_1252);
                 // after the second doublequote can follow a / and a translation
                 if (nTransPos < aLine.getLength() - 2)
                 {
@@ -1116,7 +1116,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
             else if(aLine[0] == '^')
             {
                 aLine = aLine.copy(1);
-                aValue = String( aLine, RTL_TEXTENCODING_MS_1252 );
+                aValue = rtl::OStringToOUString(aLine, RTL_TEXTENCODING_MS_1252);
                 eType = eSymbol;
             }
             else
@@ -1129,7 +1129,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
                 nTransPos = aLine.indexOf('/');
                 if (nTransPos == -1)
                     nTransPos = aLine.getLength();
-                aValue = String( aLine.copy( 0, nTransPos ), RTL_TEXTENCODING_MS_1252 );
+                aValue = rtl::OStringToOUString(aLine.copy(0, nTransPos), RTL_TEXTENCODING_MS_1252);
                 if (nTransPos+1 < aLine.getLength())
                     aValueTranslation = handleTranslation( aLine.copy( nTransPos+1 ), bIsGlobalizedLine );
                 eType = eString;
@@ -1193,7 +1193,7 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
         rtl::OString aLine(*line);
         if (aLine.matchL(RTL_CONSTASCII_STRINGPARAM("*Default")))
         {
-            String aKey( aLine.copy( 8 ), RTL_TEXTENCODING_MS_1252 );
+            String aKey(rtl::OStringToOUString(aLine.copy(8), RTL_TEXTENCODING_MS_1252));
             sal_uInt16 nPos = aKey.Search( ':' );
             if( nPos != STRING_NOTFOUND )
             {
@@ -1942,8 +1942,8 @@ void PPDContext::rebuildFromStreamBuffer( char* pBuffer, sal_uLong nBytes )
             if( pKey )
             {
                 const PPDValue* pValue = NULL;
-                String aOption( aLine.copy( nPos+1 ), RTL_TEXTENCODING_MS_1252 );
-                if( ! aOption.EqualsAscii( "*nil" ) )
+                rtl::OUString aOption(rtl::OStringToOUString(aLine.copy(nPos+1), RTL_TEXTENCODING_MS_1252));
+                if (aOption != "*nil")
                     pValue = pKey->getValue( aOption );
                 m_aCurrentValues[ pKey ] = pValue;
 #ifdef __DEBUG
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index d8d6f9b..a1d96cd 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -331,7 +331,7 @@ void PrinterInfoManager::initialize()
                 if (aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")))
                 {
                     aValue = aConfig.ReadKey( aKey );
-                    const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey( String( aKey.copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) );
+                    const PPDKey* pKey = m_aGlobalDefaults.m_pParser->getKey(rtl::OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1));
                     if( pKey )
                     {
                         m_aGlobalDefaults.m_aContext.
@@ -539,7 +539,7 @@ void PrinterInfoManager::initialize()
                     if( aKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) && aPrinter.m_aInfo.m_pParser )
                     {
                         aValue = aConfig.ReadKey( aKey );
-                        const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey( String( aKey.copy( 4 ), RTL_TEXTENCODING_ISO_8859_1 ) );
+                        const PPDKey* pKey = aPrinter.m_aInfo.m_pParser->getKey(rtl::OStringToOUString(aKey.copy(4), RTL_TEXTENCODING_ISO_8859_1));
                         if( pKey )
                         {
                             aPrinter.m_aInfo.m_aContext.


More information about the Libreoffice-commits mailing list