[Libreoffice-commits] .: 2 commits - libmspub/makefile.mk ooo.lst.in writerperfect/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 21 03:25:09 PDT 2012


 libmspub/makefile.mk                            |    4 +--
 ooo.lst.in                                      |    2 -
 writerperfect/source/filter/DocumentHandler.cxx |   31 ++++++++++++++++++++----
 3 files changed, 30 insertions(+), 7 deletions(-)

New commits:
commit 6a92b406b03e8bbce27fe314b6229644b9fc8b0e
Author: Brennan Vincent <brennanv at email.arizona.edu>
Date:   Fri Aug 17 18:06:09 2012 -0700

    Fix writerperfect ignoring newlines.
    
    Change-Id: Ib737a7d0ba833bcdc1e284890c62c9cf187d6b61

diff --git a/writerperfect/source/filter/DocumentHandler.cxx b/writerperfect/source/filter/DocumentHandler.cxx
index 8336c07..e1f58b2 100644
--- a/writerperfect/source/filter/DocumentHandler.cxx
+++ b/writerperfect/source/filter/DocumentHandler.cxx
@@ -74,12 +74,35 @@ void DocumentHandler::endElement(const char *psName)
 
 void DocumentHandler::characters(const WPXString &sCharacters)
 {
-    OUString sCharU16(sCharacters.cstr(), strlen(sCharacters.cstr()), RTL_TEXTENCODING_UTF8);
+    int lastNewline = -1;
+    int length = sCharacters.len();
+    for (int curr = 0; curr < length; ++curr)
+    {
+        if (sCharacters.cstr()[curr] == '\n')
+        {
+            if (curr > lastNewline + 1)
+            {
+                OUString sCharU16(sCharacters.cstr() + lastNewline + 1, curr - lastNewline - 1, RTL_TEXTENCODING_UTF8);
+#ifdef DEBUG_XML
+                WPXString sEscapedCharacters(sCharacters, true);
+                printf("%s", sEscapedCharacters.cstr());
+#endif
+                mxHandler->characters(sCharU16);
+            }
+            startElement("text:line-break", WPXPropertyList());
+            endElement("text:line-break");
+            lastNewline = curr;
+        }
+    }
+    if (lastNewline + 1 < length)
+    {
+        OUString sCharU16(sCharacters.cstr() + lastNewline + 1, length - lastNewline - 1, RTL_TEXTENCODING_UTF8);
 #ifdef DEBUG_XML
-    WPXString sEscapedCharacters(sCharacters, true);
-    printf("%s", sEscapedCharacters.cstr());
+        WPXString sEscapedCharacters(sCharacters, true);
+        printf("%s", sEscapedCharacters.cstr());
 #endif
-    mxHandler->characters(sCharU16);
+        mxHandler->characters(sCharU16);
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c3aa1cefdc6521d34a2a32c20bae1593e1edb5ba
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Aug 21 12:18:44 2012 +0200

    Uploading libmspub-0.0.3 release (support for MS Pub 97 and 98)
    
    Change-Id: I6ead205a272f0167157304748d7daf8ffc9211c9

diff --git a/libmspub/makefile.mk b/libmspub/makefile.mk
index 7d3b343..d894e20 100644
--- a/libmspub/makefile.mk
+++ b/libmspub/makefile.mk
@@ -59,8 +59,8 @@ INCPRE+=$(ZLIB_CFLAGS)
 INCPRE+=$(SOLARVER)$/$(INPATH)$/inc$/zlib
 .ENDIF
 
-TARFILE_NAME=libmspub-0.0.2
-TARFILE_MD5=8a1618d087e242bd79dcda73f291f319
+TARFILE_NAME=libmspub-0.0.3
+TARFILE_MD5=b2db54b6e96287ac995d7ed654ace4fc
 
 BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
 BUILD_DIR=src$/lib
diff --git a/ooo.lst.in b/ooo.lst.in
index cc88ab1..512d545 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -93,7 +93,7 @@ e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
 0d2dcdfbf28d6208751b33057f5361f0-libcmis-0.2.3.tar.gz
 ce5a1def34578b75959ac31210f031f6-libcdr-0.0.8.tar.bz2
 327348d67c979c88c2dec59a23a17d85-lcms2-2.3.tar.gz
-8a1618d087e242bd79dcda73f291f319-libmspub-0.0.2.tar.bz2
+b2db54b6e96287ac995d7ed654ace4fc-libmspub-0.0.3.tar.bz2
 fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
 @GOOGLE_DOCS_EXTENSION_PACK@


More information about the Libreoffice-commits mailing list