diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 10:33:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 10:57:05 +0100 |
commit | 99833c2d6c9882bfad17e3e7fb659f5a81184a3f (patch) | |
tree | 7476b30b3417e85179fcf37c0744b236f4571be9 /sw | |
parent | 672b7411637f92acd30622ec2aaee840cbbbd0a9 (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
Change-Id: Idfcde46959e5693d200a91a619e7196f00f40ca0
Diffstat (limited to 'sw')
-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 d59b9ad8cf1b..640f7b76741d 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 694ff1a2250c..387eab550530 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(); } } |