From 9270f74466d0eb841babaa24997f608631c70341 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 15 Oct 2019 11:17:24 +0200 Subject: 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 --- oox/source/drawingml/fillproperties.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 2a2deccf544d..c64b0862d225 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. -- cgit