diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf125360.pptx | bin | 0 -> 15379 bytes | |||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf125360_1.pptx | bin | 0 -> 15480 bytes | |||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf125360_2.pptx | bin | 0 -> 15213 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 76 |
4 files changed, 76 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf125360.pptx b/sd/qa/unit/data/pptx/tdf125360.pptx Binary files differnew file mode 100644 index 000000000000..c1a3045bc17b --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf125360.pptx diff --git a/sd/qa/unit/data/pptx/tdf125360_1.pptx b/sd/qa/unit/data/pptx/tdf125360_1.pptx Binary files differnew file mode 100644 index 000000000000..cfc5798369db --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf125360_1.pptx diff --git a/sd/qa/unit/data/pptx/tdf125360_2.pptx b/sd/qa/unit/data/pptx/tdf125360_2.pptx Binary files differnew file mode 100644 index 000000000000..4f6b16455f71 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf125360_2.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 3fd98f4b99bb..bc987a018af2 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -202,6 +202,9 @@ public: void testSmartArtPreserve(); void testTdf125346(); void testTdf125346_2(); + void testTdf125360(); + void testTdf125360_1(); + void testTdf125360_2(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -286,6 +289,9 @@ public: CPPUNIT_TEST(testSmartArtPreserve); CPPUNIT_TEST(testTdf125346); CPPUNIT_TEST(testTdf125346_2); + CPPUNIT_TEST(testTdf125360); + CPPUNIT_TEST(testTdf125360_1); + CPPUNIT_TEST(testTdf125360_2); CPPUNIT_TEST_SUITE_END(); @@ -2242,6 +2248,76 @@ void SdOOXMLExportTest2::testTdf125346_2() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf125360() +{ + // Check whether the changed fill transparency is exported correctly. + // Color is defined by shape style + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360.pptx"), PPTX); + + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + + xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23))); + + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + xShape.set( getShapeFromPage( 0, 0, xDocShRef ) ); + + sal_Int32 nTransparence = 0; + xShape->getPropertyValue("FillTransparence") >>= nTransparence; + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence); + + xDocShRef->DoClose(); +} + +void SdOOXMLExportTest2::testTdf125360_1() +{ + // Check whether the changed fill transparency is exported correctly. + // Color is defined by color scheme + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360_1.pptx"), PPTX); + + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + + xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23))); + + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + xShape.set( getShapeFromPage( 0, 0, xDocShRef ) ); + + sal_Int32 nTransparence = 0; + xShape->getPropertyValue("FillTransparence") >>= nTransparence; + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence); + + xDocShRef->DoClose(); +} + +void SdOOXMLExportTest2::testTdf125360_2() +{ + // Check whether the changed fill transparency is exported correctly. + // Color is defined by color scheme with a transparency + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf125360_2.pptx"), PPTX); + + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + + sal_Int32 nTransparence = 0; + xShape->getPropertyValue("FillTransparence") >>= nTransparence; + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(82), nTransparence); + + xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23))); + + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + xShape.set( getShapeFromPage( 0, 0, xDocShRef ) ); + + nTransparence = 0; + xShape->getPropertyValue("FillTransparence") >>= nTransparence; + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nTransparence); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); |