summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-15 15:44:55 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-19 07:53:26 +0100
commit6100909c84550036932d031f4d2f652e158a1a0a (patch)
tree616b988fef95c40acd8c50e229ac6c23d76dbb8b /sw
parent4a19260d74c335fc6eb9216aacbf2d5bfbfc95aa (diff)
tdf#119054 DOCX: fix not table style based bottom margin
in table cells, ie. using paragraph styles with bottom margin setting or direct paragraph formatting of bottom margin. Both of them overwrite the table style based bottom margin. Change-Id: I527b16c24fe47df8412291089ff86fadd3f9430b Reviewed-on: https://gerrit.libreoffice.org/82800 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119054.docxbin0 -> 18842 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119054.docx b/sw/qa/extras/ooxmlexport/data/tdf119054.docx
new file mode 100644
index 000000000000..9c3657c24a97
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119054.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 9e0859f028e7..d460679b50ba 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -468,6 +468,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf128752, "tdf128752.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "after", "0");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf119054, "tdf119054.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport();
+ if (!pXmlDoc)
+ return;
+ // Don't overwrite before and after spacing of Heading2 by table style
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "before");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "after");
+ // Use table style based single line spacing instead of the docDefaults' 254
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "line", "240");
+}
+
DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
{
/*