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_luth@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 0000000..6b3f016
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf106541_cancelOutline.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index f5ae1ce..4d982db 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());