diff options
author | László Németh <nemeth@numbertext.org> | 2020-06-04 13:32:53 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-04 18:43:16 +0200 |
commit | da8ea444b004a0be36964ae9a778f73e752b2673 (patch) | |
tree | b70266a75d36d735a7d853544aa629937fe9051c /sw | |
parent | c39738eabfb9edde552832581bf85e717b00cc79 (diff) |
tdf#133455 DOCX import: fix table border regression
caused by commit 8ffc1299ebf83450e67cf2a89304859e2558cd27
(tdf#95033 DOCX import: apply tblPrEx table border).
Change-Id: Ief4da3bce3282b5dab1ce4dabb4e075efcc1abaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95504
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf133455.docx | bin | 0 -> 15724 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133455.docx b/sw/qa/extras/ooxmlexport/data/tdf133455.docx Binary files differnew file mode 100644 index 000000000000..e852976995e6 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf133455.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 6018c417ad47..690309b6827f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -726,6 +726,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95033, "tdf95033.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[9]/w:tc[2]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']", 0); } +DECLARE_OOXMLEXPORT_TEST(testTdf133455, "tdf133455.docx") +{ + xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + //Not disabled table cell borders + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:top[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']", 0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']", 0); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx") { // The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden. |