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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/frmhtmlw.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index fda28524b0ec..107f8a9906be 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -54,12 +54,6 @@ static sal_Char const sHTML_SC_yes[] = "YES"; static sal_Char const sHTML_SC_no[] = "NO"; static sal_Char const sHTML_MIME_text_html[] = "text/html; charset="; -#ifdef _WIN32 -const sal_Char SfxFrameHTMLWriter::sNewLine[] = "\015\012"; -#else -const sal_Char SfxFrameHTMLWriter::sNewLine[] = "\012"; -#endif - void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm, const sal_Char *pIndent, const OUString& rName, @@ -67,7 +61,7 @@ void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm, rtl_TextEncoding eDestEnc, OUString *pNonConvertableChars ) { - rStrm << sNewLine; + rStrm << SAL_NEWLINE_STRING; if( pIndent ) rStrm << pIndent; @@ -102,7 +96,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL, } // Titel (auch wenn er leer ist) - rStrm << sNewLine; + rStrm << SAL_NEWLINE_STRING; if( pIndent ) rStrm << pIndent; HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title ); @@ -120,7 +114,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL, const OUString& rTarget = i_xDocProps->getDefaultTarget(); if( !rTarget.isEmpty() ) { - rStrm << sNewLine; + rStrm << SAL_NEWLINE_STRING; if( pIndent ) rStrm << pIndent; |