related tdf#150197 doc import: ANLV2 - always SetListFormat
Any time there is numbering, we expect to see an
optional sListFormat set.
This solves another case found by:
assert(false && "depricated format still exists
and is unhandled. Inform Vasily or Justin");
Change-Id: Ie88d6ea6feaaebaae8a0953668a2801f6f1a139a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138734
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sw/qa/extras/ww8export/data/tdf150197_anlv2ListFormat.doc b/sw/qa/extras/ww8export/data/tdf150197_anlv2ListFormat.doc
new file mode 100644
index 0000000..93d2104
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf150197_anlv2ListFormat.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx
index bc0d51f..e6d1d27 100644
--- a/sw/qa/extras/ww8export/ww8export4.cxx
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -56,6 +56,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf77964)
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShapeByName(u"Image2"), "AnchorType"));
}
DECLARE_WW8EXPORT_TEST(testTdf150197_anlv2ListFormat, "tdf150197_anlv2ListFormat.doc")
{
CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(getParagraph(2), "ListLabelString"));
CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(getParagraph(3), "ListLabelString"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Did you fix me? I should be 2.1", OUString("4.1"),
getProperty<OUString>(getParagraph(4), "ListLabelString"));
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index ecb757c..d075cd1 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -592,6 +592,8 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev
OUString sP = "." + rNum.GetSuffix();
rNum.SetListFormat("", sP, nSwLevel); // ordinal number
}
else
rNum.SetListFormat("", "", nSwLevel);
}
void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, int nLevel, WW8_ANLV const &rAV,