diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 23:44:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-20 10:11:42 +0100 |
commit | 557ba436637d3cc926c063aba0458f04a916fa66 (patch) | |
tree | 9b5619297bb2dec34ff1a7b6f6c1899b0959cee7 /idl/source | |
parent | 512c562b8671fb8998ab8c6f31502b59f108e13a (diff) |
ByteString->rtl::OString[Buffer]
Diffstat (limited to 'idl/source')
-rw-r--r-- | idl/source/cmptools/lex.cxx | 6 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 6 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 21 |
3 files changed, 18 insertions, 15 deletions
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx index 244aa23069f1..ace8e064d0de 100644 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -38,9 +38,9 @@ #include <globals.hxx> #include <tools/bigint.hxx> -ByteString SvToken::GetTokenAsString() const +rtl::OString SvToken::GetTokenAsString() const { - ByteString aStr; + rtl::OString aStr; switch( nType ) { case SVTOKEN_EMPTY: @@ -61,7 +61,7 @@ ByteString SvToken::GetTokenAsString() const aStr = aString; break; case SVTOKEN_CHAR: - aStr = cChar; + aStr = rtl::OString(cChar); break; case SVTOKEN_RTTIBASE: aStr = "RTTIBASE"; diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 625b06678a8f..d027e8610391 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -1699,14 +1699,14 @@ void SvMetaType::WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, WriteMethodArgs( rBase, rOutStm, nTab +2, nT ); } -ByteString SvMetaType::GetParserString() const +rtl::OString SvMetaType::GetParserString() const { SvMetaType * pBT = GetBaseType(); if( pBT != this ) return pBT->GetParserString(); int type = GetType(); - ByteString aPStr; + rtl::OString aPStr; if( TYPE_METHOD == type || TYPE_STRUCT == type ) { @@ -1719,7 +1719,7 @@ ByteString SvMetaType::GetParserString() const } } else - aPStr = GetParserChar(); + aPStr = rtl::OString(GetParserChar()); return aPStr; } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 5761a459c50e..e823bdf7f5f7 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -311,32 +311,35 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName ) else if( pTok->Is( SvHash_include() ) ) { pTok = aTokStm.GetToken_Next(); - ByteString aName; + rtl::OStringBuffer aName; if( pTok->IsString() ) - aName = pTok->GetString(); + aName.append(pTok->GetString()); else if( pTok->IsChar() && pTok->GetChar() == '<' ) { pTok = aTokStm.GetToken_Next(); while( !pTok->IsEof() && !(pTok->IsChar() && pTok->GetChar() == '>') ) { - aName += pTok->GetTokenAsString(); + aName.append(pTok->GetTokenAsString()); pTok = aTokStm.GetToken_Next(); } if( pTok->IsEof() ) { - ByteString aStr( "unexpected eof in #include" ); + rtl::OString aStr(RTL_CONSTASCII_STRINGPARAM( + "unexpected eof in #include")); // set error - SetError( aStr, pTok ); + SetError(aStr, pTok); WriteError( aTokStm ); return sal_False; } } - if( !ReadIdFile( String::CreateFromAscii(aName.GetBuffer()) ) ) + if (!ReadIdFile(rtl::OStringToOUString(aName.toString(), + RTL_TEXTENCODING_ASCII_US))) { - ByteString aStr = "cannot read file: "; - aStr += aName; - SetError( aStr, pTok ); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "cannot read file: ")); + aStr.append(aName); + SetError(aStr.makeStringAndClear(), pTok); WriteError( aTokStm ); return sal_False; } |