diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-18 13:32:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 09:59:20 +0100 |
commit | 68c3fbf49dcdccad84a81fd191cd964e923ae072 (patch) | |
tree | 8f33f1b0d60f5f9ec89c31a25f4b5ffe59b245f1 /l10ntools/source | |
parent | testtool has no need to print (doesn't under unix anyway) (diff) | |
download | core-68c3fbf49dcdccad84a81fd191cd964e923ae072.tar.gz core-68c3fbf49dcdccad84a81fd191cd964e923ae072.zip |
remove redundant intermediate ByteStrings
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/export.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
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 ) |