diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-18 21:03:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-19 21:11:02 +0000 |
commit | ca02d728082a86780d68ede7b9d565128dbc0434 (patch) | |
tree | 8c0a857ad73f89d592295f99e5f72a0c96e55e57 /sw/source/filter/html | |
parent | e4ff699291ddab16d70aa9b11c717e34dfbe5414 (diff) |
remove [Byte]String::EraseAllChars
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/htmlfly.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 4 |
5 files changed, 22 insertions, 14 deletions
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index b07e98f6d343..0830c1f8fd0f 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> +#include <comphelper/string.hxx> #include <svx/svxids.hrc> #include "hintids.hxx" #include <tools/string.hxx> @@ -1803,8 +1804,9 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL ) String aURL( rURL.Copy( 1 ) ); - String sCmp( aURL.Copy( bEncoded ? nPos+2 : nPos ) ); // nPos-1+1/3 (-1 wg. Erase) - sCmp.EraseAllChars(); + // nPos-1+1/3 (-1 wg. Erase) + String sCmp(comphelper::string::remove(aURL.Copy(bEncoded ? nPos+2 : nPos), + ' ')); if( !sCmp.Len() ) return; diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 7fc91799d7a5..7f234e8fd577 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -31,6 +31,7 @@ #include <hintids.hxx> +#include <comphelper/string.hxx> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> @@ -1696,8 +1697,8 @@ void SwHTMLParser::InsertInput() // geloescht werden. if( !bKeepCRLFInValue ) { - sText.EraseAllChars( _CR ); - sText.EraseAllChars( _LF ); + sText = comphelper::string::remove(sText, _CR); + sText = comphelper::string::remove(sText, _LF); } const uno::Reference< XMultiServiceFactory > & rServiceFactory = diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 59759eced76b..7e6c1ff109fe 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -30,6 +30,7 @@ #include "precompiled_sw.hxx" #include "hintids.hxx" +#include <comphelper/string.hxx> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <svx/svxids.hrc> @@ -1134,8 +1135,7 @@ ANCHOR_SETEVENT: xub_StrLen nPos = sDecoded.SearchBackward( cMarkSeperator ); if( STRING_NOTFOUND != nPos ) { - String sCmp( sDecoded.Copy( nPos+1 ) ); - sCmp.EraseAllChars(); + String sCmp(comphelper::string::remove(sDecoded.Copy(nPos+1), ' ')); if( sCmp.Len() ) { sCmp.ToLowerAscii(); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 29a4da1f0c32..f22418d27bc1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -29,10 +29,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/i18n/ScriptType.hpp> +#include <comphelper/string.hxx> #include <sfx2/sfx.hrc> #include <svx/svxids.hrc> #if OSL_DEBUG_LEVEL > 1 @@ -394,14 +394,19 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, if( sJmpMark.Len() ) { eJumpTo = JUMPTO_MARK; - String sCmp; xub_StrLen nLastPos, nPos = 0; while( STRING_NOTFOUND != ( nLastPos = sJmpMark.Search( cMarkSeperator, nPos + 1 )) ) nPos = nLastPos; - if( nPos && ( sCmp = sJmpMark.Copy( nPos + 1 ) ). - EraseAllChars().Len() ) + String sCmp; + if (nPos) + { + sCmp = comphelper::string::remove( + sJmpMark.Copy(nPos + 1), ' '); + } + + if( sCmp.Len() ) { sCmp.ToLowerAscii(); if( sCmp.EqualsAscii( pMarkToRegion ) ) @@ -5346,8 +5351,8 @@ void SwHTMLParser::ParseMoreMetaOptions() aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_script_type ) ) return; - aContent.EraseAllChars( _CR ); - aContent.EraseAllChars( _LF ); + aContent = comphelper::string::remove(aContent, _CR); + aContent = comphelper::string::remove(aContent, _LF); if( aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_sdendnote ) ) { diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index d4d9f4e84d57..cfb651ac4507 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -32,6 +32,7 @@ #include <stdlib.h> #include <hintids.hxx> +#include <comphelper/string.hxx> #include <svl/urihelper.hxx> #include <rtl/tencinfo.h> #include <vcl/wrkwin.hxx> @@ -1092,8 +1093,7 @@ void SwHTMLWriter::OutHyperlinkHRefValue( const String& rURL ) xub_StrLen nPos = sURL.SearchBackward( cMarkSeperator ); if( STRING_NOTFOUND != nPos ) { - String sCmp( sURL.Copy( nPos+1 ) ); - sCmp.EraseAllChars(); + String sCmp(comphelper::string::remove(sURL.Copy(nPos+1), ' ')); if( sCmp.Len() ) { sCmp.ToLowerAscii(); |