diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-16 22:19:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-17 23:04:10 +0000 |
commit | dca04e236193db7de908aad746fd4539e78eb428 (patch) | |
tree | 9808f843924944a740ca8037094d4d5c4553bbc8 /svl | |
parent | ByteString->rtl::OString[Buffer] (diff) | |
download | core-dca04e236193db7de908aad746fd4539e78eb428.tar.gz core-dca04e236193db7de908aad746fd4539e78eb428.zip |
add a StringUtils-alike remove (can replace EraseAllChars)
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/lngmisc.cxx | 11 |
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; |