summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/mirrored-graphic.pptxbin0 -> 173805 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx16
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
new file mode 100644
index 000000000000..c7cd6a406947
--- /dev/null
+++ b/sd/qa/unit/data/pptx/mirrored-graphic.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index ee75e62a849b..eff937566383 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -216,6 +216,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();
@@ -344,6 +345,7 @@ public:
CPPUNIT_TEST(testTdf49856);
CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer);
CPPUNIT_TEST(testShapeBlurPPTXImport);
+ CPPUNIT_TEST(testMirroredGraphic);
CPPUNIT_TEST_SUITE_END();
};
@@ -3308,6 +3310,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();