diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-09-30 23:18:14 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-10-02 00:14:05 +0200 |
commit | 727ca36e83868acbe40aaa239cefc69659b9bc39 (patch) | |
tree | 50e7d78c5b9a07d2627dd23fca1b1bef266c71d5 /oox/source/drawingml | |
parent | 62808ef28e05eee4945a6a15d981350d1306b848 (diff) |
tdf#79007: PPTX: reset Contrast and Brightness when we map...
...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í <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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. |