summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-16 22:19:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-17 23:04:10 +0000
commitdca04e236193db7de908aad746fd4539e78eb428 (patch)
tree9808f843924944a740ca8037094d4d5c4553bbc8 /svl
parentc4927a1b76b728b2208c29d09dbf54e70bb26e13 (diff)
add a StringUtils-alike remove (can replace EraseAllChars)
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/lngmisc.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 2eba00efd565..768dc4c8913c 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
+#include <comphelper/string.hxx>
#include <svl/lngmisc.hxx>
#include <tools/solar.h>
#include <tools/string.hxx>
@@ -55,22 +56,18 @@ sal_Int32 GetNumControlChars( const OUString &rTxt )
return nCnt;
}
-
sal_Bool RemoveHyphens( OUString &rTxt )
{
sal_Bool bModified = sal_False;
- if (HasHyphens( rTxt ))
+ if (HasHyphens(rTxt))
{
- String aTmp( rTxt );
- aTmp.EraseAllChars( SVT_SOFT_HYPHEN );
- aTmp.EraseAllChars( SVT_HARD_HYPHEN );
- rTxt = aTmp;
+ rTxt = comphelper::string::remove(rTxt, SVT_SOFT_HYPHEN);
+ rTxt = comphelper::string::remove(rTxt, SVT_HARD_HYPHEN);
bModified = sal_True;
}
return bModified;
}
-
sal_Bool RemoveControlChars( OUString &rTxt )
{
sal_Bool bModified = sal_False;