diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-10 22:38:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-12 09:38:59 +0000 |
commit | 8a418586ea319f7ca7394e5412501fb8faed8142 (patch) | |
tree | 2590d0648b7010bded35d175e0fbf3ad8cae166b /rsc/source | |
parent | a28c265ea4bf318cd993673cab88f609d7294220 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/parser/erscerr.cxx | 2 | ||||
-rw-r--r-- | rsc/source/parser/rscdb.cxx | 10 | ||||
-rw-r--r-- | rsc/source/parser/rscibas.cxx | 4 | ||||
-rw-r--r-- | rsc/source/parser/rscyacc.y | 2 | ||||
-rw-r--r-- | rsc/source/res/rscclass.cxx | 6 | ||||
-rw-r--r-- | rsc/source/res/rsccont.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rscmgr.cxx | 14 | ||||
-rw-r--r-- | rsc/source/res/rscrange.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rscstr.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rsctop.cxx | 4 | ||||
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 117 | ||||
-rw-r--r-- | rsc/source/tools/rscdef.cxx | 22 | ||||
-rw-r--r-- | rsc/source/tools/rsctools.cxx | 18 | ||||
-rw-r--r-- | rsc/source/tools/rsctree.cxx | 6 |
14 files changed, 105 insertions, 106 deletions
diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index 59f179fca04f..0b5738894bee 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -425,7 +425,7 @@ void RscError::ErrorFormat( const ERRTYPE& rError, RscTop * pClass, StdLstErr( ", " ); } if( aId.IsId() ) - StdLstErr( aId.GetName().GetBuffer() ); + StdLstErr( aId.GetName().getStr() ); StdLstErr( "):\n" ); } else diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index ea229cd964d8..00ec27b77554 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -56,7 +56,7 @@ using ::rtl::OStringBuffer; *************************************************************************/ RscTypCont :: RscTypCont( RscError * pErrHdl, RSCBYTEORDER_TYPE nOrder, - const ByteString & rSearchPath, + const rtl::OString& rSearchPath, sal_uInt32 nFlagsP ) : nSourceCharSet( RTL_TEXTENCODING_UTF8 ), @@ -328,7 +328,7 @@ sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName, pSysEntry = aSysLst[ i ]; if( pSysEntry->nKey == 1 ) bId1 = sal_True; - if( !strcmp( pSysEntry->aFileName.GetBuffer(), pFileName ) ) + if( !strcmp( pSysEntry->aFileName.getStr(), pFileName ) ) if( pSysEntry->nRscTyp == nRscTyp && pSysEntry->nTyp == nConst && pSysEntry->nRefId == nId @@ -832,14 +832,14 @@ ERRTYPE RscTypCont :: WriteHxx( FILE * fOutput, sal_uLong nFileKey ) |* *************************************************************************/ ERRTYPE RscTypCont::WriteCxx( FILE * fOutput, sal_uLong nFileKey, - const ByteString & rHxxName ) + const rtl::OString& rHxxName ) { RscEnumerateRef aEnumRef( this, pRoot, fOutput ); ERRTYPE aError; fprintf( fOutput, "#include <string.h>\n" ); WriteInc( fOutput, nFileKey ); - if( rHxxName.Len() ) - fprintf( fOutput, "#include \"%s\"\n", rHxxName.GetBuffer() ); + if( rHxxName.getLength() ) + fprintf( fOutput, "#include \"%s\"\n", rHxxName.getStr() ); fprintf( fOutput, "\n\n" ); if( NOFILE_INDEX == nFileKey ) diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index a7fdf0c6f137..4e2ba9f30080 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -80,9 +80,9 @@ void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal ) typedef boost::unordered_map< rtl::OString, sal_uInt32, rtl::OStringHash > langmap; static langmap ULong_Iso_map; -sal_uInt32 GetLangId( const ByteString& aLang ) +sal_uInt32 GetLangId(const rtl::OString &rLang) { - langmap::iterator pIter = ULong_Iso_map.find( aLang ); + langmap::iterator pIter = ULong_Iso_map.find( rLang ); if ( pIter != ULong_Iso_map.end()) return pIter->second; return 0; diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index 61f028e558ec..6c401d55d66a 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -419,7 +419,7 @@ resource_definition } | '#' DEFINE RSCDEFINE macro_expression { - pTC->pEH->Error( ERR_DOUBLEDEFINE, NULL, RscId(), $3->GetName().GetBuffer() ); + pTC->pEH->Error( ERR_DOUBLEDEFINE, NULL, RscId(), $3->GetName().getStr() ); } | '#' INCLUDE STRING { diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index 678c88c86b58..7e4ea5e21a6b 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -997,7 +997,7 @@ void RscClass::WriteRcAccess ) { fprintf( fOutput, "\t\tSet%s( %s ", pName, pHS->getString( GetId() ).getStr() ); - fprintf( fOutput, "%s ", aCallPar2.GetBuffer() ); + fprintf( fOutput, "%s ", aCallPar2.getStr() ); fprintf( fOutput, "ResId( (RSHEADER_TYPE*)(pResData+nOffset) ) ) );\n" ); fprintf( fOutput, "\t\tnOffset += GetObjSizeRes( (RSHEADER_TYPE*)(pResData+nOffset) );\n" ); } @@ -1011,12 +1011,12 @@ void RscClass::WriteRcCtor( FILE * fOutput, RscTypCont * pTC ) fprintf( fOutput, "%s::%s%s bFreeResource )", pHS->getString( GetId() ).getStr(), pHS->getString( GetId() ).getStr(), - aCallParType.GetBuffer() ); + aCallParType.getStr() ); if( GetSuperClass() ) { // Superaufruf fprintf( fOutput, "\n\t: %s", pHS->getString( GetSuperClass()->GetId() ).getStr() ); - fprintf( fOutput, "%s", GetSuperClass()->aCallPar1.GetBuffer() ); + fprintf( fOutput, "%s", GetSuperClass()->aCallPar1.getStr() ); fprintf( fOutput, " rResId.SetRT2( 0x%lx ) )", sal::static_int_cast< unsigned long >(GetTypId()) ); } diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx index 3bed42f139ac..e7247216882f 100644 --- a/rsc/source/res/rsccont.cxx +++ b/rsc/source/res/rsccont.cxx @@ -816,7 +816,7 @@ void RscBaseCont::ContWriteRcAccess else { fprintf( fOutput, "\t\tSet%s( %s ", pName, pHS->getString( GetId() ).getStr() ); - fprintf( fOutput, "%s ", aCallPar2.GetBuffer() ); + fprintf( fOutput, "%s ", aCallPar2.getStr() ); fprintf( fOutput, "ResId( (RSHEADER_TYPE*)(pResData+nOffset) ) ) );\n" ); fprintf( fOutput, "\t\tnOffset += GetObjSizeRes( (RSHEADER_TYPE*)(pResData+nOffset) );\n" ); } diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx index c88dad98562d..078be90c5658 100644 --- a/rsc/source/res/rscmgr.cxx +++ b/rsc/source/res/rscmgr.cxx @@ -176,9 +176,9 @@ void RscMgr::WriteSrcHeader( const RSCINST & rInst, FILE * fOutput, fprintf( fOutput, "%s %s", pHS->getString( rInst.pClass->GetId() ).getStr(), - (rId.GetName()).GetBuffer() ); + (rId.GetName()).getStr() ); if( pClassData->aRefId.IsId() ) - fprintf( fOutput, ",%s", pClassData->aRefId.GetName().GetBuffer() ); + fprintf( fOutput, ",%s", pClassData->aRefId.GetName().getStr() ); else { fprintf( fOutput, "\n" ); @@ -405,7 +405,7 @@ ERRTYPE RscMgr::WriteHxxHeader( const RSCINST & rInst, FILE * fOutput, fprintf( fOutput, "%s%s bFreeRes = TRUE )", MakeName( pTC, rInst.pClass, rId.GetName() ).getStr(), - (rInst.pClass->aCallParType).GetBuffer() ); + (rInst.pClass->aCallParType).getStr() ); fprintf( fOutput, ";\n};\n\n" ); } }; @@ -466,11 +466,11 @@ ERRTYPE RscMgr::WriteCxxHeader( const RSCINST & rInst, FILE * fOutput, fprintf( fOutput, "%s::%s", MakeName( pTC, rInst.pClass, rId.GetName() ).getStr(), MakeName( pTC, rInst.pClass, rId.GetName() ).getStr() ); - fprintf( fOutput, "%s", (rInst.pClass->aCallParType).GetBuffer() ); + fprintf( fOutput, "%s", (rInst.pClass->aCallParType).getStr() ); if( GetCount( rInst ) ) fprintf( fOutput, " bFreeRes" ); fprintf( fOutput, " )\n : %s", pHS->getString( rInst.pClass->GetId() ).getStr() ); - fprintf( fOutput, "%s", (rInst.pClass->aCallPar1).GetBuffer() ); + fprintf( fOutput, "%s", (rInst.pClass->aCallPar1).getStr() ); fprintf( fOutput, " rResId )" ); aError = RscClass::WriteCxx( rInst, fOutput, pTC, rId ); @@ -514,8 +514,8 @@ ERRTYPE RscMgr::WriteCxx( const RSCINST & rInst, FILE * fOutput, { fprintf( fOutput, ",\n a%s", MakeName( pTC, rInst.pClass, rId.GetName() ).getStr() ); - fprintf( fOutput, "%s", (rInst.pClass->aCallPar2).GetBuffer() ); - fprintf( fOutput, " ResId( %s ) )", (rId.GetName()).GetBuffer() ); + fprintf( fOutput, "%s", (rInst.pClass->aCallPar2).getStr() ); + fprintf( fOutput, " ResId( %s ) )", (rId.GetName()).getStr() ); return ERR_OK; } diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx index e78011b901b7..72a56c114110 100644 --- a/rsc/source/res/rscrange.cxx +++ b/rsc/source/res/rscrange.cxx @@ -558,7 +558,7 @@ ERRTYPE RscIdRange::GetRef( const RSCINST & rInst, RscId * pRscId ){ void RscIdRange::WriteSrc( const RSCINST & rInst, FILE * fOutput, RscTypCont *, sal_uInt32, const char * ) { - fprintf( fOutput, "%s", ((RscId *)rInst.pData)->GetName().GetBuffer() ); + fprintf( fOutput, "%s", ((RscId *)rInst.pData)->GetName().getStr() ); } /************************************************************************* diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx index d19aa828b136..18447c69f708 100644 --- a/rsc/source/res/rscstr.cxx +++ b/rsc/source/res/rscstr.cxx @@ -235,7 +235,7 @@ void RscString::WriteSrc( const RSCINST & rInst, FILE * fOutput, if ( ((RscStringInst *)rInst.pData)->aRefId.IsId() ) { fprintf( fOutput, "%s", - ((RscStringInst *)rInst.pData)->aRefId.GetName().GetBuffer() ); + ((RscStringInst *)rInst.pData)->aRefId.GetName().getStr() ); } else { diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx index 2bc78f380345..c5ffa5ac4d77 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -58,8 +58,8 @@ RscTop::RscTop( Atom nId, sal_uInt32 nTypIdent, RscTop * pSuperCl ) |* RscTop::SetCallPar() |* *************************************************************************/ -void RscTop::SetCallPar( const ByteString & rPar1, const ByteString & rPar2, - const ByteString & rParType ) +void RscTop::SetCallPar(const rtl::OString& rPar1, const rtl::OString& rPar2, + const rtl::OString& rParType) { aCallPar1 = rPar1; aCallPar2 = rPar2; diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index ee33b6c16a49..a7bada7b3217 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -284,7 +284,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) } else if( !rsc_stricmp( (*ppStr) + 1, "lg" ) ) { - m_aOutputFiles.back().aLangName = ByteString(); + m_aOutputFiles.back().aLangName = rtl::OString(); } else if( !rsc_strnicmp( (*ppStr) + 1, "lg", 2 ) ) { @@ -394,10 +394,10 @@ RscCompiler::RscCompiler( RscCmdLine * pLine, RscTypCont * pTypCont ) pCL = pLine; pTC = pTypCont; - if( pCL->aOutputLst.Len() ) + if( pCL->aOutputLst.getLength() ) { - if ( NULL == (fListing = fopen( pCL->aOutputLst.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputLst.GetBuffer() ); + if ( NULL == (fListing = fopen( pCL->aOutputLst.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputLst.getStr() ); pTC->pEH->SetListFile( fListing ); } } @@ -416,14 +416,14 @@ RscCompiler::~RscCompiler() if( fExitFile ) fclose( fExitFile ); - if( aTmpOutputHxx.Len() ) - unlink( aTmpOutputHxx.GetBuffer() ); - if( aTmpOutputCxx.Len() ) - unlink( aTmpOutputCxx.GetBuffer() ); - if( aTmpOutputRcCtor.Len() ) - unlink( aTmpOutputRcCtor.GetBuffer() ); - if( aTmpOutputSrc.Len() ) - unlink( aTmpOutputSrc.GetBuffer() ); + if( aTmpOutputHxx.getLength() ) + unlink( aTmpOutputHxx.getStr() ); + if( aTmpOutputCxx.getLength() ) + unlink( aTmpOutputCxx.getStr() ); + if( aTmpOutputRcCtor.getLength() ) + unlink( aTmpOutputRcCtor.getStr() ); + if( aTmpOutputSrc.getLength() ) + unlink( aTmpOutputSrc.getStr() ); } /************************************************************************* @@ -510,21 +510,21 @@ ERRTYPE RscCompiler::Start() *************************************************************************/ void RscCompiler::EndCompile() { - if( pCL->aOutputSrs.Len() && (pCL->nCommands & NOLINK_FLAG) ) + if( pCL->aOutputSrs.getLength() && (pCL->nCommands & NOLINK_FLAG) ) { pTC->pEH->StdOut( "Writing file ", RscVerbosityVerbose ); - pTC->pEH->StdOut( pCL->aOutputSrs.GetBuffer(), RscVerbosityVerbose ); + pTC->pEH->StdOut( pCL->aOutputSrs.getStr(), RscVerbosityVerbose ); pTC->pEH->StdOut( ".\n", RscVerbosityVerbose ); // kopiere von TMP auf richtigen Namen - unlink( pCL->aOutputSrs.GetBuffer() ); // Zieldatei loeschen + unlink( pCL->aOutputSrs.getStr() ); // Zieldatei loeschen if( !(pCL->nCommands & NOSYNTAX_FLAG) ) { FILE * foutput; RscFile * pFN; - if( NULL == (foutput = fopen( pCL->aOutputSrs.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputSrs.GetBuffer() ); + if( NULL == (foutput = fopen( pCL->aOutputSrs.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputSrs.getStr() ); else { // Schreibe Datei @@ -544,64 +544,64 @@ void RscCompiler::EndCompile() }; } - if ( aTmpOutputHxx.Len() ) + if ( aTmpOutputHxx.getLength() ) { pTC->pEH->StdOut( "Writing file ", RscVerbosityVerbose ); - pTC->pEH->StdOut( pCL->aOutputHxx.GetBuffer(), RscVerbosityVerbose ); + pTC->pEH->StdOut( pCL->aOutputHxx.getStr(), RscVerbosityVerbose ); pTC->pEH->StdOut( ".\n", RscVerbosityVerbose ); // kopiere von TMP auf richtigen Namen - unlink( pCL->aOutputHxx.GetBuffer() ); // Zieldatei loeschen + unlink( pCL->aOutputHxx.getStr() ); // Zieldatei loeschen Append( pCL->aOutputHxx, aTmpOutputHxx ); - unlink( aTmpOutputHxx.GetBuffer() );// TempDatei loeschen - aTmpOutputHxx = ByteString(); + unlink( aTmpOutputHxx.getStr() );// TempDatei loeschen + aTmpOutputHxx = rtl::OString(); } - if( aTmpOutputCxx.Len() ) + if( aTmpOutputCxx.getLength() ) { pTC->pEH->StdOut( "Writing file ", RscVerbosityVerbose ); - pTC->pEH->StdOut( pCL->aOutputCxx.GetBuffer(), RscVerbosityVerbose ); + pTC->pEH->StdOut( pCL->aOutputCxx.getStr(), RscVerbosityVerbose ); pTC->pEH->StdOut( ".\n", RscVerbosityVerbose ); // kopiere von TMP auf richtigen Namen - unlink( pCL->aOutputCxx.GetBuffer() ); // Zieldatei loeschen + unlink( pCL->aOutputCxx.getStr() ); // Zieldatei loeschen Append( pCL->aOutputCxx, aTmpOutputCxx ); - unlink( aTmpOutputCxx.GetBuffer() );// TempDatei loeschen - aTmpOutputCxx = ByteString(); + unlink( aTmpOutputCxx.getStr() );// TempDatei loeschen + aTmpOutputCxx = rtl::OString(); } - if( aTmpOutputRcCtor.Len() ) + if( aTmpOutputRcCtor.getLength() ) { pTC->pEH->StdOut( "Writing file ", RscVerbosityVerbose ); - pTC->pEH->StdOut( pCL->aOutputRcCtor.GetBuffer(), RscVerbosityVerbose ); + pTC->pEH->StdOut( pCL->aOutputRcCtor.getStr(), RscVerbosityVerbose ); pTC->pEH->StdOut( ".\n", RscVerbosityVerbose ); // kopiere von TMP auf richtigen Namen - unlink( pCL->aOutputRcCtor.GetBuffer() ); // Zieldatei loeschen + unlink( pCL->aOutputRcCtor.getStr() ); // Zieldatei loeschen Append( pCL->aOutputRcCtor, aTmpOutputRcCtor ); - unlink( aTmpOutputRcCtor.GetBuffer() );// TempDatei loeschen - aTmpOutputRcCtor = ByteString(); + unlink( aTmpOutputRcCtor.getStr() );// TempDatei loeschen + aTmpOutputRcCtor = rtl::OString(); } - if( aTmpOutputSrc.Len() ) + if( aTmpOutputSrc.getLength() ) { // kopiere von TMP auf richtigen Namen - unlink( pCL->aOutputSrc.GetBuffer() ); // Zieldatei loeschen + unlink( pCL->aOutputSrc.getStr() ); // Zieldatei loeschen Append( pCL->aOutputSrc, aTmpOutputSrc ); - unlink( aTmpOutputSrc.GetBuffer() );// TempDatei loeschen - aTmpOutputSrc = ByteString(); + unlink( aTmpOutputSrc.getStr() );// TempDatei loeschen + aTmpOutputSrc = rtl::OString(); } - if( pCL->aTouchFile.Len() ) + if( pCL->aTouchFile.getLength() ) { - FILE* fp = fopen( pCL->aTouchFile.GetBuffer(), "w" ); + FILE* fp = fopen( pCL->aTouchFile.getStr(), "w" ); if( fp ) { fprintf( fp, "Done\n" ); fclose( fp ); } else - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aTouchFile.GetBuffer() ); + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aTouchFile.getStr() ); } } @@ -822,7 +822,7 @@ ERRTYPE RscCompiler::Link() OSL_TRACE("temporary rc file: %s", aRcTmp.getStr()); OUString sOilDirUrl; - if(pCL->aILDir.Len()) + if(pCL->aILDir.getLength()) sOilDirUrl = lcl_getAbsoluteUrl(sPwdUrl, pCL->aILDir); else sOilDirUrl = sTempDirUrl; @@ -953,11 +953,11 @@ ERRTYPE RscCompiler::Link() } // hxx-Datei schreiben - if( pCL->aOutputHxx.Len() && aError.IsOk() ) + if( pCL->aOutputHxx.getLength() && aError.IsOk() ) { aTmpOutputHxx = ::GetTmpFileName(); - if ( NULL == (fExitFile = foutput = fopen( aTmpOutputHxx.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputHxx.GetBuffer() ); + if ( NULL == (fExitFile = foutput = fopen( aTmpOutputHxx.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputHxx.getStr() ); pTC->pEH->StdOut( "Generating .hxx file\n" ); @@ -969,11 +969,11 @@ ERRTYPE RscCompiler::Link() } // cxx-Datei schreiben - if( pCL->aOutputCxx.Len() && aError.IsOk() ) + if( pCL->aOutputCxx.getLength() && aError.IsOk() ) { aTmpOutputCxx = ::GetTmpFileName(); - if ( NULL == (fExitFile = foutput = fopen( aTmpOutputCxx.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputCxx.GetBuffer() ); + if ( NULL == (fExitFile = foutput = fopen( aTmpOutputCxx.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputCxx.getStr() ); pTC->pEH->StdOut( "Generating .cxx file\n" ); @@ -993,11 +993,11 @@ ERRTYPE RscCompiler::Link() } // RcCtor-Datei schreiben - if( pCL->aOutputRcCtor.Len() && aError.IsOk() ) + if( pCL->aOutputRcCtor.getLength() && aError.IsOk() ) { aTmpOutputRcCtor = ::GetTmpFileName(); - if ( NULL == (fExitFile = foutput = fopen( aTmpOutputRcCtor.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputRcCtor.GetBuffer() ); + if ( NULL == (fExitFile = foutput = fopen( aTmpOutputRcCtor.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputRcCtor.getStr() ); pTC->pEH->StdOut( "Generating .cxx ressource constructor file\n" ); @@ -1009,11 +1009,11 @@ ERRTYPE RscCompiler::Link() } // src-Datei schreiben - if( pCL->aOutputSrc.Len() && aError.IsOk() ) + if( pCL->aOutputSrc.getLength() && aError.IsOk() ) { aTmpOutputSrc = ::GetTmpFileName(); - if ( NULL == (fExitFile = foutput = fopen( aTmpOutputSrc.GetBuffer(), "w" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputSrc.GetBuffer() ); + if ( NULL == (fExitFile = foutput = fopen( aTmpOutputSrc.getStr(), "w" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTmpOutputSrc.getStr() ); // Schreibe Datei pTC->WriteSrc( foutput, NOFILE_INDEX, RTL_TEXTENCODING_UNICODE ); @@ -1033,15 +1033,14 @@ ERRTYPE RscCompiler::Link() /* */ /* Description : appends text files */ /********************************************************************/ -void RscCompiler::Append( const ByteString& rOutputSrs, - const ByteString& rTmpFile ) +void RscCompiler::Append( const rtl::OString& rOutputSrs, + const rtl::OString& rTmpFile ) { if( !::Append( rOutputSrs, rTmpFile ) ) { - ByteString aTemp = rOutputSrs; - aTemp += " or "; - aTemp += rTmpFile; - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTemp.GetBuffer() ); + rtl::OStringBuffer aTemp(rOutputSrs); + aTemp.append(" or ").append(rTmpFile); + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aTemp.getStr() ); } } @@ -1082,7 +1081,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, const FileStat aFS( aAbsPath.GetFull() ); #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "Searching image: %s\n", ByteString( aRelPath.GetFull(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); + fprintf( stderr, "Searching image: %s\n", rtl::OUStringToOString(aRelPath.GetFull(), RTL_TEXTENCODING_ASCII_US).getStr() ); #endif if( aFS.IsKind( FSYS_KIND_FILE ) ) diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index ce495e3242bd..355a46da9f8d 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -165,7 +165,7 @@ RscId::operator sal_Int32() const |* RscId::GetNames() |* *************************************************************************/ -ByteString RscId::GetName() const +rtl::OString RscId::GetName() const { rtl::OStringBuffer aStr; @@ -186,7 +186,7 @@ ByteString RscId::GetName() const |* RscDefine::RscDefine() |* *************************************************************************/ -RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, sal_Int32 lDefId ) +RscDefine::RscDefine( sal_uLong lKey, const rtl::OString& rDefName, sal_Int32 lDefId ) : StringNode( rDefName ) { nRefCount = 0; @@ -195,7 +195,7 @@ RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, sal_Int32 lDe pExp = NULL; } -RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, +RscDefine::RscDefine( sal_uLong lKey, const rtl::OString& rDefName, RscExpression * pExpression ) : StringNode( rDefName ) { @@ -270,7 +270,7 @@ RscDefine * RscDefine::Search( const char * pStr ){ |* RscDefine::GetMacro() |* *************************************************************************/ -ByteString RscDefine::GetMacro() +rtl::OString RscDefine::GetMacro() { if( pExp ) return pExp->GetMacro(); @@ -283,7 +283,7 @@ ByteString RscDefine::GetMacro() |* RscDefineList::New() |* *************************************************************************/ -RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName, +RscDefine * RscDefineList::New( sal_uLong lFileKey, const rtl::OString& rDefName, sal_Int32 lDefId, size_t lPos ) { RscDefine * pDef; @@ -301,7 +301,7 @@ RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName, return pDef; } -RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName, +RscDefine * RscDefineList::New( sal_uLong lFileKey, const rtl::OString& rDefName, RscExpression * pExpression, size_t lPos ) { RscDefine * pDef; @@ -339,8 +339,8 @@ void RscDefineList::WriteAll( FILE * fOutput ) for ( size_t i = 0, n = maList.size(); i < n; ++i ) { RscDefine* pDefEle = maList[ i ]; fprintf( fOutput, "#define %s %s\n", - pDefEle->GetName().GetBuffer(), - pDefEle->GetMacro().GetBuffer() + pDefEle->GetName().getStr(), + pDefEle->GetMacro().getStr() ); }; } @@ -452,7 +452,7 @@ sal_Bool RscExpression::Evaluate( sal_Int32 * plValue ){ |* RscExpression::GetMacro() |* *************************************************************************/ -ByteString RscExpression::GetMacro() +rtl::OString RscExpression::GetMacro() { rtl::OStringBuffer aLeft; @@ -778,7 +778,7 @@ sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, size_t lPos, |* RscFileTab::NewDef() |* *************************************************************************/ -RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName, +RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName, sal_Int32 lId, sal_uLong lPos ) { RscDefine * pDef = FindDef( rDefName ); @@ -802,7 +802,7 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName, |* RscFileTab::NewDef() |* *************************************************************************/ -RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName, +RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const rtl::OString& rDefName, RscExpression * pExp, sal_uLong lPos ) { RscDefine * pDef = FindDef( rDefName ); diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index c4546077f87b..70ef44138f0b 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -119,7 +119,7 @@ char* rsc_strdup( const char* pStr ) |* malloc allokiert |* *************************************************************************/ -ByteString GetTmpFileName() +rtl::OString GetTmpFileName() { OUString aTmpURL, aTmpFile; osl_createTempFile( NULL, NULL, &aTmpURL.pData ); @@ -135,10 +135,10 @@ ByteString GetTmpFileName() /* */ /* Description : appends text files */ /********************************************************************/ -sal_Bool Append( FILE * fDest, ByteString aTmpFile ) +sal_Bool Append(FILE * fDest, const rtl::OString &rTmpFile) { #define MAX_BUF 4096 - FILE *fSource = fopen( aTmpFile.GetBuffer(), "rb" ); + FILE *fSource = fopen(rTmpFile.getStr(), "rb"); if( !fDest || !fSource ) { if( fSource ) @@ -161,11 +161,11 @@ sal_Bool Append( FILE * fDest, ByteString aTmpFile ) return sal_True; } -sal_Bool Append( ByteString aOutputSrs, ByteString aTmpFile ) +sal_Bool Append(const rtl::OString &rOutputSrs, const rtl::OString &rTmpFile) { - FILE * fDest = fopen( aOutputSrs.GetBuffer(), "ab" ); + FILE * fDest = fopen(rOutputSrs.getStr(), "ab"); - sal_Bool bRet = Append( fDest, aTmpFile ); + sal_Bool bRet = Append(fDest, rTmpFile); if( fDest ) fclose( fDest ); @@ -182,10 +182,10 @@ sal_Bool Append( ByteString aOutputSrs, ByteString aTmpFile ) |* pExt, die Extension des Ausgabenamens |* *************************************************************************/ -ByteString OutputFile ( ByteString aInput, const char * pExt ) +rtl::OString OutputFile(const rtl::OString &rInput, const char * pExt) { - UniString aUniInput( aInput, RTL_TEXTENCODING_ASCII_US ); - DirEntry aFileName( aUniInput ); + rtl::OUString aUniInput(rtl::OStringToOUString(rInput, RTL_TEXTENCODING_ASCII_US)); + DirEntry aFileName(aUniInput); UniString aExt( pExt, RTL_TEXTENCODING_ASCII_US ); aFileName.SetExtension( aExt ); diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index 75315369c12b..14f6a089507e 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -415,8 +415,8 @@ StringNode * StringNode::Search( const char * pSearch ) const{ *************************************************************************/ COMPARE StringNode::Compare( const NameNode * pSearch ) const { - int nCmp = strcmp( aName.GetBuffer(), - ((const StringNode *)pSearch)->aName.GetBuffer() ); + int nCmp = strcmp( m_aName.getStr(), + ((const StringNode *)pSearch)->m_aName.getStr() ); if( nCmp < 0 ) return LESS; else if( nCmp > 0 ) @@ -428,7 +428,7 @@ COMPARE StringNode::Compare( const NameNode * pSearch ) const COMPARE StringNode::Compare( const void * pSearch ) const { // pSearch ist ein Zeiger auf const char * - int nCmp = strcmp( aName.GetBuffer(), (const char *)pSearch ); + int nCmp = strcmp( m_aName.getStr(), (const char *)pSearch ); if( nCmp < 0 ) return LESS; |