diff options
author | László Németh <nemeth@numbertext.org> | 2020-04-06 12:02:10 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-04-07 14:24:45 +0200 |
commit | f1c7aa5267a8045892890954df3c269a3abaab99 (patch) | |
tree | 8f393ae4a94be0103f7c45faa3d5fa5825c88622 /sw | |
parent | 6a6c6b9242b699b993acb2eeead609cb4faa862d (diff) |
tdf#131819 DOCX import: fix fixed size nested table
Auto width nested table with fixed width cells
is imported as fixed width table to keep the
original cell widths, which define the width of
the table, too.
Partial revert of commit bed818c5d5e92a0b189f25e18495fc205d949128
(tdf#104876 writerfilter: m_bTableSizeTypeInserted = false here).
Change-Id: If58c58a792853e1084ff1d8f9bf6ef74a593b1bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91764
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 7 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index f19a95342714..1a59b2f8f920 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -371,11 +371,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx") DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73389,"fdo73389.docx") { // The width of the inner table was too large. The first fix still converted - // the "auto" table width to a fixed one. The recent fix uses variable width. + // the "auto" table width to a fixed one. The second fix used variable width. + // The recent fix uses fixed width again, according to the fixed width cells. xmlDocPtr pXmlDoc = parseExport(); - assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","type","pct"); - assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","w","5000"); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","type","dxa"); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW","w","1611"); } DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf59274, "tdf59274.docx") diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 511b8f0ff890..3eac4838f146 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -226,6 +226,15 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testNumberedList,"NumberedList.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:numPr/w:numId","val", "0"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131819, "NumberedList.docx") +{ + // keep width of fixed size cells in the nested table + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + // These were 4030 and 4249. + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tblGrid/w:gridCol[1]", "w", "3841"); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tblGrid/w:gridCol[2]", "w", "4049"); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76597, "fdo76597.docx") { // check XML |