[Libreoffice-commits] core.git: 3 commits - sw/source

Tor Lillqvist tml at collabora.com
Sat Oct 12 11:45:10 PDT 2013


 sw/source/filter/ascii/wrtasc.cxx  |    4 ++--
 sw/source/filter/html/htmlfly.cxx  |    8 --------
 sw/source/filter/html/wrthtml.cxx  |    6 +++---
 sw/source/filter/html/wrthtml.hxx  |    6 +-----
 sw/source/filter/ww8/rtfexport.cxx |    6 +++---
 sw/source/filter/ww8/rtfexport.hxx |    6 +-----
 6 files changed, 10 insertions(+), 26 deletions(-)

New commits:
commit e9c0819e60631efbb5057c60c64431e8a1946efd
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 21:40:17 2013 +0300

    Simplify, and check _WIN32 instead of UNX
    
    Change-Id: I89f975faf65da56bab68b093f32dccad80d502ad

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 76a7629..73e132d 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -69,10 +69,10 @@ using namespace ::com::sun::star;
 
 using sw::mark::IMark;
 
-#if defined(UNX)
-const sal_Char RtfExport::sNewLine = '\012';
-#else
+#ifdef _WIN32
 const sal_Char* const RtfExport::sNewLine = "\015\012";
+#else
+const sal_Char* const RtfExport::sNewLine = "\012";
 #endif
 
 // the default text encoding for the export, if it doesn't fit unicode will
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index fb08b9d..fe577db 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -144,11 +144,7 @@ public:
     /// Destructor.
     virtual ~RtfExport();
 
-#if defined(UNX)
-    static const sal_Char sNewLine; // \012 or \015
-#else
-    static const sal_Char* const sNewLine; // \015\012
-#endif
+    static const sal_Char* const sNewLine;
 
     rtl_TextEncoding eDefaultEncoding;
     rtl_TextEncoding eCurrentEncoding;
commit 4258b82f79b1e1c1a5d6428bf6650b2694a953fb
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 21:36:45 2013 +0300

    Simplify, and check _WIN32 instead of UNX
    
    Change-Id: Id13d51388ecee3bee706510c2f22182e9e1f2d28

diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 1b5871d..0004c9c 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -928,21 +928,13 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
 
         OString aIndMap, aIndArea;
         const sal_Char *pLF = 0, *pIndArea = 0, *pIndMap = 0;
-#if defined(UNX)
-        sal_Char aLF[2] = "\x00";
-#endif
 
         if( rHTMLWrt.bLFPossible )
         {
             rHTMLWrt.OutNewLine( sal_True );
             aIndMap = rHTMLWrt.GetIndentString();
             aIndArea = rHTMLWrt.GetIndentString(1);
-#if defined(UNX)
-            aLF[0]  = SwHTMLWriter::sNewLine;
-            pLF = aLF;
-#else
             pLF = SwHTMLWriter::sNewLine;
-#endif
             pIndArea = aIndArea.getStr();
             pIndMap = aIndMap.getStr();
         }
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index a2f8a68..c73eb04 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -80,10 +80,10 @@
 
 #define MAX_INDENT_LEVEL 20
 
-#if defined(UNX)
-const sal_Char SwHTMLWriter::sNewLine = '\012';
-#else
+#ifdef _WIN32
 const sal_Char SwHTMLWriter::sNewLine[] = "\015\012";
+#else
+const sal_Char SwHTMLWriter::sNewLine[] = "\012";
 #endif
 
 static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] =
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 66f368d..5fb71bb 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -283,11 +283,7 @@ protected:
     sal_uLong WriteStream();
 
 public:
-#if defined(UNX)
-    static const sal_Char sNewLine;     // nur \012 oder \015
-#else
-    static const sal_Char sNewLine[];   // \015\012
-#endif
+    static const sal_Char sNewLine[];
 
     std::vector<String> aImgMapNames;     // geschriebene Image Maps
     std::set<String> aImplicitMarks;// implizite Stprungmarken
commit 246dda00dd1bd75d909721a0f758667332484402
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 21:32:37 2013 +0300

    Test _WIN32 instead of WNT and UNX
    
    Change-Id: I5c48fb1363609fe6d051794351fa5aaab29979b9

diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index a7ee4f1..3b03c5b 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -55,7 +55,7 @@ SwASCWriter::SwASCWriter( const OUString& rFltNm )
                 break;
 
     case 'A':
-#if !defined(WNT)
+#ifndef _WIN32
                 aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 );
                 aNewOpts.SetParaFlags( LINEEND_CRLF );
 #endif
@@ -67,7 +67,7 @@ SwASCWriter::SwASCWriter( const OUString& rFltNm )
                 break;
 
     case 'X':
-#if !defined(UNX)
+#ifdef _WIN32
                 aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 );
                 aNewOpts.SetParaFlags( LINEEND_LF );
 #endif


More information about the Libreoffice-commits mailing list