summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-12-04 20:47:04 +0100
committerLászló Németh <nemeth@numbertext.org>2020-12-07 12:57:46 +0100
commitf319d6b543c2367546bc80d138e56ed03731e265 (patch)
treed69c2b460d5c5760b1503c9d622ba04ef2dd1c55 /sw/qa
parentfbc909364c9c3964c1354169527e68446905c39b (diff)
tdf#138612 DOCX import: fix lost part of split table cell
by removing unnecessary rewriting of cell properties during import of w:tblPrEx. Regression from commit da8ea444b004a0be36964ae9a778f73e752b2673 (tdf#133455 DOCX import: fix table border regression) Change-Id: I93ce36991437644db439c8cf02e1a8503fbdfba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107239 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/tdf138612.docxbin0 -> 36179 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138612.docx b/sw/qa/extras/ooxmlexport/data/tdf138612.docx
new file mode 100644
index 000000000000..dd116044b56e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138612.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index de4b340a6142..95f60995f933 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -732,6 +732,23 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133455, "tdf133455.docx")
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(testTdf138612, "tdf138612.docx")
+{
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // Row 5 Col 1 - vertically merged cell
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[1]/w:tcPr/w:vMerge", "val", "restart");
+ // Row 5 Col 2 - split cell
+ // This was w:vMerge="restart"
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[2]/w:tcPr/w:vMerge", 0);
+
+ // Row 6 Col 1 - merged with cell in Row 5 Col 1
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[1]/w:tcPr/w:vMerge", "val", "continue");
+ // Row 6 Col 2 - split cell
+ // This was w:vMerge="continue" (merged with cell in Row 5 Col 2)
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0);
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
{
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.