summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-05-07 21:39:40 +0200
committerAndras Timar <andras.timar@collabora.com>2019-06-12 11:13:48 +0200
commitcb355767aab7d5746d8a8ba2da98bd5bc1d73384 (patch)
tree86402c04eda83e4ca43dc689f24e9353283a7c54 /oox
parentf670f41a313fb99b1a91b3dca5065d01e0504a93 (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/71933 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-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.cxx4
2 files changed, 7 insertions, 2 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 5e9d56b8ed8d..b521b3683a88 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -799,6 +799,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 78efe5275cfa..8846baa8395d 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1166,11 +1166,11 @@ OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const
}
sal_Int16 nBright = 0;
sal_Int32 nContrast = 0;
- sal_Int32 nTransparence = 0;
+ sal_Int16 nTransparence = 0;
GET( nBright, AdjustLuminance );
GET( nContrast, AdjustContrast );
- GET( nTransparence, FillTransparence );
+ GET( nTransparence, Transparency );
mpFS->startElementNS( XML_a, XML_blip,
FSNS( XML_r, XML_embed), sRelId.toUtf8().getStr(),