diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-22 23:40:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 10:10:09 +0000 |
commit | b7ea36101497c275cb08b0e37facbde656197d9b (patch) | |
tree | a05e25d4f01c94c69712d17a1ab4cdbc925ef355 /vcl | |
parent | 62d880f3228c7f5c3f8a1d30f5a5c9ed390a1eb5 (diff) |
add stripStart, can replace EraseTrailingChars
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 789e57d8f92c..24b20062fb33 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -2087,9 +2087,9 @@ void PrintFontManager::initFontsAlias() // remove eventual quotes aAlias = comphelper::string::stripStart(aAlias, '"'); - aAlias.EraseTrailingChars( '"' ); + aAlias = comphelper::string::stripEnd(aAlias, '"'); aMap = comphelper::string::stripStart(aMap, '"'); - aMap.EraseTrailingChars( '"' ); + aMap = comphelper::string::stripEnd(aMap, '"'); XLFDEntry aAliasEntry, aMapEntry; parseXLFD( aAlias, aAliasEntry ); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index e3b797005fce..724d46a9b054 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -606,13 +606,13 @@ String PPDParser::getPPDPrinterName( const String& rFile ) { aCurLine.Erase( 0, 9 ); aCurLine = comphelper::string::stripStart(aCurLine, ' '); - aCurLine.EraseTrailingChars( ' ' ); + aCurLine = comphelper::string::stripEnd(aCurLine, ' '); aCurLine = comphelper::string::stripStart(aCurLine, '\t'); - aCurLine.EraseTrailingChars( '\t' ); - aCurLine.EraseTrailingChars( '\r' ); - aCurLine.EraseTrailingChars( '\n' ); + aCurLine = comphelper::string::stripEnd(aCurLine, '\t'); + aCurLine = comphelper::string::stripEnd(aCurLine, '\r'); + aCurLine = comphelper::string::stripEnd(aCurLine, '\n'); aCurLine = comphelper::string::stripStart(aCurLine, '"'); - aCurLine.EraseTrailingChars( '"' ); + aCurLine = comphelper::string::stripEnd(aCurLine, '"'); aStream.Close(); aStream.Open( getPPDFile( aCurLine ) ); continue; @@ -705,13 +705,13 @@ PPDParser::PPDParser( const String& rFile ) : { aCurLine.Erase( 0, 9 ); aCurLine = comphelper::string::stripStart(aCurLine, ' '); - aCurLine.EraseTrailingChars( ' ' ); + aCurLine = comphelper::string::stripEnd(aCurLine, ' '); aCurLine = comphelper::string::stripStart(aCurLine, '\t'); - aCurLine.EraseTrailingChars( '\t' ); - aCurLine.EraseTrailingChars( '\r' ); - aCurLine.EraseTrailingChars( '\n' ); + aCurLine = comphelper::string::stripEnd(aCurLine, '\t'); + aCurLine = comphelper::string::stripEnd(aCurLine, '\r'); + aCurLine = comphelper::string::stripEnd(aCurLine, '\n'); aCurLine = comphelper::string::stripStart(aCurLine, '"'); - aCurLine.EraseTrailingChars( '"' ); + aCurLine = comphelper::string::stripEnd(aCurLine, '"'); aStream.Close(); aStream.Open( getPPDFile( String( aCurLine, m_aFileEncoding ) ) ); continue; |