summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-03-20 08:08:02 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-03-20 13:03:49 +0000
commitd28148903b29daecd5e7f1353ceeb78bdf492290 (patch)
tree53d92abc096c6cfae6c9c2287c9e80eae87e7353
parenta5d555ddd76fc7a25658fb2977e2fe335ea080c1 (diff)
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. (cherry picked from commit 28325983db2f7613b94bc70ef920ba13ebe6d817) Change-Id: I1dec6027b0774a1fc5380e65c7221b3b9d289e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149146 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx20
1 files changed, 16 insertions, 4 deletions
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")