diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 10:33:02 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-07-26 15:25:07 +0000 |
commit | dc436f0bc7e0cbfb27107a4e80eed5c60a2646da (patch) | |
tree | e42469e889400c3e4bdfcb592af828226ca4be63 | |
parent | 7409b12200121a5be4f6ae66d3bd575904de3770 (diff) |
Resolves: tdf#59896 ww6 plcf generation reversed check
regression since...
commit 69e040a59e1c6497b606da8a27e8f605edd041bb
Author: Caolán McNamara <caolanm@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@collabora.co.uk>
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/qa/extras/ww8import/data/tdf59896.doc | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/sw/qa/extras/ww8import/data/tdf59896.doc b/sw/qa/extras/ww8import/data/tdf59896.doc Binary files differnew file mode 100644 index 000000000000..a3c7242992f0 --- /dev/null +++ b/sw/qa/extras/ww8import/data/tdf59896.doc diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 1df4a6c5bbf8..2a6ee6e432b9 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 f19243d523b0..de58777eee3f 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(); } } |