sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc |binary sw/qa/extras/ww8export/ww8export3.cxx | 7 +++++++ sw/source/filter/ww8/ww8par.cxx | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit b8727666969156534c05b54a1addb54046969a50 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Wed Apr 21 11:40:20 2021 +0200 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Thu Jun 24 05:38:32 2021 +0200 tdf#123405 doc import: inherit from all Outline styles Good - an example document that proves that inheritance needs to happen with more than the first 9 items which contain the Heading styles that are most often associated with Chapter Numbering. Change-Id: I69ab1dd3fdab4d54695d9b321b0d2970509090a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114403 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc b/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc new file mode 100644 index 000000000000..2fe243fe800a Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf106541_inheritOutlineNumbering.doc differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index a09edd763fa1..2ecde65c6bfb 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -806,6 +806,13 @@ DECLARE_WW8EXPORT_TEST(testTdf106541_inheritChapterNumberingB, "tdf106541_inheri CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString")); } +DECLARE_WW8EXPORT_TEST(testTdf106541_inheritOutlineNumbering, "tdf106541_inheritOutlineNumbering.doc") +{ + // The level and numbering are inherited from Level2. + uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "This should be a sub-point."), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString")); +} + 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 9c9f06e62032..9721a3f8cf4d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5921,7 +5921,7 @@ void SwWW8ImplReader::SetOutlineStyles() // Copy inherited numbering info since LO drops inheritance after ChapterNumbering // and only applies listLevel via style with the selected ChapterNumbering LFO. bool bReRegister = false; - if (rSI.m_nBase && rSI.m_nBase < 10 && rSI.m_nBase < m_vColl.size() + if (rSI.m_nBase && rSI.m_nBase < m_vColl.size() && m_vColl[rSI.m_nBase].HasWW8OutlineLevel()) { if (rSI.m_nLFOIndex == USHRT_MAX) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits