diff --git a/bsc1124869.patch b/bsc1124869.patch index 528be78..1ebf86c 100644 --- a/bsc1124869.patch +++ b/bsc1124869.patch @@ -38,7 +38,7 @@ index b255116..a2fb6ee 100644 + } } rPropMap.setProperty(PROP_GraphicColorMode, eColorMode); - + diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a797adb..23065ec 100644 --- a/oox/source/export/drawingml.cxx @@ -49,7 +49,7 @@ index a797adb..23065ec 100644 sal_Int32 nContrast = 0; - sal_Int32 nTransparence = 0; + sal_Int16 nTransparence = 0; - + if (GetProperty(rXPropSet, "AdjustLuminance")) nBright = mAny.get(); if (GetProperty(rXPropSet, "AdjustContrast")) @@ -58,64 +58,6 @@ index a797adb..23065ec 100644 - nTransparence = mAny.get(); + if (GetProperty(rXPropSet, "Transparency")) + nTransparence = mAny.get(); - - - if (nBright || nContrast) -diff --git a/sd/qa/unit/data/odp/image_transparency.odp b/sd/qa/unit/data/odp/image_transparency.odp -new file mode 100644 -index 0000000..6d3f6c2 -Binary files /dev/null and b/sd/qa/unit/data/odp/image_transparency.odp differ -diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx -index f649d27..7cc50e2 100644 ---- a/sd/qa/unit/export-tests-ooxml1.cxx -+++ b/sd/qa/unit/export-tests-ooxml1.cxx -@@ -101,6 +101,7 @@ public: - void testTdf111884(); - void testTdf112633(); - void testCustomXml(); -+ void testPictureTransparency(); - - CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); - -@@ -131,6 +132,7 @@ public: - CPPUNIT_TEST(testTdf111884); - CPPUNIT_TEST(testTdf112633); - CPPUNIT_TEST(testCustomXml); -+ CPPUNIT_TEST(testPictureTransparency); - - CPPUNIT_TEST_SUITE_END(); - -@@ -853,6 +855,30 @@ void SdOOXMLExportTest1::testCustomXml() - CPPUNIT_ASSERT(pStream); - } - -+void SdOOXMLExportTest1::testPictureTransparency() -+{ -+ // Load document and export it to a temporary file. -+ ::sd::DrawDocShellRef xDocShRef -+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/image_transparency.odp"), ODP); -+ utl::TempFile tempFile; -+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); -+ uno::Reference xDoc(xDocShRef->GetDoc()->getUnoModel(), -+ uno::UNO_QUERY); -+ CPPUNIT_ASSERT(xDoc.is()); -+ -+ uno::Reference xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); -+ CPPUNIT_ASSERT(xPage.is()); -+ -+ uno::Reference xGraphicShape(getShape(0, xPage)); -+ CPPUNIT_ASSERT(xGraphicShape.is()); -+ -+ sal_Int16 nTransparency = 0; -+ CPPUNIT_ASSERT(xGraphicShape->getPropertyValue("Transparency") >>= nTransparency); -+ CPPUNIT_ASSERT_EQUAL(static_cast(51), nTransparency); -+ -+ xDocShRef->DoClose(); -+} -+ - CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1); - - CPPUNIT_PLUGIN_IMPLEMENT(); --- -cgit v1.1 + + if (nBright || nContrast)