From 727ca36e83868acbe40aaa239cefc69659b9bc39 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 30 Sep 2019 23:18:14 +0200 Subject: tdf#79007: PPTX: reset Contrast and Brightness when we map... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...MSO 'washout' to our watermark colormode After d151ed35ad4c4e7aa9fbb807930fcf91dea2eba7, Contrast and Brightness was reset only in writer, so do it earlier for Impress and Writer Change-Id: Icaf2b565880e31d86e09e2f56bac25eba52c8467 Reviewed-on: https://gerrit.libreoffice.org/79905 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ --- oox/source/drawingml/fillproperties.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'oox/source/drawingml') diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 82c48426d1a2..2a2deccf544d 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -758,8 +758,10 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, xGraphic, rGraphicHelper, API_RGB_TRANSPARENT); if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast == -70) + { // map MSO 'washout' to our Watermark colormode eColorMode = ColorMode_WATERMARK; + } else if( nBrightness != 0 && nContrast != 0 ) { // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness, @@ -767,9 +769,11 @@ 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