diff options
author | László Németh <nemeth@numbertext.org> | 2020-07-17 14:39:45 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-20 09:36:26 +0200 |
commit | abea0d6647c7f1f7e76c73c26cb80e6a67dc5111 (patch) | |
tree | 50930be56b6aa00f21bf9efddb341392ddf247da /sw | |
parent | 697e8b69263c8dd9c518fbbb093f9a3776608257 (diff) |
tdf#134685 DOCX table import: fix gridBefore + cell width
Improve workaround to handle nested tables started at cell
start in a row with gridBefore. Omitted gridBefore cells
from commit 5483d4e10aad27889b961b9cb94d7ba6c86aed0b
(tdf#134606 DOCX table import: fix gridBefore + nesting)
resulted less cells in the row than defined by the grid,
and the different code path could lead to narrow cell width
with partially invisible nested table. Fix this by adding
gridBefore cell count to the cell span in the first cell.
Regression from commit 70274f86cdc1c023ffdd0130c262c1479262d76b
(tdf#116194 DOCX import: fix missing tables with w:gridBefore)
Change-Id: If332305d54ff2b34b258270a607fb31ff7380149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98973
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf134685.docx | bin | 0 -> 23322 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134685.docx b/sw/qa/extras/layout/data/tdf134685.docx Binary files differnew file mode 100644 index 000000000000..86b59fa982f3 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf134685.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index eee85f5b9b72..5d70eec259b2 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3121,6 +3121,16 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf127606) assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nHeight", "260"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134685) +{ + createDoc("tdf134685.docx"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + sal_Int32 nWidth + = getXPath(pXmlDoc, "/root/page/body/tab/row[6]/cell[1]/infos/bounds", "width").toInt32(); + // This was 2223: the content was only partially visible according to the lost cell width + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(14000), nWidth); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf109077) { createDoc("tdf109077.docx"); |