From 7855ea48309ee2ba06ee5f3d5dac27ecfc4ca4a6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 1 Jul 2016 13:20:11 +0200 Subject: remove comphelper::string::remove and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/control/ctrltool.cxx | 3 +-- svtools/source/misc/imap2.cxx | 4 ++-- svtools/source/svhtml/parhtml.cxx | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 7702add7dc35..a196e0a3ad8d 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -441,8 +441,7 @@ OUString FontList::GetStyleName(const FontMetric& rInfo) const else { // Translate StyleName to localized name - OUString aCompareStyleName = aStyleName.toAsciiLowerCase(); - aCompareStyleName = comphelper::string::remove(aCompareStyleName, ' '); + OUString aCompareStyleName = aStyleName.toAsciiLowerCase().replaceAll(" ", ""); if (aCompareStyleName == "bold") aStyleName = maBold; else if (aCompareStyleName == "bolditalic") diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 01e534cf7507..b031d4c85cc7 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -248,7 +248,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL { OString aStr = comphelper::string::stripStart(rLine, ' '); aStr = comphelper::string::stripStart(aStr, '\t'); - aStr = comphelper::string::remove(aStr, ';'); + aStr = aStr.replaceAll(";", ""); aStr = aStr.toAsciiLowerCase(); const char* pStr = aStr.getStr(); @@ -389,7 +389,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine, const OUString& rBaseURL ) { OString aStr = comphelper::string::stripStart(rLine, ' '); aStr = comphelper::string::stripStart(aStr, '\t'); - aStr = comphelper::string::remove(aStr, ';'); + aStr = aStr.replaceAll(";", ""); aStr = aStr.toAsciiLowerCase(); const char* pStr = aStr.getStr(); diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 931890b2da48..a47b4e4a5cd6 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1934,8 +1934,7 @@ bool HTMLParser::ParseMetaOptionsImpl( if ( bHTTPEquiv || HTML_META_DESCRIPTION != nAction ) { // if it is not a Description, remove CRs and LFs from CONTENT - aContent = comphelper::string::remove(aContent, '\r'); - aContent = comphelper::string::remove(aContent, '\n'); + aContent = aContent.replaceAll("\r", "").replaceAll("\n", ""); } else { -- cgit