diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/color.cxx | 16 | ||||
-rw-r--r-- | oox/source/drawingml/textcharacterproperties.cxx | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 2ced5345904e..426197102160 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -479,6 +479,22 @@ void Color::clearTransparence() mnAlpha = MAX_PERCENT; } +sal_Int16 Color::getTintOrShade() +{ + for(auto const& aTransform : maTransforms) + { + switch(aTransform.mnToken) + { + case XML_tint: + // from 1000th percent to 100th percent... + return aTransform.mnValue/10; + case XML_shade: + // from 1000th percent to 100th percent... + return -aTransform.mnValue/10; + } + } + return 0; +} ::Color Color::getColor( const GraphicHelper& rGraphicHelper, ::Color nPhClr ) const { const sal_Int32 nTempC1 = mnC1; diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 90b0e38c1d3a..bd4d051a490b 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -113,6 +113,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil rPropMap.setProperty(PROP_CharColor, aColor.getColor(rFilter.getGraphicHelper())); // set color theme index rPropMap.setProperty(PROP_CharColorTheme, aColor.getSchemeColorIndex()); + rPropMap.setProperty(PROP_CharColorTintOrShade, aColor.getTintOrShade()); if (aColor.hasTransparency()) { |