diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-15 16:29:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-15 17:03:21 +0200 |
commit | 1f6435d986fff97095c5619a908ea67906405e3c (patch) | |
tree | e5dda70ab609ee2e2823298cd736793b4a6383ab /sw | |
parent | 8ab1c6103d5cbc414531c78c3cbaa93bfd99149f (diff) |
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
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ww8import/data/list-nolevel.doc | bin | 0 -> 23040 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8import/data/list-nolevel.doc b/sw/qa/extras/ww8import/data/list-nolevel.doc Binary files differnew file mode 100755 index 000000000000..04e34996fe39 --- /dev/null +++ b/sw/qa/extras/ww8import/data/list-nolevel.doc diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 79fc47086089..345f0dc06b41 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 80195fad85e7..2888fa342aaf 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; |