summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-05-09 13:03:13 +0200
committerAndras Timar <andras.timar@collabora.com>2019-05-11 10:07:06 +0200
commitdc75d3cc5f2797dd5a8675004302a52bda1210c6 (patch)
treea419e6c0b4f6f047fe064e0765b089d3ef6fa214 /oox
parentd49255efea55252d6a92a000b1c53d35c2c5ac8d (diff)
PPTX: Fix import / export of image transparency
Reviewed-on: https://gerrit.libreoffice.org/71916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit ae3aabdb951643af8d2f7aee9c9f900245e5b384) Change-Id: Ib07c606083b833389fcb82aac57ca8535d6e861f Reviewed-on: https://gerrit.libreoffice.org/72051 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx5
-rw-r--r--oox/source/export/drawingml.cxx6
2 files changed, 8 insertions, 3 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index b255116b4a7b..a2fb6ee7a6c6 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -755,6 +755,11 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
}
}
+
+ if ( maBlipProps.moAlphaModFix.has() )
+ {
+ rPropMap.setProperty(PROP_Transparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT)));
+ }
}
rPropMap.setProperty(PROP_GraphicColorMode, eColorMode);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a797adbc1f1e..23065ec67678 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1154,14 +1154,14 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference<beans::X
{
sal_Int16 nBright = 0;
sal_Int32 nContrast = 0;
- sal_Int32 nTransparence = 0;
+ sal_Int16 nTransparence = 0;
if (GetProperty(rXPropSet, "AdjustLuminance"))
nBright = mAny.get<sal_Int16>();
if (GetProperty(rXPropSet, "AdjustContrast"))
nContrast = mAny.get<sal_Int32>();
- if (GetProperty(rXPropSet, "FillTransparence"))
- nTransparence = mAny.get<sal_Int32>();
+ if (GetProperty(rXPropSet, "Transparency"))
+ nTransparence = mAny.get<sal_Int16>();
if (nBright || nContrast)