summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-22 23:40:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-22 23:40:45 +0000
commit8e457595bea4ebccafc71c8ce71bc19696d70c40 (patch)
treea37958247569c356ef0b625ba2a80af579306148
parentuse stripStart (diff)
downloadbinfilter-8e457595bea4ebccafc71c8ce71bc19696d70c40.tar.gz
binfilter-8e457595bea4ebccafc71c8ce71bc19696d70c40.zip
use stripStart
-rw-r--r--binfilter/bf_starmath/source/starmath_mathml.cxx3
-rw-r--r--binfilter/bf_starmath/source/starmath_utility.cxx3
-rw-r--r--binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx8
3 files changed, 8 insertions, 6 deletions
diff --git a/binfilter/bf_starmath/source/starmath_mathml.cxx b/binfilter/bf_starmath/source/starmath_mathml.cxx
index e81a8f25d..dd64eb928 100644
--- a/binfilter/bf_starmath/source/starmath_mathml.cxx
+++ b/binfilter/bf_starmath/source/starmath_mathml.cxx
@@ -76,6 +76,7 @@ one go*/
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/genericpropertyset.hxx>
+#include <comphelper/string.hxx>
#include <bf_svtools/itemprop.hxx>
@@ -630,7 +631,7 @@ void SmXMLImport::endDocument(void)
//Make up some editable text
aText = pDocShell->GetText();
pTree->CreateTextFromNode(aText);
- aText.EraseTrailingChars();
+ aText = comphelper::string::stripEnd(aText, ' ');
if((aText.GetChar(0) == '{') &&
(aText.GetChar(aText.Len()-1) == '}'))
{
diff --git a/binfilter/bf_starmath/source/starmath_utility.cxx b/binfilter/bf_starmath/source/starmath_utility.cxx
index 735b22ac9..68aa2694c 100644
--- a/binfilter/bf_starmath/source/starmath_utility.cxx
+++ b/binfilter/bf_starmath/source/starmath_utility.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <comphelper/string.hxx>
#include <tools/tenccvt.hxx>
#include <osl/thread.h>
@@ -217,7 +218,7 @@ int GetTextEncodingTabIndex( const String &rTxt, xub_StrLen nPos )
/*N*/ // in old 2.0 or 3.0 formulas the strings to be imported do have an
/*N*/ // additional '\0' character at the end that gets removed here.
/*N*/ if (aString.Len())
-/*N*/ aString.EraseTrailingChars( '\0' );
+/*N*/ aString = comphelper::string::stripEnd(aString, '\0');
/*N*/
/*N*/ aString.ConvertLineEnd();
/*N*/ return aString;
diff --git a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
index dcb93f6ef..99b2e9de3 100644
--- a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
+++ b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx
@@ -3366,7 +3366,7 @@ void Sw6Layout::AddXForm(sal_Char cLead, ByteString &rTmp, String &rStr)
// Kurzform, wird oefter benoetigt
{
rTmp = comphelper::string::stripStart(rTmp, ' ');
- rTmp.EraseTrailingChars();
+ rTmp = comphelper::string::stripEnd(rTmp, ' ');
rTmp.Insert((sal_Char)rTmp.Len(),0);
rTmp.Insert(cLead,0);
AddHForm(rTmp.GetBuffer(),rStr.Len(),rTmp.Len(),1);
@@ -3498,7 +3498,7 @@ size_t Sw6Layout::PutRest(String &rStr,sal_Char *pCtrl)
rtl::OStringToOUString(aTmp, RTL_TEXTENCODING_IBM_850),
osl_getThreadTextEncoding());
aTmp = comphelper::string::stripStart(aTmp, ' ');
- aTmp.EraseTrailingChars();
+ aTmp = comphelper::string::stripEnd(aTmp, ' ');
aTmp.Insert('}'); // Mache versteckten Text
aTmp.Insert('{',0);
AddXForm('-',aTmp,rStr);
@@ -5320,7 +5320,7 @@ BOOL SwSw6Parser::ReadDocInfo(void)
if (ReadLn(rTmp))
{
rTmp = comphelper::string::stripStart(rTmp, ' ');
- rTmp.EraseTrailingChars();
+ rTmp = comphelper::string::stripEnd(rTmp, ' ');
}
else
break;
@@ -5331,7 +5331,7 @@ BOOL SwSw6Parser::ReadDocInfo(void)
if (ReadLn(rTmp))
{
rTmp = comphelper::string::stripStart(rTmp, ' ');
- rTmp.EraseTrailingChars();
+ rTmp = comphelper::string::stripEnd(rTmp, ' ');
}
else
break;