diff options
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc | bin | 0 -> 25088 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc b/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc Binary files differnew file mode 100644 index 000000000000..7f393612cab7 --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf75748_inheritChapterNumberingC.doc diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index abbf414dc01d..9ccf3ea19a31 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -822,6 +822,12 @@ DECLARE_WW8EXPORT_TEST(testTdf106541_inheritChapterNumberingB, "tdf106541_inheri CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString")); } +DECLARE_WW8EXPORT_TEST(testTdf75748_inheritChapterNumberingC, "tdf75748_inheritChapterNumberingC.doc") +{ + uno::Reference<beans::XPropertySet> xPara(getParagraph(5, "Inherited from Heading 3"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("II.B.1."), getProperty<OUString>(xPara, "ListLabelString")); +} + DECLARE_WW8EXPORT_TEST(testTdf104239_chapterNumberTortureTest, "tdf104239_chapterNumberTortureTest.doc") { // There is no point in identifying what the wrong values where in this test, diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 04b53252d49d..ede4943fdc10 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5981,9 +5981,6 @@ void SwWW8ImplReader::SetOutlineStyles() const SwNumRule* pWW8ListStyle = rSI.GetOutlineNumrule(); if (pWW8ListStyle != nullptr) { - if (aPreventUseAsChapterNumbering[pWW8ListStyle]) - continue; - std::map<const SwNumRule*, int>::iterator aCountIter = aWW8ListStyleCounts.find(pWW8ListStyle); if (aCountIter == aWW8ListStyleCounts.end()) @@ -6000,6 +5997,9 @@ void SwWW8ImplReader::SetOutlineStyles() int nCurrentMaxCount = 0; for (const auto& rEntry : aWW8ListStyleCounts) { + if (aPreventUseAsChapterNumbering[rEntry.first]) + continue; + if (rEntry.second > nCurrentMaxCount) { nCurrentMaxCount = rEntry.second; |