summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-30 11:31:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-30 13:18:38 +0000
commitbbc94edb9a91b27910d43610db9994df10dd99e1 (patch)
tree99f81b7bc96dd93ae6c6e6a4f7a57cfda72cdfa4 /sw/source/filter/html
parent47e1e8494dde85414d28efafa99b33a62b59116d (diff)
refactor ConvertLineEnd
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlbas.cxx5
-rw-r--r--sw/source/filter/html/htmlfldw.cxx8
-rw-r--r--sw/source/filter/html/htmlform.cxx8
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx2
6 files changed, 13 insertions, 16 deletions
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index b3a664f04fd7..665da0339f82 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -95,7 +95,7 @@ void SwHTMLParser::EndScript()
}
bIgnoreRawData = sal_False;
- aScriptSource.ConvertLineEnd();
+ aScriptSource = convertLineEnd(aScriptSource, GetSystemLineEnd());
// Ausser StarBasic und unbenutzem JavaScript jedes Script oder den
// Modulnamen in einem Feld merken merken
@@ -254,8 +254,7 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam
if( !pDocSh )
return;
- String sEvent( rName );
- sEvent.ConvertLineEnd();
+ String sEvent(convertLineEnd(rName, GetSystemLineEnd()));
String sScriptType;
if( EXTENDED_STYPE == eScrType )
sScriptType = rScrType;
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 3cdc270f2797..fca7370f4b9f 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -475,8 +475,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
rComment.Copy( rComment.Len()-3, 3 ).EqualsAscii( "-->" )) )
{
// META-Tags direkt ausgeben
- String sComment( rComment );
- sComment.ConvertLineEnd( GetSystemLineEnd() );
+ String sComment(convertLineEnd(rComment, GetSystemLineEnd()));
// TODO: HTML-Tags are written without entitities, that for,
// characters not contained in the destination encoding are lost!
rtl::OString sTmp(rtl::OUStringToOString(sComment,
@@ -492,7 +491,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
sComment.EraseLeadingChars();
if( '<' == sComment.GetChar(0) )
{
- sComment.ConvertLineEnd( GetSystemLineEnd() );
+ sComment = convertLineEnd(sComment, GetSystemLineEnd());
// TODO: HTML-Tags are written without entitities, that for,
// characters not contained in the destination encoding are
// lost!
@@ -506,8 +505,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
if( !bWritten )
{
- String sComment( rComment );
- sComment.ConvertLineEnd( GetSystemLineEnd() );
+ String sComment(convertLineEnd(rComment, GetSystemLineEnd()));
rtl::OStringBuffer sOut;
// TODO: ???
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_comment)
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index d12ee914743c..d0afc811e096 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1389,7 +1389,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
String sEvent( rOption.GetString() );
if( sEvent.Len() )
{
- sEvent.ConvertLineEnd();
+ sEvent = convertLineEnd(sEvent, GetSystemLineEnd());
String aScriptType2;
if( EXTENDED_STYPE==eScriptType2 )
aScriptType2 = rDfltScriptType;
@@ -1621,7 +1621,7 @@ void SwHTMLParser::InsertInput()
String sEvent( rOption.GetString() );
if( sEvent.Len() )
{
- sEvent.ConvertLineEnd();
+ sEvent = convertLineEnd(sEvent, GetSystemLineEnd());
String aScriptType2;
if( EXTENDED_STYPE==eScriptType2 )
aScriptType2 = rDfltScriptType;
@@ -2088,7 +2088,7 @@ void SwHTMLParser::NewTextArea()
String sEvent( rOption.GetString() );
if( sEvent.Len() )
{
- sEvent.ConvertLineEnd();
+ sEvent = convertLineEnd(sEvent, GetSystemLineEnd());
if( EXTENDED_STYPE==eScriptType2 )
aScriptType = rDfltScriptType;
aMacroTbl.Insert( nEvent, new SvxMacro( sEvent, aScriptType,
@@ -2368,7 +2368,7 @@ void SwHTMLParser::NewSelect()
String sEvent( rOption.GetString() );
if( sEvent.Len() )
{
- sEvent.ConvertLineEnd();
+ sEvent = convertLineEnd(sEvent, GetSystemLineEnd());
if( EXTENDED_STYPE==eScriptType2 )
aScriptType = rDfltScriptType;
aMacroTbl.Insert( nEvent, new SvxMacro( sEvent, aScriptType,
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index f2638dc09ba2..46c69f0361e5 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1336,7 +1336,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
}
if( sVal.Len() )
{
- sVal.ConvertLineEnd( LINEEND_LF );
+ sVal = convertLineEnd(sVal, LINEEND_LF);
xub_StrLen nPos = 0;
while ( nPos != STRING_NOTFOUND )
{
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 8e302e31a40e..88fc7058ea03 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -424,7 +424,7 @@ IMAGE_SETEVENT:
String sTmp( rOption.GetString() );
if( sTmp.Len() )
{
- sTmp.ConvertLineEnd();
+ sTmp = convertLineEnd(sTmp, GetSystemLineEnd());
String sScriptType;
if( EXTENDED_STYPE == eScriptType2 )
sScriptType = sDfltScriptType;
@@ -1110,7 +1110,7 @@ ANCHOR_SETEVENT:
String sTmp( rOption.GetString() );
if( sTmp.Len() )
{
- sTmp.ConvertLineEnd();
+ sTmp = convertLineEnd(sTmp, GetSystemLineEnd());
String sScriptType;
if( EXTENDED_STYPE == eScriptType2 )
sScriptType = sDfltScriptType;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 887db2500490..d30066ee00b9 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1079,7 +1079,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_NOEMBED_OFF:
- aContents.ConvertLineEnd();
+ aContents = convertLineEnd(aContents, GetSystemLineEnd());
InsertComment( aContents, OOO_STRING_SVTOOLS_HTML_noembed );
aContents.Erase();
bCallNextToken = sal_False;