From 8f5629fd5aafc85e509a4160a11a285b0a66e7c0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 Jun 2012 13:15:18 +0100 Subject: remove EraseLeadingChars and EraseTrailingChars Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892 --- editeng/source/editeng/eertfpar.cxx | 5 ++--- editeng/source/outliner/outliner.cxx | 4 +--- editeng/source/rtf/svxrtf.cxx | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'editeng') 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 #include #include #include @@ -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 #include #include @@ -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; -- cgit