From 68c3fbf49dcdccad84a81fd191cd964e923ae072 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 18 Sep 2011 13:32:07 +0100 Subject: remove redundant intermediate ByteStrings --- l10ntools/source/export.cxx | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index 49d9a0ff64a4..f11261aec4d0 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -393,10 +393,9 @@ sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel ) SetError(); } - if ( sId.Len() > 255 ) { - ByteString sWarning( "LocalId > 255 chars, truncating..." ); - YYWarning( sWarning.GetBufferAccess()); - sWarning.ReleaseBufferAccess(); + if ( sId.Len() > 255 ) + { + YYWarning( "LocalId > 255 chars, truncating..." ); sId.Erase( 255 ); sId.EraseTrailingChars( ' ' ); sId.EraseTrailingChars( '\t' ); @@ -694,12 +693,9 @@ int Export::Execute( int nToken, const char * pToken ) CleanValue( sId ); sId = sId.EraseAllChars( '\t' ); pResData->SetId( sId, ID_LEVEL_IDENTIFIER ); - if ( sCondition.Len()) { - ByteString sEmpty( "" ); - Execute( CONDITION, sEmpty.GetBufferAccess()); // execute the - // precomp. - // condition - sEmpty.ReleaseBufferAccess(); + if ( sCondition.Len()) + { + Execute( CONDITION, ""); // execute the precomp. condition } } break; @@ -966,9 +962,7 @@ int Export::Execute( int nToken, const char * pToken ) pResData->bHelpText = sal_True; if ( bBreakWhenHelpText ) { - rtl::OString sError( - RTL_CONSTASCII_STRINGPARAM("\"HelpText\" found in source\n")); - YYWarning(sError.getStr()); + YYWarning("\"HelpText\" found in source"); SetError(); } if ( bMergeMode ) -- cgit v1.2.3