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-24 07:04:20 +0000
commit692db60d346ea93270a066cba44bb8bb0ac8f7cb (patch)
tree0f9f772ed8a8964ae13f201a5cc076f8ed88c217
parente1c334008552fc667715f81c9d82ecfb499c8098 (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. (cherry picked from commit 3911b23c89da02eca92a0069bf1035155b7fddae) Change-Id: Ib289691dcdf78de494518a9afeac3ede9045ec1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149286 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-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 f4e7d4581f49..b0b7d81a602a 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)