[ooo-build-commit] .: 4 commits - filter/source writerperfect/prj writerperfect/source writerperfect/util

Fridrich Strba fridrich at kemper.freedesktop.org
Tue Sep 14 02:35:33 PDT 2010


 filter/source/config/fragments/fcfg_draw.mk          |    7 +
 filter/source/config/fragments/fcfg_writer.mk        |    2 
 writerperfect/prj/build.lst                          |    6 -
 writerperfect/prj/d.lst                              |    4 
 writerperfect/source/filter/DocumentCollector.cxx    |    2 
 writerperfect/source/filter/DocumentCollector.hxx    |    7 -
 writerperfect/source/filter/DocumentHandler.cxx      |   12 +-
 writerperfect/source/filter/SectionStyle.cxx         |    2 
 writerperfect/source/filter/TextRunStyle.cxx         |    7 +
 writerperfect/source/filter/makefile.mk              |   12 +-
 writerperfect/source/stream/WPXSvStream.cxx          |    2 
 writerperfect/source/stream/WPXSvStream.h            |    3 
 writerperfect/source/stream/makefile.mk              |    6 +
 writerperfect/source/wpdimp/WordPerfectCollector.cxx |    5 -
 writerperfect/source/wpdimp/WordPerfectCollector.hxx |    4 
 writerperfect/source/wpdimp/makefile.mk              |   12 +-
 writerperfect/util/makefile.mk                       |   80 ++++++++++++++++++-
 17 files changed, 137 insertions(+), 36 deletions(-)

New commits:
commit cd737ce7f536264b71b80c061b91765db560d345
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Sep 14 11:30:28 2010 +0200

    wpgimporter.diff: WPG Import filter

diff --git a/filter/source/config/fragments/fcfg_draw.mk b/filter/source/config/fragments/fcfg_draw.mk
index d6e6d9c..71d6b0b 100644
--- a/filter/source/config/fragments/fcfg_draw.mk
+++ b/filter/source/config/fragments/fcfg_draw.mk
@@ -7,7 +7,8 @@ T4_DRAW = \
     draw_StarOffice_XML_Draw_Template \
     pdf_Portable_Document_Format\
     draw8 \
-    draw8_template
+    draw8_template \
+    draw_WordPerfect_Graphics
 
 # -----------------------------------------------
 # count = 9
@@ -16,7 +17,9 @@ F4_DRAW = \
     draw_StarOffice_XML_Draw_Template \
     draw_pdf_Export \
     draw8 \
-    draw8_template
+    draw8_template \
+    WordPerfectGraphics
+
 
 # -----------------------------------------------
 # count = 4
diff --git a/writerperfect/prj/build.lst b/writerperfect/prj/build.lst
index d708c33..bf7a656 100644
--- a/writerperfect/prj/build.lst
+++ b/writerperfect/prj/build.lst
@@ -1,7 +1,8 @@
-wp      writerperfect : LIBWPS:libwps LIBWPD:libwpd sot comphelper xmloff svtools NULL
+wp      writerperfect : LIBWPG:libwpg LIBWPS:libwps LIBWPD:libwpd sot comphelper xmloff svtools NULL
 wp	writerperfect			usr1	-	all	wp_mkout NULL
 wp	writerperfect\source\stream	nmake	-	all	wp_stream NULL
 wp	writerperfect\source\filter	nmake	-	all	wp_filter NULL
 wp	writerperfect\source\wpdimp	nmake	-	all	wp_wpdimp NULL
 wp	writerperfect\source\wpsimp	nmake	-	all	wp_wpsimp NULL
-wp	writerperfect\util		nmake	-	all	wp_util wp_wpsimp wp_wpdimp wp_filter wp_stream NULL
+wp  writerperfect\source\wpgimp nmake   -   all wp_wpgimp NULL
+wp	writerperfect\util		nmake	-	all	wp_util wp_wpgimp wp_wpsimp wp_wpdimp wp_filter wp_stream NULL
diff --git a/writerperfect/source/filter/DocumentHandler.cxx b/writerperfect/source/filter/DocumentHandler.cxx
index 2af504c..17dcba3 100644
--- a/writerperfect/source/filter/DocumentHandler.cxx
+++ b/writerperfect/source/filter/DocumentHandler.cxx
@@ -61,7 +61,7 @@ void DocumentHandler::startElement(const char *psName, const WPXPropertyList &xP
     for (i.rewind(); i.next(); )
     {
                 // filter out libwpd elements
-                if (strlen(i.key()) > 6 && strncmp(i.key(), "libwpd", 6) != 0)
+                if (strncmp(i.key(), "libwpd", 6) != 0)
                         pAttrList->AddAttribute(OUString::createFromAscii(i.key()),
                                                 OUString::createFromAscii(i()->getStr().cstr()));
         }
diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk
index 56bdfb2..35daf5e 100644
--- a/writerperfect/util/makefile.mk
+++ b/writerperfect/util/makefile.mk
@@ -19,10 +19,17 @@ LIBWPS=$(LIBWPS_LIBS)
 LIBWPS=-lwpslib
 .ENDIF
 
+.IF "$(SYSTEM_LIBWPG)" == "YES"
+LIBWPG=$(LIBWPG_LIBS)
+.ELSE
+LIBWPG=-lwpglib
+.ENDIF
+
 .ELSE
 
 LIBWPD=$(LIBPRE) wpdlib.lib
 LIBWPS=$(LIBPRE) wpslib.lib
+LIBWPG=$(LIBPRE) wpglib.lib
 
 .ENDIF
 
@@ -79,4 +86,32 @@ SHL2LIBS = $(LIB2TARGET)
 SHL2VERSIONMAP = $(SOLARENV)/src/component.map
 DEF2NAME = $(SHL2TARGET)
 
+LIB3TARGET= $(SLB)$/wpgimport.lib
+LIB3FILES= \
+    $(SLB)$/stream.lib  \
+    $(SLB)$/filter.lib  \
+    $(SLB)$/wpgimp.lib
+SHL3LIBS=$(LIB3TARGET)
+SHL3STDLIBS+= \
+    $(SVLLIB)	\
+    $(SOTLIB) \
+    $(SO2LIB) \
+    $(SVTOOLLIB) \
+    $(UNOTOOLSLIB) \
+    $(TOOLSLIB) \
+    $(COMPHELPERLIB) \
+    $(UCBHELPERLIB) \
+    $(CPPUHELPERLIB) \
+    $(CPPULIB) \
+    $(SALLIB) \
+    $(XMLOFFLIB) \
+    $(LIBWPD) \
+    $(LIBWPG)
+
+SHL3TARGET = wpgimport$(DLLPOSTFIX)
+SHL3IMPLIB = i$(SHL3TARGET)
+SHL3LIBS = $(LIB3TARGET)
+SHL3VERSIONMAP = $(SOLARENV)/src/component.map
+DEF3NAME = $(SHL3TARGET)
+
 .INCLUDE :  target.mk
commit f409dd088f95b2e00c59dc5642769b95245ba7fc
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Sep 14 11:07:30 2010 +0200

    wpsimport-writerperfect.diff: WPS Import filter - core implementation.

diff --git a/writerperfect/prj/build.lst b/writerperfect/prj/build.lst
index 3bb3867..d708c33 100644
--- a/writerperfect/prj/build.lst
+++ b/writerperfect/prj/build.lst
@@ -1,6 +1,7 @@
-wp      writerperfect : LIBWPD:libwpd sot comphelper xmloff NULL
+wp      writerperfect : LIBWPS:libwps LIBWPD:libwpd sot comphelper xmloff svtools NULL
 wp	writerperfect			usr1	-	all	wp_mkout NULL
 wp	writerperfect\source\stream	nmake	-	all	wp_stream NULL
 wp	writerperfect\source\filter	nmake	-	all	wp_filter NULL
 wp	writerperfect\source\wpdimp	nmake	-	all	wp_wpdimp NULL
-wp	writerperfect\util		nmake	-	all	wp_util wp_wpdimp wp_filter wp_stream NULL
+wp	writerperfect\source\wpsimp	nmake	-	all	wp_wpsimp NULL
+wp	writerperfect\util		nmake	-	all	wp_util wp_wpsimp wp_wpdimp wp_filter wp_stream NULL
diff --git a/writerperfect/prj/d.lst b/writerperfect/prj/d.lst
index 5b5852c..fb11fa9 100644
--- a/writerperfect/prj/d.lst
+++ b/writerperfect/prj/d.lst
@@ -1,4 +1,4 @@
-..\%__SRC%\lib\libwpft*.so %_DEST%\lib%_EXT%
-..\%__SRC%\bin\wpft*.dll %_DEST%\bin%_EXT%
+..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%
 ..\%__SRC%\bin\wpftgo.dll %_DEST%\bin%_EXT%\wpftgo.dll
 ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 828e799..5baae93 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -58,7 +58,7 @@ _WriterDocumentState::_WriterDocumentState() :
 {
 }
 
-DocumentCollector::DocumentCollector(WPXInputStream *pInput, DocumentHandler *pHandler) :
+DocumentCollector::DocumentCollector(WPSInputStream *pInput, DocumentHandler *pHandler) :
         mpInput(pInput),
         mpHandler(pHandler),
     mbUsed(false),
diff --git a/writerperfect/source/filter/DocumentCollector.hxx b/writerperfect/source/filter/DocumentCollector.hxx
index 18ebcdb..a1e7fbc 100644
--- a/writerperfect/source/filter/DocumentCollector.hxx
+++ b/writerperfect/source/filter/DocumentCollector.hxx
@@ -35,6 +35,7 @@
 #if defined _MSC_VER
 #pragma warning( push, 1 )
 #endif
+#include <libwps/libwps.h>
 #include <libwpd/libwpd.h>
 #if defined _MSC_VER
 #pragma warning( pop )
@@ -82,7 +83,7 @@ struct ltstr
 class DocumentCollector : public WPXHLListenerImpl
 {
 public:
-    DocumentCollector(WPXInputStream *pInput, DocumentHandler *pHandler);
+    DocumentCollector(WPSInputStream *pInput, DocumentHandler *pHandler);
     virtual ~DocumentCollector();
     bool filter();
 
@@ -133,7 +134,7 @@ public:
     virtual void closeTableCell();
     virtual void insertCoveredTableCell(const WPXPropertyList &propList);
      virtual void closeTable();
-    virtual bool parseSourceDocument(WPXInputStream &input) = 0;
+    virtual bool parseSourceDocument(WPSInputStream &input) = 0;
 
 protected:
     void _resetDocumentState();
@@ -147,7 +148,7 @@ private:
     void _openListLevel(TagOpenElement *pListLevelOpenElement);
     void _closeListLevel(const char *szListType);
 
-        WPXInputStream *mpInput;
+        WPSInputStream *mpInput;
         DocumentHandler *mpHandler;
     bool mbUsed; // whether or not it has been before (you can only use me once!)
 
diff --git a/writerperfect/source/filter/DocumentHandler.cxx b/writerperfect/source/filter/DocumentHandler.cxx
index e0a11ab..2af504c 100644
--- a/writerperfect/source/filter/DocumentHandler.cxx
+++ b/writerperfect/source/filter/DocumentHandler.cxx
@@ -42,19 +42,19 @@ DocumentHandler::DocumentHandler(Reference < XDocumentHandler > &xHandler) :
 
 void DocumentHandler::startDocument() 
 {
-    WRITER_DEBUG_MSG(("DocumentHandler::startDocument"));
+    WRITER_DEBUG_MSG(("DocumentHandler::startDocument\n"));
     mxHandler->startDocument();
 }
 
 void DocumentHandler::endDocument()
 {
-    WRITER_DEBUG_MSG(("DocumentHandler::endDocument"));
+    WRITER_DEBUG_MSG(("DocumentHandler::endDocument\n"));
     mxHandler->endDocument();
 }
 
 void DocumentHandler::startElement(const char *psName, const WPXPropertyList &xPropList)
 {
-    WRITER_DEBUG_MSG(("DocumentHandler::startElement"));
+    WRITER_DEBUG_MSG(("DocumentHandler::startElement\n"));
         SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
     Reference < XAttributeList > xAttrList(pAttrList);
     WPXPropertyList::Iter i(xPropList);
@@ -71,13 +71,13 @@ void DocumentHandler::startElement(const char *psName, const WPXPropertyList &xP
 
 void DocumentHandler::endElement(const char *psName)
 {
-    WRITER_DEBUG_MSG(("DocumentHandler::endElement"));
+    WRITER_DEBUG_MSG(("DocumentHandler::endElement\n"));
         mxHandler->endElement(OUString::createFromAscii(psName));
 }
 
 void DocumentHandler::characters(const WPXString &sCharacters)
 {
-    WRITER_DEBUG_MSG(("DocumentHandler::characters"));
+    WRITER_DEBUG_MSG(("DocumentHandler::characters\n"));
         OUString sCharU16(sCharacters.cstr(), strlen(sCharacters.cstr()), RTL_TEXTENCODING_UTF8);
         mxHandler->characters(sCharU16);
 }
diff --git a/writerperfect/source/filter/SectionStyle.cxx b/writerperfect/source/filter/SectionStyle.cxx
index 7dae06c..de94e9c 100644
--- a/writerperfect/source/filter/SectionStyle.cxx
+++ b/writerperfect/source/filter/SectionStyle.cxx
@@ -33,7 +33,7 @@
 
 #ifdef _MSC_VER
 double rint(double x);
-#endif /* _WIN32 */
+#endif /* _MSC_VER */
 
 SectionStyle::SectionStyle(const WPXPropertyList &xPropList, 
                            const WPXPropertyListVector &xColumns, 
diff --git a/writerperfect/source/filter/makefile.mk b/writerperfect/source/filter/makefile.mk
index e535d2a..a092ce2 100644
--- a/writerperfect/source/filter/makefile.mk
+++ b/writerperfect/source/filter/makefile.mk
@@ -7,12 +7,16 @@ ENABLE_EXCEPTIONS=true
 .INCLUDE :  settings.mk
 
 .IF "$(SYSTEM_LIBWPD)" == "YES"
-INCPRE+=$(LIBWPD_CFLAGS) -I..
-.ELSE
-# broken but ... necessary, internal include shafted ...
-INCPRE+=-I..
+INCPRE+=$(LIBWPD_CFLAGS)
+.ENDIF
+
+.IF "$(SYSTEM_LIBWPS)" == "YES"
+INCPRE+=$(LIBWPS_CFLAGS)
 .ENDIF
 
+# broken but ... necessary, internal include shafted ...
+INCPRE+= -I..
+
 SLOFILES= \
     $(SLO)$/DocumentElement.obj		\
     $(SLO)$/FontStyle.obj			\
diff --git a/writerperfect/source/stream/WPXSvStream.cxx b/writerperfect/source/stream/WPXSvStream.cxx
index 3737e93..f7cfe35 100644
--- a/writerperfect/source/stream/WPXSvStream.cxx
+++ b/writerperfect/source/stream/WPXSvStream.cxx
@@ -9,7 +9,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;
 
 WPXSvInputStream::WPXSvInputStream( Reference< XInputStream > xStream ) :
-        WPXInputStream(true),
+        WPSInputStream(),
         mxChildStorage(),
         mxChildStream(),
         mxStream(xStream),
diff --git a/writerperfect/source/stream/WPXSvStream.h b/writerperfect/source/stream/WPXSvStream.h
index 099c5a7..f4f3b7e 100644
--- a/writerperfect/source/stream/WPXSvStream.h
+++ b/writerperfect/source/stream/WPXSvStream.h
@@ -12,12 +12,13 @@
 #if defined _MSC_VER
 #pragma warning( push, 1 )
 #endif
+#include <libwps/WPSStream.h>
 #include <libwpd/WPXStream.h>
 #if defined _MSC_VER
 #pragma warning( pop )
 #endif
 
-class WPXSvInputStream : public WPXInputStream
+class WPXSvInputStream : public WPSInputStream
 {
 public:
     WPXSvInputStream( ::com::sun::star::uno::Reference<
diff --git a/writerperfect/source/stream/makefile.mk b/writerperfect/source/stream/makefile.mk
index 7e684b7..97262e7 100644
--- a/writerperfect/source/stream/makefile.mk
+++ b/writerperfect/source/stream/makefile.mk
@@ -10,6 +10,12 @@ ENABLE_EXCEPTIONS=true
 INCPRE+=$(LIBWPD_CFLAGS)
 .ENDIF
 
+.IF "$(SYSTEM_LIBWPS)" == "YES"
+INCPRE+=$(LIBWPS_CFLAGS)
+.ELSE
+INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwps
+.ENDIF
+
 # broken but ... necessary, internal include shafted ...
 INCPRE+= -I..
 
diff --git a/writerperfect/source/wpdimp/WordPerfectCollector.cxx b/writerperfect/source/wpdimp/WordPerfectCollector.cxx
index 0bc10cc..9d32fde 100644
--- a/writerperfect/source/wpdimp/WordPerfectCollector.cxx
+++ b/writerperfect/source/wpdimp/WordPerfectCollector.cxx
@@ -30,11 +30,12 @@
 #pragma warning( push, 1 )
 #endif
 #include "WordPerfectCollector.hxx"
+#include <libwpd/WPDocument.h>
 #if defined _MSC_VER
 #pragma warning( pop )
 #endif
 
-WordPerfectCollector::WordPerfectCollector(WPXInputStream *pInput, DocumentHandler *pHandler) :
+WordPerfectCollector::WordPerfectCollector(WPSInputStream *pInput, DocumentHandler *pHandler) :
     DocumentCollector(pInput, pHandler)
 {
 }
@@ -43,7 +44,7 @@ WordPerfectCollector::~WordPerfectCollector()
 {
 }
 
-bool WordPerfectCollector::parseSourceDocument(WPXInputStream &input)
+bool WordPerfectCollector::parseSourceDocument(WPSInputStream &input)
 {
         WPDResult result = WPDocument::parse(&input, static_cast<WPXHLListenerImpl *>(this));
         if (result != WPD_OK)
diff --git a/writerperfect/source/wpdimp/WordPerfectCollector.hxx b/writerperfect/source/wpdimp/WordPerfectCollector.hxx
index 400a5ca..95ed7af 100644
--- a/writerperfect/source/wpdimp/WordPerfectCollector.hxx
+++ b/writerperfect/source/wpdimp/WordPerfectCollector.hxx
@@ -34,8 +34,8 @@
 class WordPerfectCollector : public DocumentCollector
 {
 public:
-    WordPerfectCollector(WPXInputStream *pInput, DocumentHandler *pHandler);
+    WordPerfectCollector(WPSInputStream *pInput, DocumentHandler *pHandler);
     virtual ~WordPerfectCollector();
-    bool parseSourceDocument(WPXInputStream &pInput);
+    bool parseSourceDocument(WPSInputStream &pInput);
 };
 #endif
diff --git a/writerperfect/source/wpdimp/makefile.mk b/writerperfect/source/wpdimp/makefile.mk
index bc2a3cd..745887e 100644
--- a/writerperfect/source/wpdimp/makefile.mk
+++ b/writerperfect/source/wpdimp/makefile.mk
@@ -7,12 +7,16 @@ ENABLE_EXCEPTIONS=true
 .INCLUDE :  settings.mk
 
 .IF "$(SYSTEM_LIBWPD)" == "YES"
-INCPRE+=$(LIBWPD_CFLAGS) -I..
-.ELSE
-# broken but ... necessary, internal include shafted ...
-INCPRE+=-I..
+INCPRE+=$(LIBWPD_CFLAGS)
+.ENDIF
+
+.IF "$(SYSTEM_LIBWPS)" == "YES"
+INCPRE+=$(LIBWPS_CFLAGS)
 .ENDIF
 
+# broken but ... necessary, internal include shafted ...
+INCPRE+= -I..
+
 SLOFILES= \
     $(SLO)$/WordPerfectCollector.obj  \
     $(SLO)$/WordPerfectImportFilter.obj  \
diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk
index dca29e0..56bdfb2 100644
--- a/writerperfect/util/makefile.mk
+++ b/writerperfect/util/makefile.mk
@@ -4,18 +4,26 @@ TARGET=writerperfect
 
 .INCLUDE :  settings.mk
 
-.IF "$(GUI)"=="UNX"
+
+.IF "$(GUI)"=="UNX" || "$(GUI)$(COM)"=="WNTGCC"
+
 .IF "$(SYSTEM_LIBWPD)" == "YES"
 LIBWPD=$(LIBWPD_LIBS)
 .ELSE
 LIBWPD=-lwpdlib
 .ENDIF
+
+.IF "$(SYSTEM_LIBWPS)" == "YES"
+LIBWPS=$(LIBWPS_LIBS)
 .ELSE
-.IF "$(GUI)$(COM)"=="WNTGCC"
-LIBWPD=-lwpdlib
-.ELSE
- LIBWPD=$(LIBPRE) wpdlib.lib
+LIBWPS=-lwpslib
 .ENDIF
+
+.ELSE
+
+LIBWPD=$(LIBPRE) wpdlib.lib
+LIBWPS=$(LIBPRE) wpslib.lib
+
 .ENDIF
 
 LIB1TARGET= $(SLB)$/wpft.lib
@@ -42,4 +50,33 @@ SHL1LIBS = $(LIB1TARGET)
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 DEF1NAME=$(SHL1TARGET)
 
+
+LIB2TARGET= $(SLB)$/msworks.lib
+LIB2FILES= \
+    $(SLB)$/stream.lib  \
+    $(SLB)$/filter.lib  \
+    $(SLB)$/wpsimp.lib
+SHL2LIBS=$(LIB2TARGET)
+SHL2STDLIBS+= \
+    $(SVLLIB)	\
+    $(SOTLIB) \
+    $(SO2LIB) \
+    $(SVTOOLLIB) \
+    $(UNOTOOLSLIB) \
+    $(TOOLSLIB) \
+    $(COMPHELPERLIB) \
+    $(UCBHELPERLIB) \
+    $(CPPUHELPERLIB) \
+    $(CPPULIB) \
+    $(SALLIB) \
+    $(XMLOFFLIB) \
+    $(LIBWPS) \
+    $(LIBWPD)
+
+SHL2TARGET = msworks$(DLLPOSTFIX)
+SHL2IMPLIB = i$(SHL2TARGET)
+SHL2LIBS = $(LIB2TARGET)
+SHL2VERSIONMAP = $(SOLARENV)/src/component.map
+DEF2NAME = $(SHL2TARGET)
+
 .INCLUDE :  target.mk
commit 103315662b3bc0701174bc66c047211549b8837b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Sep 14 11:03:41 2010 +0200

    wpsimport-filter.diff: WPS Import filter - filter module changes

diff --git a/filter/source/config/fragments/fcfg_writer.mk b/filter/source/config/fragments/fcfg_writer.mk
index 2207880..005a970 100644
--- a/filter/source/config/fragments/fcfg_writer.mk
+++ b/filter/source/config/fragments/fcfg_writer.mk
@@ -18,6 +18,7 @@ T4_WRITER = \
     writer_Rich_Text_Format \
     writer_StarOffice_XML_Writer \
     writer_WordPerfect_Document \
+    writer_MS_Works_Document \
     writer_T602_Document \
     writer_Text \
     writer_Text_encoded \
@@ -48,6 +49,7 @@ F4_WRITER = \
     Rich_Text_Format \
     StarOffice_XML__Writer_ \
     WordPerfect \
+    MS_Works \
     T602Document \
     Text \
     Text__encoded_ \
commit 36b8dc56ea589b2064ce70687e5f75c973a0385a
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Sep 14 10:36:11 2010 +0200

    writerperfect-nocondensedparagraphs.diff: no negative paragraph height.

diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index a11e4a7..26fa6cc 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -77,7 +77,12 @@ void ParagraphStyle::write(DocumentHandler *pHandler) const
         if (strcmp(k.key(), "fo:margin-top") == 0)
             propList.insert("fo:margin-top", k()->getStr());
         if (strcmp(k.key(), "fo:margin-bottom") == 0)
-            propList.insert("fo:margin-bottom", k()->getStr());
+        {
+            if (k()->getFloat() > 0.0f)
+                propList.insert("fo:margin-bottom", k()->getStr());
+            else
+                propList.insert("fo:margin-bottom", 0.0f);
+        }
         if (strcmp(k.key(), "fo:line-height") == 0)
             propList.insert("fo:line-height", k()->getStr());
         if (strcmp(k.key(), "fo:break-before") == 0) 


More information about the ooo-build-commit mailing list