diff options
-rw-r--r-- | idl/source/objects/slot.cxx | 22 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 6 | ||||
-rw-r--r-- | rsc/inc/rscdef.hxx | 18 | ||||
-rw-r--r-- | rsc/inc/rsctools.hxx | 2 | ||||
-rw-r--r-- | rsc/source/parser/erscerr.cxx | 2 | ||||
-rw-r--r-- | rsc/source/parser/rscdb.cxx | 4 | ||||
-rw-r--r-- | rsc/source/prj/start.cxx | 12 | ||||
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 22 | ||||
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 6 | ||||
-rw-r--r-- | unotools/source/misc/componentresmodule.cxx | 9 |
10 files changed, 53 insertions, 50 deletions
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 2434a10ecb62..36115d918aab 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -843,10 +843,10 @@ sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) } else { - ByteString aStr( "attribute " ); - aStr += pAttr->GetName(); - aStr += " is method or variable but not a slot"; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr( "attribute " ); + aStr.append(pAttr->GetName()); + aStr.append(" is method or variable but not a slot"); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); bOk = sal_False; } @@ -876,10 +876,10 @@ sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) } else { - ByteString aStr( "attribute " ); - aStr += pAttr2->GetName(); - aStr += " is method or variable but not a slot"; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr("attribute "); + aStr.append(pAttr2->GetName()); + aStr.append(" is method or variable but not a slot"); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); bOk = sal_False; } @@ -1084,9 +1084,9 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const ByteString & rPrefix, static ByteString MakeSlotName( SvStringHashEntry * pEntry ) { - ByteString aName( "SFX_SLOT_" ); - aName += pEntry->GetName(); - return aName.ToUpperAscii(); + rtl::OStringBuffer aName(RTL_CONSTASCII_STRINGPARAM("SFX_SLOT_")); + aName.append(pEntry->GetName()); + return aName.makeStringAndClear().toAsciiUpperCase(); }; void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName, diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 4ca16cbe9cf9..e76434e7996c 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -490,9 +490,9 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr } } - ByteString aStr( "Nicht gefunden : " ); - aStr += pTok->GetString(); - OSL_FAIL( aStr.GetBuffer() ); + rtl::OStringBuffer aStr("Nicht gefunden : "); + aStr.append(pTok->GetString()); + OSL_FAIL(aStr.getStr()); } } diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index 4e2ff5b9f40a..e516b018f6a9 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -206,8 +206,8 @@ public: sal_Bool bLoaded; // Ist die Datei geladen sal_Bool bScanned; // Wurde Datei nach Inclide abgesucht sal_Bool bDirty; // Dirty-Flag - ByteString aFileName; // Name der Datei - ByteString aPathName; // Pfad und Name der Datei + rtl::OString aFileName; // Name der Datei + rtl::OString aPathName; // Pfad und Name der Datei RscDefineList aDefLst; // Liste der Defines RscDependList aDepLst; // List of Depend @@ -234,15 +234,19 @@ public: void Remove( RscDefine * pDef ); }; -class RscFileTab : public RscSubFileTab { +class RscFileTab : public RscSubFileTab +{ RscDefTree aDefTree; - sal_uLong Find( const ByteString & rName ); + sal_uLong Find(const rtl::OString& rName); public: RscFileTab(); ~RscFileTab(); RscDefine * FindDef( const char * ); - RscDefine * FindDef( const ByteString& rStr ) { return FindDef( rStr.GetBuffer() ); } + RscDefine * FindDef(const rtl::OString& rStr) + { + return FindDef(rStr.getStr()); + } sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree ); sal_Bool TestDef( sal_uLong lFileKey, size_t lPos, @@ -257,8 +261,8 @@ public: // Alle Defines die in dieser Datei Definiert sind loeschen void DeleteFileContext( sal_uLong lKey ); - sal_uLong NewCodeFile( const rtl::OString& rName ); - sal_uLong NewIncFile( const ByteString & rName, const ByteString & rPath ); + sal_uLong NewCodeFile(const rtl::OString& rName); + sal_uLong NewIncFile(const rtl::OString& rName, const rtl::OString& rPath); RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); } }; diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx index 5792c1de8cff..7694af3b06b0 100644 --- a/rsc/inc/rsctools.hxx +++ b/rsc/inc/rsctools.hxx @@ -63,7 +63,7 @@ char* rsc_strdup( const char* ); /****************** C L A S S E S ****************************************/ -typedef ::std::vector< ByteString* > RscStrList; +typedef ::std::vector< rtl::OString* > RscStrList; /*********** R s c C h a r ***********************************************/ class RscChar diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index 59f5a09407a7..59f179fca04f 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -403,7 +403,7 @@ void RscError::ErrorFormat( const ERRTYPE& rError, RscTop * pClass, if( pFI && pTC ){ StdLstErr( ": \"" ); - StdLstErr( pTC->aFileTab.Get( pFI->GetFileIndex() )->aFileName.GetBuffer() ); + StdLstErr( pTC->aFileTab.Get( pFI->GetFileIndex() )->aFileName.getStr() ); StdLstErr( "\", line " ); sprintf( buf, "%u", (unsigned int)pFI->GetLineNo() ); StdLstErr( buf ); diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 7ac42d6a54fc..ea229cd964d8 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -377,7 +377,7 @@ void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong lFileKey ) { fprintf( fOutput, "#include " ); fprintf( fOutput, "\"%s\"\n", - pFName->aFileName.GetBuffer() ); + pFName->aFileName.getStr() ); } pFName = aFileTab.Next(); } @@ -400,7 +400,7 @@ void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong lFileKey ) { fprintf( fOutput, "#include " ); fprintf( fOutput, "\"%s\"\n", - pFile->aFileName.GetBuffer() ); + pFile->aFileName.getStr() ); } } }; diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 3952622fa0fb..aeddeb767621 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -167,7 +167,7 @@ static sal_Bool CallRsc2( RscStrList * pInputList, RscPtrPtr * pCmdLine ) { int nRet; - ByteString* pString; + rtl::OString* pString; RscVerbosity eVerbosity = RscVerbosityNormal; RscPtrPtr aNewCmdL; @@ -205,7 +205,7 @@ static sal_Bool CallRsc2( RscStrList * pInputList, for ( size_t i = 0, n = pInputList->size(); i < n; ++i ) { pString = (*pInputList)[ i ]; - aNewCmdL.Append( rsc_strdup( pString->GetBuffer() ) ); + aNewCmdL.Append( rsc_strdup( pString->getStr() ) ); }; if ( eVerbosity >= RscVerbosityVerbose ) @@ -244,7 +244,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) char ** ppStr; RscPtrPtr aCmdLine; // Kommandozeile sal_uInt32 i; - ByteString* pString; + rtl::OString* pString; pStr = ::ResponseFile( &aCmdLine, argv, argc ); if( pStr ) @@ -287,7 +287,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) else { // Eingabedatei - aInputList.push_back( new ByteString( *ppStr ) ); + aInputList.push_back( new rtl::OString(*ppStr) ); } ppStr++; i++; @@ -321,7 +321,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) bError = sal_True; break; } - aTmpList.push_back( new ByteString( aTmpName ) ); + aTmpList.push_back( new rtl::OString(aTmpName) ); }; }; @@ -338,7 +338,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) }; for ( size_t k = 0, n = aTmpList.size(); k < n; ++k ) - unlink( aTmpList[ k ]->GetBuffer() ); + unlink( aTmpList[ k ]->getStr() ); return( bError ); } diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 628dc572128b..ee33b6c16a49 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -177,7 +177,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) ; if( *pEqual ) { - const ByteString aSPath( pEqual + 1 ); + const rtl::OString aSPath( pEqual + 1 ); DirEntry aSDir( String( aSPath, RTL_TEXTENCODING_ASCII_US ) ); m_aReplacements.push_back( std::pair< OString, OString >( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), @@ -221,10 +221,10 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) } else if( !rsc_strnicmp( (*ppStr) + 1, "lip=", 4 ) ) { // additional language specific include for system dependent files - const ByteString aSysSearchDir( (*ppStr)+5 ); + const rtl::OString aSysSearchDir( (*ppStr)+5 ); // ignore empty -lip= arguments that we get lots of these days - if (aSysSearchDir.Len()) + if (aSysSearchDir.getLength()) { DirEntry aSysDir( String( aSysSearchDir, RTL_TEXTENCODING_ASCII_US ) ); m_aOutputFiles.back().aSysSearchDirs.push_back( @@ -298,7 +298,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) else { // Eingabedatei - aInputList.push_back( new ByteString( *ppStr ) ); + aInputList.push_back( new rtl::OString(*ppStr) ); } ppStr++; i++; @@ -483,7 +483,7 @@ ERRTYPE RscCompiler::Start() pFName = pTC->aFileTab.First(); while( pFName ) { - pTC->pEH->StdOut( pFName->aFileName.GetBuffer() ); + pTC->pEH->StdOut( pFName->aFileName.getStr() ); pTC->pEH->StdOut( " " ); pFName = pTC->aFileTab.Next(); }; @@ -621,12 +621,12 @@ ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey ) aError = ERR_ERROR; else if( !pFName->bScanned ) { - finput = fopen( pFName->aPathName.GetBuffer(), "r" ); + finput = fopen( pFName->aPathName.getStr(), "r" ); if( !finput ) { aError = ERR_OPENFILE; pTC->pEH->Error( aError, NULL, RscId(), - pFName->aPathName.GetBuffer() ); + pFName->aPathName.getStr() ); } else { @@ -704,7 +704,7 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey, else { String aTmpName( ::GetTmpFileName(), RTL_TEXTENCODING_ASCII_US ); - DirEntry aTmpPath( aTmpName ), aSrsPath( String( pFName->aPathName.GetBuffer(), RTL_TEXTENCODING_ASCII_US ) ); + DirEntry aTmpPath( aTmpName ), aSrsPath(rtl::OStringToOUString(pFName->aPathName, RTL_TEXTENCODING_ASCII_US)); aTmpPath.ToAbs(); aSrsPath.ToAbs(); @@ -720,7 +720,7 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey, if( !finput ) { - pTC->pEH->Error( ERR_OPENFILE, NULL, RscId(), pFName->aPathName.GetBuffer() ); + pTC->pEH->Error( ERR_OPENFILE, NULL, RscId(), pFName->aPathName.getStr() ); aError = ERR_OPENFILE; } else @@ -1238,7 +1238,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, aOStm.WriteLine( aLine ); } - aOStm.WriteLine( "FileList = {" ); + aOStm.WriteLine(rtl::OString(RTL_CONSTASCII_STRINGPARAM("FileList = {"))); for( sal_uInt32 i = 0; i < aEntryVector.size(); ++i ) { @@ -1253,7 +1253,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, aOStm.WriteLine(aEntryString.makeStringAndClear()); } - aOStm.WriteLine( "};" ); + aOStm.WriteLine(rtl::OString(RTL_CONSTASCII_STRINGPARAM("};"))); } else aOStm.WriteLine( aLine ); diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index 93d9144942a8..ce495e3242bd 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -679,7 +679,7 @@ RscFileTab :: ~RscFileTab(){ |* RscFileTab::Find() |* *************************************************************************/ -sal_uLong RscFileTab :: Find( const ByteString & rName ) +sal_uLong RscFileTab :: Find( const rtl::OString& rName ) { RscFile * pFName; @@ -876,8 +876,8 @@ sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName ) |* RscFileTab::NewIncFile() |* *************************************************************************/ -sal_uLong RscFileTab :: NewIncFile( const ByteString & rName, - const ByteString & rPath ) +sal_uLong RscFileTab :: NewIncFile(const rtl::OString& rName, + const rtl::OString& rPath) { sal_uLong lKey; RscFile * pFName; diff --git a/unotools/source/misc/componentresmodule.cxx b/unotools/source/misc/componentresmodule.cxx index 56522ea63064..1e2d60713cc9 100644 --- a/unotools/source/misc/componentresmodule.cxx +++ b/unotools/source/misc/componentresmodule.cxx @@ -28,10 +28,9 @@ #include <unotools/componentresmodule.hxx> -/** === begin UNO includes === **/ -/** === end UNO includes === **/ #include <tools/resmgr.hxx> #include <osl/diagnose.h> +#include <rtl/strbuf.hxx> //........................................................................ namespace utl @@ -96,9 +95,9 @@ namespace utl m_pRessources = ResMgr::CreateResMgr( aMgrName.GetBuffer() ); OSL_ENSURE( m_pRessources, - ( ByteString( "OModuleImpl::getResManager: could not create the resource manager (file name: " ) - += aMgrName - += ByteString( ")!" ) ).GetBuffer() ); + rtl::OStringBuffer( "OModuleImpl::getResManager: could not create the resource manager (file name: " ) + .append(aMgrName) + .append(")!").getStr() ); m_bInitialized = sal_True; } |