[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 22 14:56:11 UTC 2020


 sw/qa/extras/ww8export/data/tdf136620.odt |binary
 sw/qa/extras/ww8export/ww8export.cxx      |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit 456bc04c9879f8ca191bd633f7341241c3cea317
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Sep 22 14:53:29 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 22 16:55:28 2020 +0200

    tdf#136620: sw_ww8export: Add unittest
    
    Change-Id: Ib1d4512b4ac73976192e6f41362aba3e1e185629
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103168
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ww8export/data/tdf136620.odt b/sw/qa/extras/ww8export/data/tdf136620.odt
new file mode 100644
index 000000000000..bb8536ec946a
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf136620.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 68c464bc8759..e750b15f2a94 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -896,6 +896,23 @@ DECLARE_WW8EXPORT_TEST(testFdo45724, "fdo45724.odt")
     CPPUNIT_ASSERT_EQUAL(OUString("xxx"), xComponent->getCurrentValue().get<OUString>());
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf136620, "tdf136620.odt")
+{
+    CPPUNIT_ASSERT_EQUAL(1, getShapes());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    uno::Reference<drawing::XShape> xShape = getShape(1);
+
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(5636), xShape->getPosition().X);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1826), xShape->getPosition().Y);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(6630), xShape->getSize().Height);
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 5853
+    // - Actual  : 850
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(5853), xShape->getSize().Width);
+}
+
 DECLARE_WW8EXPORT_TEST(testFdo46020, "fdo46020.odt")
 {
     CPPUNIT_ASSERT_EQUAL(1, getPages());


More information about the Libreoffice-commits mailing list