diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-01 13:21:41 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-01 15:49:38 +0200 |
commit | 987de0769fc57ab66ae814e79aa2c4a522c81098 (patch) | |
tree | fab1291ee0b8a84c8fad832df9307ff4538f5ebf /sw | |
parent | eafe6b5e382d514a3495b0bfabd0d2ba6f1d31d7 (diff) |
tdf#133448: sw: Add unittest
Change-Id: I7089c56e5be0c0b8a8a23e0ebb1f64780c8d90ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95279
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf133448.docx | bin | 0 -> 92038 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133448.docx b/sw/qa/extras/ooxmlimport/data/tdf133448.docx Binary files differnew file mode 100644 index 000000000000..d9e3af06817b --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf133448.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 343c08a94d89..141a06e144cc 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1345,6 +1345,19 @@ DECLARE_OOXMLIMPORT_TEST(testTdf101627, "tdf101627.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(466), getProperty<sal_Int32>(xFrame, "Height")); } +DECLARE_OOXMLIMPORT_TEST(testTdf133448, "tdf133448.docx") +{ + auto xGraphic = getProperty<uno::Reference<graphic::XGraphic>>(getShape(1), "Graphic"); + Graphic aGraphic(xGraphic); + uno::Reference<beans::XPropertySet> xGraphicDescriptor(xGraphic, uno::UNO_QUERY_THROW); + awt::Size aSizePixel; + CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("SizePixel") >>= aSizePixel); + + //Without the fix in place, the graphic's size is 0x0 + CPPUNIT_ASSERT_EQUAL(sal_Int32(837), aSizePixel.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32(598), aSizePixel.Height); +} + DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx") { uno::Reference<drawing::XShape> xShape = getShape(1); |