summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorAttila Szűcs <attila.szucs@collabora.com>2023-01-04 00:40:23 +0100
committerAndras Timar <andras.timar@collabora.com>2023-01-04 20:38:38 +0000
commit0cc9aaae5dc6655490513e8e4a93967f6248e23c (patch)
treeddf54192a2899c703a4dc960b86b0b5046c32182 /oox
parente2c3f00b37ec2d4e9bd36058b3cc5e0e5b5b0e02 (diff)
tdf#149588 pptx import: transparency at SolidFill
When copied color (RGB) property from text content to shape, copy alpha component as well. (If text color have alpha component) Change-Id: Ib86c48ab7b2d3c5f9491a2211b05e90b2c2ea10f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145031 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index fcc1e9016170..7cd02f77f91f 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -708,6 +708,12 @@ static void lcl_copyCharPropsToShape(const uno::Reference<drawing::XShape>& xSha
aFillColor = static_cast<sal_Int32>(
rCharProps.maFillProperties.maFillColor.getColor(rFilter.getGraphicHelper())
.GetRGBColor());
+ if (rCharProps.maFillProperties.maFillColor.hasTransparency())
+ {
+ const sal_Int16 aTransparence
+ = rCharProps.maFillProperties.maFillColor.getTransparency();
+ xSet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::Any(aTransparence));
+ }
}
xSet->setPropertyValue(UNO_NAME_FILLCOLOR, uno::Any(aFillColor));