summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzabolcs Toth <szabolcs450@gmail.com>2020-02-20 10:54:19 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2020-02-21 18:01:59 +0100
commit541f5b508e7d356803eac2bdce4278649ee76203 (patch)
tree7e5b76edd25254ac20e39cf546242dd5be9a1104 /sw
parentc6ced87ac2fbee8c9680916f0b09cc461f2e692f (diff)
tdf#130799 DOCX import: fix missing inside vertical borders
caused by incomplete handling of tables with 1-column rows with merged cells. Have to check the rows below current to see if they contain also one cell, therefore form a column, or more than one cell, in which case do not remove vertical borders. Regression from commit: 8a2eb40abbd52d960dd21308157186be0ca9dd3d (tdf#129442 DOCX import: fix right border of 1-column tables). Change-Id: If9ca7ccd42255e78c61b6271e19262ab5cc8e439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89081 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 111db716c23f9f8450eda58c13dd2423770fd15e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89134 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index c85b8a7f932f..71628cb81e93 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1071,6 +1071,17 @@ DECLARE_OOXMLEXPORT_TEST(testNumberingLevels, "tdf95495.docx")
assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:ilvl [@w:val = '1']", 1);
}
+DECLARE_OOXMLEXPORT_TEST(testVerticalBorders, "calendar3.docx")
+{
+ // tdf#130799: Inside vertical borders of a table should not be missing.
+
+ xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+ if (!pXmlDocument)
+ return;
+ // Left and right borders.
+ assertXPathChildren(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[3]/w:tcPr/w:tcBorders", 2);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */