summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-11 13:15:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-11 14:46:46 +0100
commit8f5629fd5aafc85e509a4160a11a285b0a66e7c0 (patch)
tree143883c85467b5ce9f5c665338e0f8a25067a0cd /editeng
parent2106d8e648449d34b195068eef5f672a14ea64a8 (diff)
remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eertfpar.cxx5
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/rtf/svxrtf.cxx4
3 files changed, 5 insertions, 8 deletions
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index b8801c0065a4..d3627eabf613 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -26,7 +26,7 @@
*
************************************************************************/
-
+#include <comphelper/string.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
#include <vcl/msgbox.hxx>
@@ -571,8 +571,7 @@ void EditRTFParser::ReadField()
if ( aFldInst.CompareIgnoreCaseToAscii( aHyperLinkMarker, aHyperLinkMarker.Len() ) == COMPARE_EQUAL )
{
aFldInst.Erase( 0, aHyperLinkMarker.Len() );
- aFldInst.EraseLeadingChars();
- aFldInst.EraseTrailingChars();
+ aFldInst = comphelper::string::strip(aFldInst, ' ');
aFldInst.Erase( 0, 1 ); // "
aFldInst.Erase( aFldInst.Len()-1, 1 ); // "
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index ffefcfb79004..cb2393f6b4ae 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -26,7 +26,6 @@
*
************************************************************************/
-
#include <comphelper/string.hxx>
#include <svl/intitem.hxx>
#include <editeng/editeng.hxx>
@@ -515,8 +514,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
}
sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart;
- String aLevel = aName.Copy( nPos );
- aLevel.EraseLeadingChars( ' ' );
+ String aLevel = comphelper::string::stripStart(aName.Copy(nPos), ' ');
nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.ToInt32());
if( nTabs )
nTabs--; // Level 0 = "heading 1"
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 45fd74be14de..c57d3c520641 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -812,9 +812,9 @@ void SvxRTFParser::ClearAttrStack()
String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel )
{
if( rStr.Len() && ' ' == rStr.GetChar( 0 ))
- rStr.EraseLeadingChars();
+ rStr = comphelper::string::stripStart(rStr, ' ');
if( rStr.Len() && ' ' == rStr.GetChar( rStr.Len()-1 ))
- rStr.EraseTrailingChars();
+ rStr = comphelper::string::stripEnd(rStr, ' ');
if( rStr.Len() && cDel == rStr.GetChar( rStr.Len()-1 ))
rStr.Erase( rStr.Len()-1 );
return rStr;