sw/qa/extras/ww8export/ww8export2.cxx |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit bd20de57e853e9785bb16fda43b15e97ebad5ce7
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Apr 19 08:16:34 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Apr 20 15:06:02 2023 +0200

    sw floattable: fix CppunitTest_sw_ww8export2's testTdf80635_marginRTL
    
    The rendering is unchanged, but now the fly is positioned, the inner
    table doesn't have an own orientation. Also, this way the exported
    result is correct, so assert that, too.
    
    Change-Id: I158a856fd1e3712749867e6882b36974c0dfc3e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150592
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit eb65f881da9c63636bc07eca735fd2bc01854fd6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150670
    Tested-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index 3570f68010a7..6cb1c43c748e 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -302,14 +302,18 @@ DECLARE_WW8EXPORT_TEST(testTdf80635_pageRightRTL, 
"tdf80635_pageRightRTL.doc")
     // If so, replace test with the table set to a greater preferred width so 
that the text shouldn't wrap
 }
 
-DECLARE_WW8EXPORT_TEST(testTdf80635_marginRTL, "tdf80635_marginRightRTL.doc")
+CPPUNIT_TEST_FIXTURE(Test, testTdf80635_marginRTL)
 {
-    // tdf#80635 - transfer the float orientation to the table.
-    uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
-    uno::Reference<container::XIndexAccess> 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
-    uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
-    if ( !isExported() )
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", 
text::HoriOrientation::RIGHT, getProperty<sal_Int16>(xTable, "HoriOrient"));
+    SwModelTestBase::FlySplitGuard aGuard;
+    auto verify = [this]() {
+        // tdf#80635 - assert the horizontal orientation of the table.
+        uno::Reference<drawing::XShape> xFly = getShape(1);
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", 
text::HoriOrientation::RIGHT, getProperty<sal_Int16>(xFly, "HoriOrient"));
+    };
+    createSwDoc("tdf80635_marginRightRTL.doc");
+    verify();
+    reload(mpFilter, "tdf80635_marginRightRTL.doc");
+    verify();
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf80635_marginLeft)

Reply via email to