diff options
Diffstat (limited to 'sw/qa/core/layout/tabfrm.cxx')
-rw-r--r-- | sw/qa/core/layout/tabfrm.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
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: */ |