summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/editutil.cxx5
-rw-r--r--sc/source/ui/docshell/docsh8.cxx5
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx16
3 files changed, 14 insertions, 12 deletions
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index fd517a37310d..41e7c27d0a8c 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -36,6 +36,7 @@
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
+#include <comphelper/string.hxx>
#include <editeng/eeitem.hxx>
#include <svx/algitem.hxx>
@@ -72,8 +73,8 @@ const sal_Char ScEditUtil::pCalcDelimiters[] = "=()+-*/^&<>";
String ScEditUtil::ModifyDelimiters( const String& rOld )
{
- String aRet = rOld;
- aRet.EraseAllChars( '_' ); // underscore is used in function argument names
+ // underscore is used in function argument names
+ String aRet = comphelper::string::remove(rOld, '_');
aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM( pCalcDelimiters ) );
aRet.Append(ScCompiler::GetNativeSymbol(ocSep)); // argument separator is localized.
return aRet;
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 733e06918437..bb9805263c03 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -37,10 +37,11 @@
#include <tools/urlobj.hxx>
#include <svl/converter.hxx>
#include <svl/zforlist.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/sharedunocomponent.hxx>
-#include <comphelper/processfactory.hxx>
#include <svx/txenctab.hxx>
#include <svx/dbcharsethelper.hxx>
@@ -539,7 +540,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( nToken > 1 )
{
aFieldName = aString.GetToken( 0, ',' );
- aString.EraseAllChars( ' ' );
+ aString = comphelper::string::remove(aString, ' ');
switch ( aString.GetToken( 1, ',' ).GetChar(0) )
{
case 'L' :
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 69585be38e1d..756c51254eef 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+#include <comphelper/string.hxx>
#include <svl/undo.hxx>
#include <unotools/textsearch.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -339,8 +340,7 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
String aString;
String aDesc;
- String aComment=pScChangeAction->GetComment();
- aComment.EraseAllChars('\n');
+ String aComment = comphelper::string::remove(pScChangeAction->GetComment(), '\n');
if(eType==SC_CAT_CONTENT)
{
@@ -465,8 +465,8 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(
bIsGenerated = true;
}
- String aComment=pScChangeAction->GetComment();
- aComment.EraseAllChars('\n');
+ String aComment = comphelper::string::remove(pScChangeAction->GetComment(), '\n');
+
if(aDesc.Len()>0)
{
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " (" ));
@@ -637,8 +637,8 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(
aString+='\t';
}
- String aComment=pScChangeAction->GetComment();
- aComment.EraseAllChars('\n');
+ String aComment = comphelper::string::remove(pScChangeAction->GetComment(), '\n');
+
if(aDesc.Len()>0)
{
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " (" ));
@@ -747,8 +747,8 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte
aString+='\t';
aString+='\t';
}
- String aComment=pScChangeAction->GetComment();
- aComment.EraseAllChars('\n');
+
+ String aComment = comphelper::string::remove(pScChangeAction->GetComment(), '\n');
if(aDesc.Len()>0)
{