diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-01-28 09:37:58 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2021-01-28 15:46:14 +0100 |
commit | 62ee7fdce30d8e1deb6df80b73577ef6164a5a90 (patch) | |
tree | f27190c21c80865fa12a1efd592cc85daf53f86b /sd | |
parent | dbac52a2b56337c2086a18bf6cf3ebe6ac0c785e (diff) |
tdf#134210 Apply mirror property to custom cropped graphic.
Change-Id: I5bf2ba8fa432af8b6a560cc60c18bef799834fd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110039
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/mirrored-graphic.pptx | bin | 0 -> 173805 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/mirrored-graphic.pptx b/sd/qa/unit/data/pptx/mirrored-graphic.pptx Binary files differnew file mode 100644 index 000000000000..c7cd6a406947 --- /dev/null +++ b/sd/qa/unit/data/pptx/mirrored-graphic.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 59f029dacdfd..de361058bfb3 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -212,6 +212,7 @@ public: void testTdf128684(); void testShapeGlowEffectPPTXImpoer(); void testShapeBlurPPTXImport(); + void testMirroredGraphic(); bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); void testPatternImport(); @@ -340,6 +341,7 @@ public: CPPUNIT_TEST(testTdf49856); CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer); CPPUNIT_TEST(testShapeBlurPPTXImport); + CPPUNIT_TEST(testMirroredGraphic); CPPUNIT_TEST_SUITE_END(); }; @@ -3305,6 +3307,20 @@ void SdImportTest::testShapeBlurPPTXImport() } +void SdImportTest::testMirroredGraphic() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/mirrored-graphic.pptx"), PPTX); + uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW); + CPPUNIT_ASSERT(xShape.is()); + uno::Reference<graphic::XGraphic> xGraphic; + xShape->getPropertyValue("FillBitmap") >>= xGraphic; + CPPUNIT_ASSERT(xGraphic.is()); + Graphic aGraphic(xGraphic); + BitmapEx aBitmap(aGraphic.GetBitmapEx()); + CPPUNIT_ASSERT_EQUAL( Color(5196117), aBitmap.GetPixelColor( 0, 0 )); + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |