diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 1ca05650da55..abbf414dc01d 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -842,9 +842,9 @@ DECLARE_WW8EXPORT_TEST(testTdf104239_chapterNumberTortureTest, "tdf104239_chapte if (!mbExported) CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); xPara.set(getParagraph(11, "direct formatting - Body listLvl(9)."), uno::UNO_QUERY); - //CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); xPara.set(getParagraph(12, "direct numId, inherit listLvl."), uno::UNO_QUERY); - //CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii.a.1.I"), getProperty<OUString>(xPara, "ListLabelString")); + CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii.a.1.I"), getProperty<OUString>(xPara, "ListLabelString")); CPPUNIT_ASSERT_EQUAL(sal_Int16(4), getProperty<sal_Int16>(xPara, "NumberingLevel")); // Level 5 xPara.set(getParagraph(13, "Style numId0 cancels inherited numbering."), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index a7a246d4952f..7c33ea08829a 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1808,6 +1808,13 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nCurrentLFO, if (!pTextNd) return; + // WW8ListManager::nMaxLevel indicates body text, cancelling an inherited numbering. + if (nCurrentLFO < USHRT_MAX && nCurrentLevel == WW8ListManager::nMaxLevel) + { + pTextNd->SetAttr(SwNumRuleItem(OUString())); + return; + } + // Undefined listLevel is treated as the first level with valid numbering rule. // TODO:This doesn't allow for inheriting from a style(HOW?), but it matches previous behaviour. if (nCurrentLFO < USHRT_MAX && nCurrentLevel == MAXLEVEL) |