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

Caolán McNamara caolanm at redhat.com
Fri Jul 22 09:57:31 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 99833c2d6c9882bfad17e3e7fb659f5a81184a3f
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
    
    Change-Id: Idfcde46959e5693d200a91a619e7196f00f40ca0

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 d59b9ad..640f7b7 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>
@@ -608,6 +609,12 @@ DECLARE_WW8IMPORT_TEST(testTdf95576, "tdf95576.doc")
     }
 }
 
+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 694ff1a..387eab5 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2159,11 +2159,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