summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-22 14:53:29 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-22 16:55:28 +0200
commit456bc04c9879f8ca191bd633f7341241c3cea317 (patch)
treea3ace5755de087f95f721a5f7d76969a5ee15fcf /sw/qa/extras
parent43003173fb457616c4396592c75afc653dc0ab0c (diff)
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@libreoffice.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ww8export/data/tdf136620.odtbin0 -> 8915 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx17
2 files changed, 17 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf136620.odt
Binary files 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());