summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-23 17:24:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 23:16:44 +0000
commit0dbc4fa3efdea90ba23e17e12c2bfe15d763acbf (patch)
tree857875b2edaee72abb836c8235c4bb87e6e6a18b /l10ntools
parent2dba28faae2266e72c05d8f3d55bfbc3e5771adb (diff)
add string::strip, can replace EraseLeadingAndTrailingChars
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/export2.cxx4
-rw-r--r--l10ntools/source/merge.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 72ffde06f777..020e67a5553e 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -354,7 +354,7 @@ void Export::InitLanguages( bool bMergeMode ){
ByteStringBoolHashMap aEnvLangs;
for ( sal_uInt16 x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
sTmp = getToken(getToken(sLanguages, x, ','), 0, '=');
- sTmp.EraseLeadingAndTrailingChars();
+ sTmp = comphelper::string::strip(sTmp, ' ');
if( bMergeMode && !isAllowed( sTmp ) ){}
else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) ){
aLanguages.push_back( sTmp );
@@ -371,7 +371,7 @@ void Export::InitForcedLanguages( bool bMergeMode ){
ByteStringBoolHashMap aEnvLangs;
for ( sal_uInt16 x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
sTmp = getToken(getToken(sForcedLanguages, x, ','), 0, '=');
- sTmp.EraseLeadingAndTrailingChars();
+ sTmp = comphelper::string::strip(sTmp, ' ');
if( bMergeMode && isAllowed( sTmp ) ){}
else if( !( (sTmp.GetChar(0)=='x' || sTmp.GetChar(0)=='X') && sTmp.GetChar(1)=='-' ) )
aForcedLanguages.push_back( sTmp );
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index a42f058cd160..8c409f49b813 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -216,7 +216,7 @@ MergeDataFile::MergeDataFile(
ByteString sPFO = sLine.GetToken( 1, '\t', rIdx ); // 7
sPFO = sHACK;
ByteString nLANG = sLine.GetToken( 1, '\t', rIdx ); // 9
- nLANG.EraseLeadingAndTrailingChars();
+ nLANG = comphelper::string::strip(nLANG, ' ');
const ByteString sTEXT = sLine.GetToken( 0, '\t', rIdx ); // 10
const ByteString sQHTEXT = sLine.GetToken( 1, '\t', rIdx ); // 12
const ByteString sTITLE = sLine.GetToken( 0, '\t', rIdx ); // 13