diff options
Diffstat (limited to 'idl/source')
-rw-r--r-- | idl/source/prj/parser.cxx | 12 | ||||
-rw-r--r-- | idl/source/prj/svidl.cxx | 18 |
2 files changed, 14 insertions, 16 deletions
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index c6fa85431f0e..8bb45b10b273 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -134,18 +134,18 @@ void SvIdlParser::ReadInclude( SvMetaModule& rModule ) osl::FileBase::RC searchError = osl::File::searchFileURL(aFullName, rBase.GetPath(), aFullName); if( osl::FileBase::E_None != searchError ) { - OStringBuffer aStr("cannot find file:"); - aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8)); - throw SvParseException(aStr.makeStringAndClear(), rInStm.GetToken()); + OString aStr = "cannot find file:" + + OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8); + throw SvParseException(aStr, rInStm.GetToken()); } osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); rBase.AddDepFile( aFullName ); SvTokenStream aTokStm( aFullName ); if( ERRCODE_NONE != aTokStm.GetStream().GetError() ) { - OStringBuffer aStr("cannot open file: "); - aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8)); - throw SvParseException(aStr.makeStringAndClear(), rInStm.GetToken()); + OString aStr = "cannot open file: " + + OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8); + throw SvParseException(aStr, rInStm.GetToken()); } // rescue error from old file SvIdlError aOldErr = rBase.GetError(); diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx index fcfebed79816..91ad73d19336 100644 --- a/idl/source/prj/svidl.cxx +++ b/idl/source/prj/svidl.cxx @@ -95,8 +95,8 @@ static OUString tempFileHelper(OUString const & fname) } else { - OStringBuffer aStr("invalid filename: "); - aStr.append(OUStringToOString(fname, RTL_TEXTENCODING_UTF8)); + OString aStr = "invalid filename: " + + OUStringToOString(fname, RTL_TEXTENCODING_UTF8); fprintf(stderr, "%s\n", aStr.getStr()); } return aTmpFile; @@ -134,8 +134,8 @@ int main ( int argc, char ** argv) if( !pDataBase->WriteSfx( aOutStm ) ) { nExit = -1; - OStringBuffer aStr("cannot write slotmap file: "); - aStr.append(OUStringToOString(aCommand.aSlotMapFile, RTL_TEXTENCODING_UTF8)); + OString aStr = "cannot write slotmap file: " + + OUStringToOString(aCommand.aSlotMapFile, RTL_TEXTENCODING_UTF8); fprintf(stderr, "%s\n", aStr.getStr()); } } @@ -181,12 +181,10 @@ int main ( int argc, char ** argv) if( bErr ) { nExit = -1; - OStringBuffer aStr("cannot move file from: "); - aStr.append(OUStringToOString(aErrFile2, - RTL_TEXTENCODING_UTF8)); - aStr.append("\n to file: "); - aStr.append(OUStringToOString(aErrFile, - RTL_TEXTENCODING_UTF8)); + OString aStr = "cannot move file from: " + + OUStringToOString(aErrFile2, RTL_TEXTENCODING_UTF8) + + "\n to file: " + + OUStringToOString(aErrFile, RTL_TEXTENCODING_UTF8); fprintf( stderr, "%s\n", aStr.getStr() ); } else |