summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-01 13:20:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-04 06:49:52 +0000
commit7855ea48309ee2ba06ee5f3d5dac27ecfc4ca4a6 (patch)
tree359d2a334303f6e32582981efef6e6e0d6b69e01 /vcl
parentcd71034b26a404c8f9b763865ef6ebdd0adeebb7 (diff)
remove comphelper::string::remove
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/salmenu.cxx4
-rw-r--r--vcl/source/app/svdata.cxx2
-rw-r--r--vcl/source/control/edit.cxx5
-rw-r--r--vcl/source/control/field.cxx3
-rw-r--r--vcl/source/filter/sgvtext.cxx2
5 files changed, 7 insertions, 9 deletions
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 3c2a476969e1..70a438a8294d 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -638,7 +638,7 @@ void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem,
AquaSalMenuItem *pAquaSalMenuItem = static_cast<AquaSalMenuItem *>(i_pSalMenuItem);
// Delete mnemonics
- OUString aText( comphelper::string::remove(i_rText, '~') );
+ OUString aText = i_rText.replaceAll("~", "");
/* #i90015# until there is a correct solution
strip out any appended (.*) in menubar entries
@@ -867,7 +867,7 @@ AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* pItemData ) :
mpMenuItem( nil )
{
// Delete mnemonics
- OUString aText( comphelper::string::remove(pItemData->aText, '~') );
+ OUString aText = pItemData->aText.replaceAll("~", "");
if (pItemData->eType == MenuItemType::SEPARATOR)
{
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index ddad3e3738e8..b43f00ca332a 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -237,7 +237,7 @@ FieldUnitStringList* ImplGetCleanedFieldUnits()
for( size_t i = 0; i < nUnits; ++i )
{
OUString aUnit( (*pUnits)[i].first );
- aUnit = comphelper::string::remove(aUnit, ' ');
+ aUnit = aUnit.replaceAll(" ", "");
aUnit = aUnit.toAsciiLowerCase();
std::pair< OUString, FieldUnit > aElement( aUnit, (*pUnits)[i].second );
pSVData->maCtrlData.mpCleanUnitStrings->push_back( aElement );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 0e267cd9665e..2152c28ceca0 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -771,8 +771,7 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI
OUString Edit::ImplGetValidString( const OUString& rString ) const
{
OUString aValidString( rString );
- aValidString = comphelper::string::remove(aValidString, '\n');
- aValidString = comphelper::string::remove(aValidString, '\r');
+ aValidString = aValidString.replaceAll("\n", "").replaceAll("\r", "");
aValidString = aValidString.replace('\t', ' ');
return aValidString;
}
@@ -2324,7 +2323,7 @@ OUString TextFilter::filter(const OUString &rText)
OUString sTemp(rText);
for (sal_Int32 i = 0; i < sForbiddenChars.getLength(); ++i)
{
- sTemp = comphelper::string::remove(sTemp, sForbiddenChars[i]);
+ sTemp = sTemp.replaceAll(OUString(sForbiddenChars[i]), "");
}
return sTemp;
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 03debfb9f1ef..96e1f3cebb2d 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1087,8 +1087,7 @@ static FieldUnit ImplStringToMetric(const OUString &rMetricString)
if( pList )
{
// return FieldUnit
- OUString aStr(rMetricString.toAsciiLowerCase());
- aStr = string::remove(aStr, ' ');
+ OUString aStr = rMetricString.toAsciiLowerCase().replaceAll(" ", "");
for( FieldUnitStringList::const_iterator it = pList->begin(); it != pList->end(); ++it )
{
if ( it->first == aStr )
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 10e84cc53f68..c062c50474ff 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -1109,7 +1109,7 @@ void SgfFontLst::ReadList()
for (i=0;i<Anz;i++)
{
- FID = comphelper::string::remove(aCfg.GetKeyName(i), ' ');
+ FID = aCfg.GetKeyName(i).replaceAll(" ", "");
Dsc = aCfg.ReadKey( i );
if (comphelper::string::isdigitAsciiString(FID))
{