summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorSzabolcs Toth <szabolcs450@gmail.com>2020-01-24 10:40:01 +0100
committerLászló Németh <nemeth@numbertext.org>2020-02-13 09:37:51 +0100
commit125dd0be473d15681049814c3982f1ae2c66660f (patch)
treed013abc57512280e71c204880482cb59c143c084 /sw/qa
parentf4b6f6a8ae60bdec53512728d00853b73fa18500 (diff)
tdf#95495 DOCX import: fix inherited list level of custom styles
in DOCX export of MSO 2003, 2007 and 2010, where ilvl and outlinelvl settings are missing, based on the settings of the parent styles. Change-Id: I01d239db505d46a89d7f3b9118ef0b55697bc7fc CO-Author: Balázs Nádasdy (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87328 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95495.docxbin0 -> 102240 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95495.docx b/sw/qa/extras/ooxmlexport/data/tdf95495.docx
new file mode 100644
index 000000000000..21f534b11223
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95495.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 9001db35e92c..4293f1deb695 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1061,6 +1061,16 @@ DECLARE_OOXMLEXPORT_TEST(testFontTypes, "tdf120344_FontTypes.docx")
assertXPath(qXmlDocument, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:rPr/w:rFonts [@w:ascii='Arial Black']", 1);
}
+DECLARE_OOXMLEXPORT_TEST(testNumberingLevels, "tdf95495.docx")
+{
+ xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+ if (!pXmlDocument)
+ return;
+
+ // tdf#95495: set list level of the custom style based on the setting of the parent style
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:ilvl [@w:val = '1']", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */