sw/qa/extras/ooxmlimport/data/tdf133448.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+)
New commits: commit 987de0769fc57ab66ae814e79aa2c4a522c81098 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Jun 1 13:21:41 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jun 1 15:49:38 2020 +0200 tdf#133448: sw: Add unittest Change-Id: I7089c56e5be0c0b8a8a23e0ebb1f64780c8d90ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95279 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/ooxmlimport/data/tdf133448.docx b/sw/qa/extras/ooxmlimport/data/tdf133448.docx new file mode 100644 index 000000000000..d9e3af06817b Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf133448.docx differ 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits