diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
commit | 91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch) | |
tree | 7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /sw/qa/core/layout | |
parent | Releasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff) | |
download | libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip |
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/qa/core/layout')
-rw-r--r-- | sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx | bin | 0 -> 28111 bytes | |||
-rw-r--r-- | sw/qa/core/layout/tabfrm.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx b/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx Binary files differnew file mode 100644 index 0000000000..d6950a6c8e --- /dev/null +++ b/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx diff --git a/sw/qa/core/layout/tabfrm.cxx b/sw/qa/core/layout/tabfrm.cxx index 61b1a25109..e0d099c771 100644 --- a/sw/qa/core/layout/tabfrm.cxx +++ b/sw/qa/core/layout/tabfrm.cxx @@ -221,6 +221,20 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineTableThenSplitFly) // large positive one. CPPUNIT_ASSERT_LESS(static_cast<SwTwips>(0), nInlineLeft); } + +CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWrappedByTableNested) +{ + // Given a document with 3 tables, one inline toplevel and two inner ones (one inline, one + // floating): + // When laying out that document: + // Without the accompanying fix in place, this test would have failed here with a layout loop. + createSwDoc("floattable-wrapped-by-table-nested.docx"); + + // Than make sure we have 3 tables, but only one of them is floating: + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDoc->GetTableFrameFormats()->GetFormatCount()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetSpzFrameFormats()->GetFormatCount()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |