summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2022-03-10 12:04:20 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-03-16 04:42:59 +0100
commitf50a8f1d8852bfc143809dc5d45ef662d3557a61 (patch)
tree8595c28994bb907b44c5862527b6059ecec214fe /sw
parent31eca81bd03f012f0581480dd6f581a0185e3ff5 (diff)
tdf#146851: writerfilter: do not recreate list levels on override
AddLevel() can be called on w:lvl and on w:lvlOverride. But if we have level override and some extra level definition level is recreated and override information is lost. Change-Id: I6f1b9b50bdd3410b4ae2d403e760e4d6df5677d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131304 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146851_1.docxbin0 -> 12378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport17.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx
new file mode 100644
index 000000000000..b4456bf40074
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index 8b70d879f4b4..c6a795c0ab01 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -270,6 +270,17 @@ DECLARE_OOXMLEXPORT_TEST(testWPGBodyPr, "WPGbodyPr.docx")
xInnerShape->getPropertyValue("TextRightDistance").get<sal_Int32>());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf146851_1, "tdf146851_1.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara;
+
+ xPara.set(getParagraph(1, "qwerty"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(2, "asdfg"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1/"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx")
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");