diff --git a/include/oox/drawingml/fillproperties.hxx b/include/oox/drawingml/fillproperties.hxx index 3015424c1898..bed67d6fcc46 100644 --- a/include/oox/drawingml/fillproperties.hxx +++ b/include/oox/drawingml/fillproperties.hxx @@ -121,6 +121,7 @@ struct BlipFillProperties Color maDuotoneColors[2]; /// Duotone Colors ArtisticEffectProperties maEffect; /// Artistic effect, not supported by core. + OptValue moAlphaModFix; ///< Alpha Modulate Fixed Effect. /** Overwrites all members that are explicitly set in rSourceProps. */ void assignUsed( const BlipFillProperties& rSourceProps ); diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 370be6804d6a..2acf94f5cc9c 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -205,6 +205,7 @@ void BlipFillProperties::assignUsed( const BlipFillProperties& rSourceProps ) maDuotoneColors[0].assignIfUsed( rSourceProps.maDuotoneColors[0] ); maDuotoneColors[1].assignIfUsed( rSourceProps.maDuotoneColors[1] ); maEffect.assignUsed( rSourceProps.maEffect ); + moAlphaModFix.assignIfUsed(rSourceProps.moAlphaModFix); } void FillProperties::assignUsed( const FillProperties& rSourceProps ) @@ -652,6 +653,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, } } } + + if (maBlipProps.moAlphaModFix.has()) + rPropMap.setProperty(ShapeProperty::FillTransparency, static_cast(maBlipProps.moAlphaModFix.get() / PER_PERCENT)); } break; diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index c8009f8edab7..22d68faabeb9 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -190,6 +190,9 @@ ContextHandlerRef BlipContext::onCreateContext( mrBlipProps.moBrightness = rAttribs.getInteger( XML_bright ); mrBlipProps.moContrast = rAttribs.getInteger( XML_contrast ); break; + case A_TOKEN( alphaModFix ): + mrBlipProps.moAlphaModFix = rAttribs.getInteger(XML_amt); + break; } return nullptr; } diff --git a/sw/qa/extras/ooxmlimport/data/tdf100830.docx b/sw/qa/extras/ooxmlimport/data/tdf100830.docx new file mode 100644 index 000000000000..a51b89026340 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf100830.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4c099e178e80..8752ee07473f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -3294,6 +3294,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf99140, "tdf99140.docx") CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::LEFT_AND_WIDTH, getProperty(xTableProperties, "HoriOrient")); } +DECLARE_OOXMLIMPORT_TEST(testTdf100830, "tdf100830.docx") +{ + // FillTransparence wasn't imported, this was 0. + CPPUNIT_ASSERT_EQUAL(static_cast(50), getProperty(getShape(1), "FillTransparence")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */