summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-03-22 23:39:17 +0300
committerJan Holesovsky <kendy@collabora.com>2021-03-25 22:39:59 +0100
commiteea9c8069cbd1deeca5af6866090984f28892ac8 (patch)
treec119880d21f172d3fae87727d41b392979dbfa77 /sd
parent65990058f041c3f1d280a69d411eb4ceacf5a721 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113003 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf140714.pptxbin0 -> 28384 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx16
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
new file mode 100644
index 000000000000..6f5e98ec66f1
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf140714.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index f1d5f65c36ac..fdad324b216a 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -72,6 +72,7 @@ public:
void testTdf123557();
void testTdf113822();
void testTdf126761();
+ void testTdf140714();
CPPUNIT_TEST_SUITE(SdExportTest);
@@ -105,6 +106,7 @@ public:
CPPUNIT_TEST(testTdf123557);
CPPUNIT_TEST(testTdf113822);
CPPUNIT_TEST(testTdf126761);
+ CPPUNIT_TEST(testTdf140714);
CPPUNIT_TEST_SUITE_END();
@@ -1213,6 +1215,20 @@ void SdExportTest::testTdf126761()
xDocShRef->DoClose();
}
+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();