sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
New commits: commit 28b16870553f436b8dd0f74894896136057402a3 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Mar 21 13:30:49 2023 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Mar 21 13:50:20 2023 +0000 sw floattable, CppunitTest_sw_ooxmlimport2: assert the layout in testTdf114217 The point is that the table is multi-page, which is preserved. The detail that it's not in a fly is no longer true. Change-Id: I8fa61391eb26b434cd7e8b8adb5012c4909e5553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149209 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index f723fe320492..09de11d4c0bb 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -37,6 +37,10 @@ #include <docsh.hxx> #include <rootfrm.hxx> #include <frame.hxx> +#include <pagefrm.hxx> +#include <cntfrm.hxx> +#include <flyfrms.hxx> +#include <tabfrm.hxx> class Test : public SwModelTestBase { @@ -667,9 +671,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121804) CPPUNIT_TEST_FIXTURE(Test, testTdf114217) { + SwModelTestBase::FlySplitGuard aGuard; + // The floating table was not split between page 1 and page 2. createSwDoc("tdf114217.docx"); - // This was 1, multi-page table was imported as a floating one. - CPPUNIT_ASSERT_EQUAL(0, getShapes()); + SwDoc* pDoc = getSwDoc(); + SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower()); + CPPUNIT_ASSERT(pPage1); + const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size()); + auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]); + CPPUNIT_ASSERT(pPage1Fly); + auto pTab1 = dynamic_cast<SwTabFrame*>(pPage1Fly->GetLower()); + CPPUNIT_ASSERT(pTab1); + CPPUNIT_ASSERT(pTab1->HasFollow()); } CPPUNIT_TEST_FIXTURE(Test, testTdf119200)