diff options
-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(); } } |