diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-04-28 08:28:22 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-04-28 09:24:01 +0200 |
commit | 1795d5183d5371a24e8dcb15f8671c78b2c94665 (patch) | |
tree | 180cb9cd53098ab1441013536bcb47aa7c78d586 /sw | |
parent | ea5c846fd5630acef26a3ee96d47c4a43fb5c24d (diff) |
sw floattable, crashtesting: fix PDF export of tdf114111-3.docx
Converting the bugdoc to PDF crashed Writer layout since commit
ce3308a926f036b87515b8cd97d2b197063dc77a (tdf#61594 sw floattable:
import floating tables as split flys by default, 2023-04-12).
The stripped down document has 3 tables: a toplevel, a middle and an
inner one. The middle one is floating. SwFrame::GetNextFlyLeaf() doesn't
support nested tables, so we move an inner table frame to a next page,
causing a frame to have the in-table flag, without a table frame parent,
leading to a crash.
Fix the problem by just disabling floating tables for nested tables for
now.
It can be enabled later, and not supporting inner floating tables was
the intent of 8818dd359fbf0f37e1b318de89ab2ea7d735f58 (sw floattable:
fix handling of nested non-floating tables at cell start, 2023-03-20)
anyway.
Change-Id: I75db01c6c0fdd803130fbb2a8f2f90c6180051ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151155
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 8f2cfae7e0ad..3e1bffa299e8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -512,9 +512,10 @@ DECLARE_OOXMLEXPORT_TEST(testTDF91260, "tdf91260.docx") DECLARE_OOXMLEXPORT_TEST(testFdo74357, "fdo74357.docx") { - // Floating table wasn't converted to a textframe. - // This was 0. - CPPUNIT_ASSERT_EQUAL(1, getShapes()); + // Normal outer table, floating inner table. + uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount()); // Bottom margin of the first paragraph was too large, causing a layout problem. // This was 494. |