tdf#79007: Do not overwrite if only one of nBrightness...
...or nContrast is != 0
Thanks to M. Stahl
Change-Id: I28a08f31ca1e93d7b06f56700baea0d8ab6c7de4
Reviewed-on: https://gerrit.libreoffice.org/80818
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 2a2decc..c64b086 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -761,6 +761,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
{
// map MSO 'washout' to our Watermark colormode
eColorMode = ColorMode_WATERMARK;
nBrightness = 0;
nContrast = 0;
}
else if( nBrightness != 0 && nContrast != 0 )
{
@@ -769,11 +771,10 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
// contrast or brightness need to be altered, the result is the same, but if both are involved,
// there's no way to map that, so just force a conversion of the image.
xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast );
nBrightness = 0;
nContrast = 0;
}
nBrightness = 0;
nContrast = 0;
if(mbIsCustomShape)
{
// it is a cropped graphic.