diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-22 14:53:29 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-22 16:55:28 +0200 |
commit | 456bc04c9879f8ca191bd633f7341241c3cea317 (patch) | |
tree | a3ace5755de087f95f721a5f7d76969a5ee15fcf /sw/qa/extras | |
parent | 43003173fb457616c4396592c75afc653dc0ab0c (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.odt | bin | 0 -> 8915 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export.cxx | 17 |
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 Binary files differnew file mode 100644 index 000000000000..bb8536ec946a --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf136620.odt 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()); |