summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-03-21 09:20:14 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-03-21 12:29:15 +0000
commit3911b23c89da02eca92a0069bf1035155b7fddae (patch)
tree3f20d3e28d1fe0ff64848e0a17b04d8213828aff
parent53946b0698d63849266f465c16386dd8e9319f19 (diff)
sw floattable, CppunitTest_sw_ooxmlexport9: assert can-split in testTdf109063
It should not be a problem if the table is in a frame, what matters is that the frame is marked to split. Change-Id: Ib289691dcdf78de494518a9afeac3ede9045ec1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149195 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index da430214d75f..c821953f1160 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -123,10 +123,22 @@ DECLARE_SW_ROUNDTRIP_TEST(testBadDocm, "bad.docm", nullptr, DocmTest)
CPPUNIT_ASSERT_EQUAL(OUString("MS Word 2007 XML VBA"), pTextDoc->GetDocShell()->GetMedium()->GetFilter()->GetName());
}
-DECLARE_OOXMLEXPORT_TEST(testTdf109063, "tdf109063.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf109063)
{
- // This was 1, near-page-width table was imported as a TextFrame.
- CPPUNIT_ASSERT_EQUAL(0, getShapes());
+ SwModelTestBase::FlySplitGuard aGuard;
+ auto verify = [this]() {
+ // A near-page-width 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("tdf109063.docx");
+ verify();
+ reload(mpFilter, "tdf109063.docx");
+ verify();
}
CPPUNIT_TEST_FIXTURE(DocmTest, testTdf108269)