summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2022-08-23 09:20:01 -0400
committerJustin Luth <jluth@mail.com>2022-08-23 17:52:36 +0200
commit285f5306d75892963707b64a3782850c80d4a315 (patch)
treeb26e65356095b4354e83caae81f7ad6193609cc3 /sw
parent9fda7a0c938fdae3e57c7a8121a94459f2749dc2 (diff)
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>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ww8export/data/tdf150197_anlv2ListFormat.docbin0 -> 11264 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export4.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
3 files changed, 9 insertions, 0 deletions
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 000000000000..93d21046d607
--- /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 bc0d51ff529e..e6d1d27f53a4 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 ecb757c0b89d..d075cd1d8d93 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,