summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-18 21:03:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-19 21:11:02 +0000
commitca02d728082a86780d68ede7b9d565128dbc0434 (patch)
tree8c0a857ad73f89d592295f99e5f72a0c96e55e57 /sfx2/source/dialog
parente4ff699291ddab16d70aa9b11c717e34dfbe5414 (diff)
remove [Byte]String::EraseAllChars
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx9
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx4
-rw-r--r--sfx2/source/dialog/mailmodel.cxx19
-rw-r--r--sfx2/source/dialog/newstyle.cxx4
4 files changed, 21 insertions, 15 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 )