summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-21 12:28:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-21 14:11:57 +0200
commit69e385ec0240d0c44caa5a4ea0195e06007cd588 (patch)
tree905f798798ac36bc38d43669aa543498f7093c3e /vcl
parentd757051f1c0c6a1b3239dcf0d1c6c7e20392d20b (diff)
simplify stripStart/End pairs into a single strip call
Change-Id: I32b1b7d944a4ec49d7daa5b8fa9371b059380062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114393 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/fmtfield.cxx6
-rw-r--r--vcl/source/treelist/imap2.cxx6
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx9
3 files changed, 7 insertions, 14 deletions
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index 2910c7e02604..cb55d2ce158a 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -1114,8 +1114,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
if (getPrependCurrSym())
{
OUString sSymbol = getCurrencySymbol();
- sSymbol = comphelper::string::stripStart(sSymbol, ' ');
- sSymbol = comphelper::string::stripEnd(sSymbol, ' ');
+ sSymbol = comphelper::string::strip(sSymbol, ' ');
OUStringBuffer sTemp("[$");
sTemp.append(sSymbol);
@@ -1136,8 +1135,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
else
{
OUString sTemp = getCurrencySymbol();
- sTemp = comphelper::string::stripStart(sTemp, ' ');
- sTemp = comphelper::string::stripEnd(sTemp, ' ');
+ sTemp = comphelper::string::strip(sTemp, ' ');
sNewFormat.append(" [$");
sNewFormat.append(sTemp);
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 4c55f67cde31..889b2c061d92 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -358,10 +358,8 @@ OUString ImageMap::ImpReadCERNURL( const char** ppStr )
{
OUString aStr(OUString::createFromAscii(*ppStr));
- aStr = comphelper::string::stripStart(aStr, ' ');
- aStr = comphelper::string::stripStart(aStr, '\t');
- aStr = comphelper::string::stripEnd(aStr, ' ');
- aStr = comphelper::string::stripEnd(aStr, '\t');
+ aStr = comphelper::string::strip(aStr, ' ');
+ aStr = comphelper::string::strip(aStr, '\t');
return INetURLObject::GetAbsURL( "", aStr );
}
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 7b29c876a8c3..75abab8bc728 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -720,14 +720,11 @@ PPDParser::PPDParser( const OUString& rFile ) :
if (aCurLine.matchIgnoreAsciiCase("*include:"))
{
aCurLine = aCurLine.copy(9);
- aCurLine = comphelper::string::stripStart(aCurLine, ' ');
- aCurLine = comphelper::string::stripEnd(aCurLine, ' ');
- aCurLine = comphelper::string::stripStart(aCurLine, '\t');
- aCurLine = comphelper::string::stripEnd(aCurLine, '\t');
+ aCurLine = comphelper::string::strip(aCurLine, ' ');
+ aCurLine = comphelper::string::strip(aCurLine, '\t');
aCurLine = comphelper::string::stripEnd(aCurLine, '\r');
aCurLine = comphelper::string::stripEnd(aCurLine, '\n');
- aCurLine = comphelper::string::stripStart(aCurLine, '"');
- aCurLine = comphelper::string::stripEnd(aCurLine, '"');
+ aCurLine = comphelper::string::strip(aCurLine, '"');
aStream.Close();
aStream.Open(getPPDFile(OStringToOUString(aCurLine, m_aFileEncoding)));
continue;