diff options
author | László Németh <nemeth@numbertext.org> | 2020-07-08 10:36:29 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-08 23:43:35 +0200 |
commit | 5483d4e10aad27889b961b9cb94d7ba6c86aed0b (patch) | |
tree | 69ca542c9928b6614c49044329c9740d05ae9f26 /sw | |
parent | 7ead920f7015bb8e7a4343b863333bb26187d9a3 (diff) |
tdf#134606 DOCX table import: fix gridBefore + nesting
Nested tables in a table row with gridBefore could
result of broken outer table, if the row doesn't contain
text before the nested table, resulting invalid
TextRange for insertion of gridBefore cells.
Regression from commit 70274f86cdc1c023ffdd0130c262c1479262d76b
(tdf#116194 DOCX import: fix missing tables with w:gridBefore)
Change-Id: I6bb3948b6522d8785a1ea0ccf8d7c7f3c2bde189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98320
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf134606.docx | bin | 0 -> 21603 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134606.docx b/sw/qa/extras/ooxmlexport/data/tdf134606.docx Binary files differnew file mode 100644 index 000000000000..c5b95cef3236 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf134606.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 13d6f679bbae..ebb3d8cf4e2b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -617,6 +617,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf116194, "tdf116194.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl", 2); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134606, "tdf134606.docx") +{ + // The problem was that the importer lost the nested table structure with w:gridBefore + xmlDocUniquePtr pXmlDoc = parseExport(); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl"); +} + DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx") { uno::Reference<drawing::XShape> image = getShape(1); |