summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-05-06 18:41:46 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-06 23:01:59 +0200
commit03c1b327b7a504c304c9f95727f9d43310d08ec1 (patch)
treebc44d261907ce2f067fa7f875f801ad0a681ce44 /sw/qa
parent3daa966b6e256cabe9633386d67ce99387af2830 (diff)
tdf#122342 DOCX import: fix bottom auto margin in lists
at paragraph style based numbering. See also commit 1bf7f6a1a50ee9f24a3687240fe6ae390b905a6b (tdf#106690 DOCX import: fix automatic spacing before/after numbered para block). Change-Id: I532181019ca97a86475c9bb0a1eea1c836705bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93581 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122342.docxbin0 -> 12443 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122342.docx b/sw/qa/extras/ooxmlexport/data/tdf122342.docx
new file mode 100644
index 000000000000..0c7ecd67a547
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122342.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 37603bd407be..1baabd612269 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -180,6 +180,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106690Cell, "tdf106690-cell.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf122342, "tdf122342.docx")
+{
+ // These were 494, style based numbering rules with automatic spacing meant 0
+ // before/autospacing for all text nodes, even for ones at the start/end of
+ // a numbered text node block.
+ // TODO fix for ParaTopMargin, too.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(3), "ParaBottomMargin"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf129575_directBefore, "tdf129575-directBefore.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);