summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-23 22:17:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 23:16:45 +0000
commit709c1f365b3bdd0d46ec4f1ddc244580a0dfa637 (patch)
tree63668e23e125bf3fd1921f906cc269ed6ece8f38 /vcl
parent868bd3b778b6c7b970c67d1dacc469967f69e551 (diff)
remove various EraseLeadingAndTrailingChars
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/combobox.cxx7
-rw-r--r--vcl/source/control/field.cxx2
-rw-r--r--vcl/source/control/longcurr.cxx3
-rw-r--r--vcl/source/window/toolbox2.cxx3
4 files changed, 9 insertions, 6 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 0f551bf5c648..23141b6e8505 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <comphelper/string.hxx>
#include <tools/table.hxx>
#include <tools/debug.hxx>
#include <tools/rc.h>
@@ -58,7 +59,7 @@ static void lcl_GetSelectedEntries( Table& rSelectedPos, const XubString& rText,
for( xub_StrLen n = rText.GetTokenCount( cTokenSep ); n; )
{
XubString aToken = rText.GetToken( --n, cTokenSep );
- aToken.EraseLeadingAndTrailingChars( ' ' );
+ aToken = comphelper::string::strip(aToken, ' ');
sal_uInt16 nPos = pEntryList->FindEntry( aToken );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
rSelectedPos.Insert( ImplCreateKey( nPos ), (void*)sal_IntPtr(1L) );
@@ -402,7 +403,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
xub_StrLen nPrevIndex = nIndex;
XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
xub_StrLen nTokenLen = aToken.Len();
- aToken.EraseLeadingAndTrailingChars( ' ' );
+ aToken = comphelper::string::strip(aToken, ' ');
sal_uInt16 nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
@@ -414,7 +415,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
nIndex--;
}
}
- aText.EraseLeadingAndTrailingChars( ' ' );
+ aText = comphelper::string::strip(aText, ' ');
}
// Fehlende Eintraege anhaengen...
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 4f56bad14046..67219131ecdd 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -119,7 +119,7 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
- aStr.EraseLeadingAndTrailingChars( ' ' );
+ aStr = comphelper::string::strip(aStr, ' ');
// Position des Dezimalpunktes suchen
nDecPos = aStr.Search( rLocaleDataWrappper.getNumDecimalSep() );
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 34048a1c60ce..e43e746052ff 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <comphelper/string.hxx>
#include <sot/object.hxx>
#define _TOOLS_BIGINT
#include <sot/factory.hxx>
@@ -154,7 +155,7 @@ static sal_Bool ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
- aStr.EraseLeadingAndTrailingChars( ' ' );
+ aStr = comphelper::string::strip(aStr, ' ');
// Position des Dezimalpunktes suchen
nDecPos = aStr.Search( rLocaleDataWrapper.getNumDecimalSep() );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 3e32f5d02bf2..3be48964636f 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <comphelper/string.hxx>
#include <tools/debug.hxx>
#include <tools/rc.h>
@@ -405,7 +406,7 @@ const XubString& ToolBox::ImplConvertMenuString( const XubString& rStr )
{
maCvtStr = rStr;
if ( mbMenuStrings )
- maCvtStr.EraseTrailingChars( '.' );
+ maCvtStr = comphelper::string::stripEnd(maCvtStr, '.');
maCvtStr = MnemonicGenerator::EraseAllMnemonicChars( maCvtStr );
return maCvtStr;
}