diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-13 13:45:17 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-13 13:49:24 +0300 |
commit | 6954aad4e5c99ce193d3dd60a43f6d41d7c0a87f (patch) | |
tree | ffba0bee05b37a70311ae198281f420600e30127 /sc/source/filter/html | |
parent | 8ede32d15735b78e3528107bfbcfb69e3beb7439 (diff) |
Reduce copypasta: Introduce SAL_NEWLINE_STRING and use it
Contains the platform-dependent on-disk line separator ("\r\n" for Windows,
"\n" otherwise, and yes, I assume an ASCII-based world).
Use it instead of static constant char array fields, with ifdeffed
initialisations, in various classes here and there.
Change-Id: Ibea1f2cc1acfb8cc067c3892a41f73bf44f2c78a
Diffstat (limited to 'sc/source/filter/html')
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp2.cxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 9063b51c74af..e161e0d857db 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -116,12 +116,12 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = #define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag ) #define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false ) #define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc, &aNonConvertibleChars ) -#define OUT_LF() rStrm << ScExportBase::sNewLine << GetIndentStr() -#define TAG_ON_LF( tag ) (TAG_ON( tag ) << ScExportBase::sNewLine << GetIndentStr()) -#define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << ScExportBase::sNewLine << GetIndentStr()) +#define OUT_LF() rStrm << SAL_NEWLINE_STRING << GetIndentStr() +#define TAG_ON_LF( tag ) (TAG_ON( tag ) << SAL_NEWLINE_STRING << GetIndentStr()) +#define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << SAL_NEWLINE_STRING << GetIndentStr()) #define OUT_HR() TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule ) #define OUT_COMMENT( comment ) (rStrm << sMyBegComment, OUT_STR( comment ) \ - << sMyEndComment << ScExportBase::sNewLine \ + << sMyEndComment << SAL_NEWLINE_STRING \ << GetIndentStr()) #define OUT_SP_CSTR_ASS( s ) rStrm << ' ' << s << '=' @@ -317,7 +317,7 @@ Size ScHTMLExport::MMToPixel( const Size& rSize ) sal_uLong ScHTMLExport::Write() { rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype40 << '>' - << sNewLine << sNewLine; + << SAL_NEWLINE_STRING << SAL_NEWLINE_STRING; TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html ); WriteHeader(); OUT_LF(); diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index a5bce9c71e09..ad2e6b7a0901 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -233,7 +233,7 @@ void ScHTMLExport::WriteImage( OUString& rLinkName, const Graphic& rGrf, rLinkName ), eDestEnc ) << '\"'; if ( !rImgOptions.isEmpty() ) rStrm << rImgOptions.getStr(); - rStrm << '>' << sNewLine << GetIndentStr(); + rStrm << '>' << SAL_NEWLINE_STRING << GetIndentStr(); } } |