diff options
author | Szabolcs Toth <szabolcs450@gmail.com> | 2019-12-30 10:09:34 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-01-07 16:55:38 +0100 |
commit | 0f4dd820ee433932d9d9237b676292d31c4ba913 (patch) | |
tree | 055dd81124805aabd699d48c4977f2a47b8ff6b0 /sw/qa | |
parent | 02b7de723e50474a27aa35661c2eaa886e5abfb1 (diff) |
tdf#129452 DOCX import: fix bottom border of merged column
Bottom border of a vertically merged column of a table was missing
if the inside borders were turned off and the merge included the
last cell of the column. This happened because the first cell
(topmost) in a set of vertically merged cells determines the borders
of the new merged cell, and the turned off inside borders were at
the bottom in this case.
Change-Id: I3d3defad18a1315117a554a36ad599eb46daffe9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85988
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx | bin | 0 -> 12728 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx Binary files differnew file mode 100644 index 000000000000..0e8ddd6d3833 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index 41aa0b7d1ac8..48257077f0c3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -1057,6 +1057,19 @@ DECLARE_OOXMLEXPORT_TEST(testBottomBorder, "tdf129450_BottomBorder.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0); } +DECLARE_OOXMLEXPORT_TEST(testBottomBorders, "tdf129452_BottomBorders.docx") +{ + // tdf#129452: Do not omit bottom borders when a column in a table is vertically merged and + // the inside borders are turned off. + + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[2]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |