diff options
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf104239_sharedOutlineNumId.doc | bin | 0 -> 33280 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf104239_sharedOutlineNumId.doc b/sw/qa/extras/ww8export/data/tdf104239_sharedOutlineNumId.doc Binary files differnew file mode 100644 index 000000000000..c5deb4857f9c --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf104239_sharedOutlineNumId.doc diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 2ecde65c6bfb..77c090f1f22d 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -813,6 +813,14 @@ DECLARE_WW8EXPORT_TEST(testTdf106541_inheritOutlineNumbering, "tdf106541_inherit CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString")); } +DECLARE_WW8EXPORT_TEST(testTdf104239_sharedOutlineNumId, "tdf104239_sharedOutlineNumId.doc") +{ + // The list should show both level 1 and level 2 digits. It really ought to be "2.1." + uno::Reference<beans::XPropertySet> xPara(getParagraph(5, "Principes"), uno::UNO_QUERY); + // This was ".1." previously. + CPPUNIT_ASSERT(3 < getProperty<OUString>(xPara, "ListLabelString").getLength()); +} + DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc") { CPPUNIT_ASSERT_EQUAL(1, getPages()); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9721a3f8cf4d..d4c2ddc62cd6 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6004,9 +6004,10 @@ void SwWW8ImplReader::SetOutlineStyles() continue; } + const sal_uInt8 nLvl = pStyleInf->m_nListLevel == MAXLEVEL ? 0 : pStyleInf->m_nListLevel; if (m_pChosenWW8OutlineStyle != nullptr && pStyleInf->mnWW8OutlineLevel < WW8ListManager::nMaxLevel - && pStyleInf->mnWW8OutlineLevel == pStyleInf->m_nListLevel) + && pStyleInf->mnWW8OutlineLevel == nLvl) { // LibreOffice's Chapter Numbering only works when outlineLevel == listLevel const SwNumFormat& rRule |