[Libreoffice-commits] core.git: Branch 'libreoffice-5-1-5' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Tue Jul 26 15:25:32 UTC 2016


 sw/qa/extras/ww8import/data/tdf59896.doc |binary
 sw/qa/extras/ww8import/ww8import.cxx     |    7 +++++++
 sw/source/filter/ww8/ww8scan.cxx         |    6 ++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit dc436f0bc7e0cbfb27107a4e80eed5c60a2646da
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 22 10:33:02 2016 +0100

    Resolves: tdf#59896 ww6 plcf generation reversed check
    
    regression since...
    
    commit 69e040a59e1c6497b606da8a27e8f605edd041bb
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Sun Jul 17 00:19:00 2011 +0100
    
        check seeks, check available size, pointers to ref
    
    (cherry picked from commit 99833c2d6c9882bfad17e3e7fb659f5a81184a3f)
    
    Change-Id: Idfcde46959e5693d200a91a619e7196f00f40ca0
    Reviewed-on: https://gerrit.libreoffice.org/27431
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/extras/ww8import/data/tdf59896.doc b/sw/qa/extras/ww8import/data/tdf59896.doc
new file mode 100644
index 0000000..a3c7242
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf59896.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 1df4a6c..2a6ee6e 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -9,6 +9,7 @@
 
 #include <swmodeltestbase.hxx>
 
+#include <com/sun/star/awt/FontWeight.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
 #include <com/sun/star/graphic/XGraphic.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
@@ -553,6 +554,12 @@ DECLARE_WW8IMPORT_TEST(testTdf99120, "tdf99120.doc")
     CPPUNIT_ASSERT_EQUAL(OUString("Section 2, even."),  parseDump("/root/page[4]/header/txt/text()"));
 }
 
+DECLARE_WW8IMPORT_TEST(testTdf59896, "tdf59896.doc")
+{
+    // This was awt::FontWeight::NORMAL, i.e. the first run wasn't bold, when it should be bold
+    CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(1), 1), "CharWeight"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f19243d..de58777 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2156,11 +2156,13 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
             failure = true;
             // construct FC entries
             // first FC entry of each Fkp
-            if (checkSeek(rSt, ( nPN + i ) << 9 ))
-                continue;
+            if (!checkSeek(rSt, (nPN + i) << 9))
+                break;
+
             WW8_CP nFc(0);
             rSt.ReadInt32( nFc );
             pPLCF_PosArray[i] = nFc;
+
             failure = rSt.GetError();
         }
     }


More information about the Libreoffice-commits mailing list