summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-18 13:32:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-19 09:59:20 +0100
commit68c3fbf49dcdccad84a81fd191cd964e923ae072 (patch)
tree8f33f1b0d60f5f9ec89c31a25f4b5ffe59b245f1
parent6eef57ed12811785c1c195b0c678142e2362dfbc (diff)
remove redundant intermediate ByteStrings
-rw-r--r--l10ntools/source/export.cxx20
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 )