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/tools | |
parent | a28c265ea4bf318cd993673cab88f609d7294220 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'rsc/source/tools')
-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 |
3 files changed, 23 insertions, 23 deletions
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; |