sw/qa/extras/ww8export/data/tdf106541_cancelOutline.doc |binary sw/qa/extras/ww8export/ww8export3.cxx | 11 +++++++++++ 2 files changed, 11 insertions(+)
New commits: commit 75213d163b53e7002404c26fcd9cd63776a53eae Author: Justin Luth <justin_l...@sil.org> AuthorDate: Thu Apr 22 11:38:37 2021 +0200 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Thu Apr 22 14:01:21 2021 +0200 tdf#106541 doc import numbering: pre-emptive inheritance unit test Inheritance is missing in doc import of numbering, which of course causes all kinds of problems in the numbering. But make sure that direct and indirect inheritance will be cancelled when numbering is set to none. The cancelling seems to be set by sprmPIlfo == 0, or a negative number (and not by setting sprmPIlvl == 9). Change-Id: I3c0a51f2c5c8612b3a59d1b907dfe59097e85cc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114473 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ww8export/data/tdf106541_cancelOutline.doc b/sw/qa/extras/ww8export/data/tdf106541_cancelOutline.doc new file mode 100644 index 000000000000..6b3f016f3a4d Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf106541_cancelOutline.doc differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index f5ae1ced9481..4d982dbdb982 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -752,6 +752,17 @@ DECLARE_WW8EXPORT_TEST(testTdf94326_notOutlineNumbering, "tdf94326_notOutlineNum CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString")); } +DECLARE_WW8EXPORT_TEST(testTdf106541_cancelOutline, "tdf106541_cancelOutline.doc") +{ + // The ability to cancel numbering must not be lost. + uno::Reference<beans::XPropertySet> xPara(getParagraph(1, "Cancelled by style"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); + xPara.set(getParagraph(2, "Cancelled by inherited style"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); + xPara.set(getParagraph(4, "Cancelled by direct paragraph formatting"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString")); +} + DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc") { CPPUNIT_ASSERT_EQUAL(1, getPages()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits