summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/oox/drawingml/color.hxx1
-rw-r--r--oox/source/drawingml/color.cxx16
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx1
3 files changed, 18 insertions, 0 deletions
diff --git a/include/oox/drawingml/color.hxx b/include/oox/drawingml/color.hxx
index 00473cfe6f27..bd67982c6e92 100644
--- a/include/oox/drawingml/color.hxx
+++ b/include/oox/drawingml/color.hxx
@@ -99,6 +99,7 @@ public:
/** Returns the scheme name from the a:schemeClr element for interoperability purposes */
const OUString& getSchemeColorName() const { return msSchemeName; }
sal_Int16 getSchemeColorIndex() const;
+ sal_Int16 getTintOrShade();
/** Returns the unaltered list of transformations for interoperability purposes */
const css::uno::Sequence< css::beans::PropertyValue >& getTransformations() const { return maInteropTransformations;}
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())
{