summaryrefslogtreecommitdiffstats
path: root/sw/source/filter/html
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/css1atr.cxx3
-rw-r--r--sw/source/filter/html/htmlatr.cxx3
-rw-r--r--sw/source/filter/html/htmlbas.cxx5
-rw-r--r--sw/source/filter/html/htmlfldw.cxx7
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/parcss1.cxx3
-rw-r--r--sw/source/filter/html/swhtml.cxx5
7 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index c440f955bd3c..116fca8c32a1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -27,6 +27,7 @@
************************************************************************/
#include "hintids.hxx"
+#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <svl/whiter.hxx>
@@ -1217,7 +1218,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
while( nStrPos != STRING_NOTFOUND )
{
String aName = rName.GetToken( 0, ';', nStrPos );
- aName.EraseTrailingChars().EraseLeadingChars();
+ aName = comphelper::string::strip(aName, ' ');
if( !aName.Len() )
continue;
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index c72b588ae5af..389c75718e89 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -28,6 +28,7 @@
#include <hintids.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
+#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <sfx2/sfx.hrc>
@@ -3005,7 +3006,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
sRel = aURL.Copy( nPos+1 );
aURL.Erase( nPos );
}
- aURL.EraseLeadingChars().EraseTrailingChars();
+ aURL = comphelper::string::strip(aURL, ' ');
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 1ee17bb73717..9dc4cefc6954 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -27,6 +27,7 @@
************************************************************************/
#include <hintids.hxx>
+#include <comphelper/string.hxx>
#include <rtl/strbuf.hxx>
#include <sfx2/sfx.hrc>
#include <svl/svstdarr.hxx>
@@ -203,7 +204,7 @@ void SwHTMLParser::AddScriptSource()
{
aBasicLib =
aToken.Copy( nPos + sizeof(OOO_STRING_SVTOOLS_HTML_SB_library) - 1 );
- aBasicLib.EraseLeadingChars().EraseTrailingChars();
+ aBasicLib = comphelper::string::strip(aBasicLib, ' ');
}
}
@@ -214,7 +215,7 @@ void SwHTMLParser::AddScriptSource()
{
aBasicModule =
aToken.Copy( nPos + sizeof(OOO_STRING_SVTOOLS_HTML_SB_module) - 1 );
- aBasicModule.EraseLeadingChars().EraseTrailingChars();
+ aBasicModule = comphelper::string::strip(aBasicModule, ' ');
}
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 88f6df9b9337..a4fe67a21c45 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -27,6 +27,7 @@
************************************************************************/
#include <com/sun/star/i18n/ScriptType.hpp>
+#include <comphelper/string.hxx>
#include <tools/string.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
@@ -447,8 +448,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
else if (pFldTyp->GetName() != "HTML_OFF")
return rWrt;
- String rTxt( pFld->GetPar2() );
- rTxt.EraseLeadingChars().EraseTrailingChars();
+ String rTxt(comphelper::string::strip(pFld->GetPar2(), ' '));
rWrt.Strm() << '<';
if( !bOn )
rWrt.Strm() << '/';
@@ -485,8 +485,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
'>' == rComment.GetChar(rComment.Len()-1) &&
rComment.Copy(0,5).EqualsIgnoreCaseAscii("HTML:") )
{
- String sComment( rComment.Copy(5) );
- sComment.EraseLeadingChars();
+ String sComment(comphelper::string::stripStart(rComment.Copy(5), ' '));
if( '<' == sComment.GetChar(0) )
{
sComment = convertLineEnd(sComment, GetSystemLineEnd());
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 2a3dbf29905b..789292e460cd 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -634,7 +634,7 @@ IMAGE_SETEVENT:
}
// Image-Map setzen
- aMap.EraseTrailingChars();
+ aMap = comphelper::string::stripEnd(aMap, ' ');
if( aMap.Len() )
{
// Da wir nur lokale Image-Maps kennen nehmen wireinfach alles
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index cf2adc6597b1..1bfcb6cd020f 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -1261,8 +1261,7 @@ sal_Bool CSS1Expression::GetURL( String& rURL ) const
if( aValue.Len() > 5 )
{
rURL = aValue.Copy( 4, aValue.Len()-5 );
- rURL.EraseTrailingChars();
- rURL.EraseLeadingChars();
+ rURL = comphelper::string::strip(rURL, ' ');
bRet = sal_True;
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 703cef0be78d..2f0819454571 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1963,8 +1963,7 @@ void SwHTMLParser::NextToken( int nToken )
' ' == aToken.GetChar( aToken.Len()-3 ) )
{
String aComment( aToken.Copy( 3, aToken.Len()-5 ) );
- aComment.EraseLeadingChars().EraseTrailingChars();
- InsertComment( aComment );
+ InsertComment(comphelper::string::strip(aComment, ' '));
}
else
{
@@ -3709,7 +3708,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
while( nStrPos!=STRING_NOTFOUND )
{
String aFName = aFace.GetToken( 0, ',', nStrPos );
- aFName.EraseTrailingChars().EraseLeadingChars();
+ aFName = comphelper::string::strip(aFName, ' ');
if( aFName.Len() )
{
if( !bFound && pFList )