sw/qa/extras/ww8import/data/list-nolevel.doc |binary sw/qa/extras/ww8import/ww8import.cxx | 10 ++++++++++ sw/source/filter/ww8/ww8par3.cxx | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit 1f6435d986fff97095c5619a908ea67906405e3c Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Oct 15 16:29:35 2013 +0200 WW8 import: fix handling of sprmPIlfo when sprmPIlvl is missing Commit 542a0d7260e4767d8aff839eb593e748a82ced48 (#100044# Cleanup for optimization defines->enums, 2002-08-14) added the problematic "else" without mentioning the reason, so I assume it's safe to just revert that part. Change-Id: Id90fbdfb1116be458a76c9653fec0633edc34fac diff --git a/sw/qa/extras/ww8import/data/list-nolevel.doc b/sw/qa/extras/ww8import/data/list-nolevel.doc new file mode 100755 index 0000000..04e3499 Binary files /dev/null and b/sw/qa/extras/ww8import/data/list-nolevel.doc differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 79fc470..345f0dc 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -36,6 +36,7 @@ public: void testPageBorder(); void testN823651(); void testFdo36868(); + void testListNolevel(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -64,6 +65,7 @@ void Test::run() {"page-border.doc", &Test::testPageBorder}, {"n823651.doc", &Test::testN823651}, {"fdo36868.doc", &Test::testFdo36868}, + {"list-nolevel.doc", &Test::testListNolevel}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -294,6 +296,14 @@ void Test::testFdo36868() CPPUNIT_ASSERT_EQUAL(OUString("2.1"), aText); } +void Test::testListNolevel() +{ + // Similar to fdo#36868, numbering portions had wrong values. + OUString aText = parseDump("/root/page/body/txt[1]/Special[@nType='POR_NUMBER']", "rText"); + // POR_NUMBER was completely missing. + CPPUNIT_ASSERT_EQUAL(OUString("1."), aText); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 80195fa..2888fa3 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2065,7 +2065,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData, { if (WW8ListManager::nMaxLevel == nListLevel) nListLevel = 0; - else if (WW8ListManager::nMaxLevel > nListLevel) + if (WW8ListManager::nMaxLevel > nListLevel) { RegisterNumFmt(nLFOPosition, nListLevel); nLFOPosition = USHRT_MAX; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits