sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
New commits: commit 28325983db2f7613b94bc70ef920ba13ebe6d817 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Mar 20 08:08:02 2023 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Mar 20 08:04:02 2023 +0000 sw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf8255 This asserted that the table is not floating, rather assert that the floating table is allowed to split. Change-Id: I1dec6027b0774a1fc5380e65c7221b3b9d289e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149133 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index c6c9a3cb4c8b..b4e3de2d74e9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -928,10 +928,22 @@ DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx") CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties")); } -DECLARE_OOXMLEXPORT_TEST(testTdf8255, "tdf8255.docx") -{ - // This was 1: a full-page-wide multi-page floating table was imported as a TextFrame. - CPPUNIT_ASSERT_EQUAL(0, getShapes()); +CPPUNIT_TEST_FIXTURE(Test, testTdf8255) +{ + SwModelTestBase::FlySplitGuard aGuard; + auto verify = [this]() { + // A full-page-wide multi-page floating table should be allowed to split: + uno::Reference<text::XTextFramesSupplier> xDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(xDocument->getTextFrames()->getByName("Frame1"), + uno::UNO_QUERY); + bool bIsSplitAllowed{}; + xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed; + CPPUNIT_ASSERT(bIsSplitAllowed); + }; + createSwDoc("tdf8255.docx"); + verify(); + reload(mpFilter, "tdf8255.docx"); + verify(); } DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")