| commit | a4d307c2a69e38f8d362d48d38eba1a2fc996cdd | [log] |
|---|---|---|
| author | Miklos Vajna <vmiklos@collabora.com> | Mon Nov 06 18:38:33 2023 +0100 |
| committer | Xisco Fauli <xiscofauli@libreoffice.org> | Mon Nov 20 20:25:58 2023 +0100 |
| tree | 8b5a3acd4f3d11025226b947d2632fbd13236e2b | |
| parent | 3baab25f4a58aaf24b1671cea050ed3291718091 [diff] |
tdf#99822 sw floattable: testcase for objects from different cells Fails with commit 435f1aadf7dd8087a8997924bedfccff0f496ba2 (tdf#99822 sw floattable: allow nomimal overlap of objects from different cells, 2023-10-27) reverted. Change-Id: Ic90a2aa254a47804dc50eba8fc1daf0131e65a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159007 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 0bf60e32c0ac2bf79fad6c29c39c6f6a3f9ce8e8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159587 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx b/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx new file mode 100644 index 0000000..50ec605 --- /dev/null +++ b/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx Binary files differ
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx index 4e0db43..9fea642 100644 --- a/sw/qa/core/objectpositioning/objectpositioning.cxx +++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -371,6 +371,23 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableFollowWrongPage) const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs(); CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size()); } CPPUNIT_TEST_FIXTURE(Test, testFloatingTableOverlapCell) { // Given a document with floating tables, overlapping, but anchored to different table cells: createSwDoc("floattable-overlap-cell.docx"); // When laying out the document: // Without the accompanying fix in place, this resulted in a layout loop. calcLayout(); // Then make sure the layout doesn't loop and results in a single page: SwDoc* pDoc = getSwDoc(); SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); auto pPage1 = pLayout->Lower()->DynCastPageFrame(); CPPUNIT_ASSERT(pPage1); CPPUNIT_ASSERT(!pPage1->GetNext()); } } CPPUNIT_PLUGIN_IMPLEMENT();