diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-03-22 23:39:17 +0300 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-23 11:29:21 +0100 |
commit | ff751d42a4f672e25188ba90958e91d7869f395a (patch) | |
tree | ec055e31ae7eaa9ef15bb93f050b1f77f6c5f426 /sd | |
parent | 7c4a797148a68b342b17f2d34854d6bacf51cb85 (diff) |
tdf#140714 Import graphics cropped into custom geometry as custom shapes.
Change-Id: I2054d24ce41c9f0d6cc1675f461274067c3b2898
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112943
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit db39b68c3c85531744ddeb8105b3ddb9b2dab099)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112811
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf140714.pptx | bin | 0 -> 28384 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf140714.pptx b/sd/qa/unit/data/pptx/tdf140714.pptx Binary files differnew file mode 100644 index 000000000000..6f5e98ec66f1 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf140714.pptx diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 96022e2fc118..d8a214804643 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -79,6 +79,7 @@ public: void testShadowBlur(); void testRhbz1870501(); void testTdf128550(); + void testTdf140714(); CPPUNIT_TEST_SUITE(SdExportTest); @@ -118,6 +119,7 @@ public: CPPUNIT_TEST(testShadowBlur); CPPUNIT_TEST(testRhbz1870501); CPPUNIT_TEST(testTdf128550); + CPPUNIT_TEST(testTdf140714); CPPUNIT_TEST_SUITE_END(); @@ -1355,6 +1357,20 @@ void SdExportTest::testTdf128550() } +void SdExportTest::testTdf140714() +{ + //Without the fix in place, shape will be imported as GraphicObjectShape instead of CustomShape. + + auto xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf140714.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + uno::Reference<drawing::XShape> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString{"com.sun.star.drawing.CustomShape"}, xShape->getShapeType()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |