diff options
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf156649.pptx | bin | 0 -> 32463 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 14 |
3 files changed, 17 insertions, 1 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 9f18e7d65f7d..ff78f3183831 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -866,7 +866,9 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe if ( maBlipProps.moAlphaModFix.has_value() ) { - rPropMap.setProperty(PROP_Transparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.value() / PER_PERCENT))); + rPropMap.setProperty( + mbIsCustomShape ? PROP_FillTransparence : PROP_Transparency, + static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.value() / PER_PERCENT))); } } rPropMap.setProperty(PROP_GraphicColorMode, eColorMode); diff --git a/sd/qa/unit/data/pptx/tdf156649.pptx b/sd/qa/unit/data/pptx/tdf156649.pptx Binary files differnew file mode 100644 index 000000000000..2b3b12a9a092 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf156649.pptx diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 61f6736fc33f..92971d4b4221 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1577,6 +1577,20 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf140714) CPPUNIT_ASSERT_EQUAL(OUString{ "com.sun.star.drawing.CustomShape" }, xShape->getShapeType()); } +CPPUNIT_TEST_FIXTURE(SdExportTest, testTdf156649) +{ + createSdImpressDoc("pptx/tdf156649.pptx"); + saveAndReload("Impress Office Open XML"); + + auto xShapeProps(getShapeFromPage(0, 0)); + // Without the fix in place, this test would have failed with + //- Expected: 55 + //- Actual : 0 + // i.e. alphaModFix wasn't imported as fill transparency for the custom shape + CPPUNIT_ASSERT_EQUAL(sal_Int16(55), + xShapeProps->getPropertyValue("FillTransparence").get<sal_Int16>()); +} + CPPUNIT_TEST_FIXTURE(SdExportTest, testMasterPageBackgroundFullSize) { createSdImpressDoc("odp/background.odp"); |