sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 3911b23c89da02eca92a0069bf1035155b7fddae
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Mar 21 09:20:14 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Mar 21 12:29:15 2023 +0000

    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 <vmik...@collabora.com>
    Tested-by: Jenkins

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)

Reply via email to