From b7ea36101497c275cb08b0e37facbde656197d9b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 22 Nov 2011 23:40:24 +0000 Subject: add stripStart, can replace EraseTrailingChars --- vcl/generic/fontmanager/fontmanager.cxx | 4 ++-- vcl/unx/generic/printer/ppdparser.cxx | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'vcl') 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; -- cgit