diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-03-09 20:51:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-03-10 08:17:20 +0100 |
commit | f5089e745367e111fb02c493c8c90e96a29e199c (patch) | |
tree | f516f5c9d672f40ab8c2a7a9e6ba097efb8a7eae /oox/source/drawingml/shape.cxx | |
parent | 51fb84829afbc1c0957fd1a489085613ad199f1a (diff) |
sd theme: add PPTX import for shape fill color
The theme index is typically not a direct property, but comes from style
-> fillref -> theme index, so support that.
Change-Id: I00733db44bb5321019bbc7337d10feb0a34661a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131268
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 98401179d84d..7a01ebddb09e 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1161,6 +1161,7 @@ Reference< XShape > const & Shape::createAndInsert( ::Color nLinePhClr(ColorTransparency, 0xffffffff); ::Color nFillPhClr(ColorTransparency, 0xffffffff); + sal_Int16 nFillPhClrTheme = -1; // TODO: use ph color when applying effect properties //sal_Int32 nEffectPhClr = -1; @@ -1197,6 +1198,7 @@ Reference< XShape > const & Shape::createAndInsert( if (!mbUseBgFill) { nFillPhClr = pFillRef->maPhClr.getColor(rGraphicHelper); + nFillPhClrTheme = pFillRef->maPhClr.getSchemeColorIndex(); } OUString sColorScheme = pFillRef->maPhClr.getSchemeColorName(); @@ -1259,7 +1261,7 @@ Reference< XShape > const & Shape::createAndInsert( if (getFillProperties().moFillType.has() && getFillProperties().moFillType.get() == XML_grpFill) getFillProperties().assignUsed(aFillProperties); if(!bIsCroppedGraphic) - aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, mbFlipH, mbFlipV, bIsCustomShape ); + aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, nFillPhClrTheme, mbFlipH, mbFlipV, bIsCustomShape ); LineProperties aLineProperties = getActualLineProperties(pTheme); aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr ); EffectProperties aEffectProperties = getActualEffectProperties(pTheme); |