diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-18 21:03:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-19 21:11:02 +0000 |
commit | ca02d728082a86780d68ede7b9d565128dbc0434 (patch) | |
tree | 8c0a857ad73f89d592295f99e5f72a0c96e55e57 /sfx2 | |
parent | e4ff699291ddab16d70aa9b11c717e34dfbe5414 (diff) |
remove [Byte]String::EraseAllChars
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/filtergrouping.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 19 | ||||
-rw-r--r-- | sfx2/source/dialog/newstyle.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 4 |
5 files changed, 24 insertions, 16 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index e298de18c479..b5dfe5c2a0eb 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -56,9 +56,10 @@ #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/types.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/stillreadwriteinteraction.hxx> +#include <comphelper/string.hxx> +#include <comphelper/types.hxx> #include <tools/urlobj.hxx> #include <vcl/help.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -1368,12 +1369,12 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac { rpURLList = NULL; - String sExtension; + rtl::OUString sExtension; if (pFilter) { sExtension = pFilter->GetDefaultExtension (); - sExtension.EraseAllChars( '*' ); - sExtension.EraseAllChars( '.' ); + sExtension = comphelper::string::remove(sExtension, '*'); + sExtension = comphelper::string::remove(sExtension, '.'); } // a) the new way (optional!) diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 43fd007e688c..b7d387115e9a 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -1263,8 +1263,10 @@ namespace sfx2 { String sExt = _rExtension; if ( !_bForOpen ) + { // show '*' in extensions only when opening a document - sExt.EraseAllChars( '*' ); + sExt = comphelper::string::remove(sExt, '*'); + } sRet += sOpenBracket; sRet += sExt; sRet += sCloseBracket; diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index d662371bc329..42da4b80bea7 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -73,12 +73,13 @@ #include <ucbhelper/content.hxx> #include <tools/urlobj.hxx> #include <unotools/useroptions.hxx> -#include <comphelper/processfactory.hxx> #include <comphelper/extract.hxx> -#include <comphelper/storagehelper.hxx> -#include <comphelper/sequenceasvector.hxx> -#include <comphelper/sequenceashashmap.hxx> #include <comphelper/mediadescriptor.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/sequenceashashmap.hxx> +#include <comphelper/sequenceasvector.hxx> +#include <comphelper/storagehelper.hxx> +#include <comphelper/string.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> #include <cppuhelper/implbase1.hxx> @@ -992,15 +993,15 @@ sal_Bool CreateFromAddress_Impl( String& rFrom ) } rFrom += TRIM( aName ); // remove illegal characters - rFrom.EraseAllChars( '<' ); - rFrom.EraseAllChars( '>' ); - rFrom.EraseAllChars( '@' ); + rFrom = comphelper::string::remove(rFrom, '<'); + rFrom = comphelper::string::remove(rFrom, '>'); + rFrom = comphelper::string::remove(rFrom, '@'); } String aEmailName = aUserCFG.GetEmail(); // remove illegal characters - aEmailName.EraseAllChars( '<' ); - aEmailName.EraseAllChars( '>' ); + aEmailName = comphelper::string::remove(aEmailName, '<'); + aEmailName = comphelper::string::remove(aEmailName, '>'); if ( aEmailName.Len() ) { diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 0984e8c62010..3cadcdfdd071 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -30,6 +30,8 @@ #include "precompiled_sfx2.hxx" // INCLUDE --------------------------------------------------------------- +#include <comphelper/string.hxx> + #include <svl/style.hxx> #include <sfx2/newstyle.hxx> @@ -65,7 +67,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl ) IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox ) { - aOKBtn.Enable( pBox->GetText().EraseAllChars().Len() > 0 ); + aOKBtn.Enable( comphelper::string::remove(pBox->GetText(), ' ').getLength() > 0 ); return 0; } IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox ) diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 990eb6ec7e1c..b03948b7f345 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -65,6 +65,7 @@ #include <svtools/ehdl.hxx> #include <unotools/printwarningoptions.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <com/sun/star/document/XStorageBasedDocument.hpp> #include <com/sun/star/script/DocumentDialogLibraryContainer.hpp> @@ -984,7 +985,8 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact ) aFact.Erase( nPos, aFact.Len() ); aParam.Erase(0,1); } - aFact.EraseAllChars('4').ToLowerAscii(); + aFact = comphelper::string::remove(aFact, '4'); + aFact.ToLowerAscii(); // HACK: sometimes a real document service name is given here instead of // a factory short name. Set return value directly to this service name as fallback |