diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-09-03 19:55:35 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-09-04 09:28:10 +0200 |
commit | 689742b9b75250fcebf50f0d9b73052d4b10e7e1 (patch) | |
tree | 1556ce944358091a5cbce035a3b8ab2355dc1334 /oox | |
parent | 3e835154a7af929fd18683af85c28efabd498d41 (diff) |
MSO finally decided to follow the spec, fdo#83312
Change-Id: I8c611b49e3bf4645736425bd33c2994ae2c28337
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/colorchoicecontext.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx index 7c38409d7f5f..e255fcbd6fa7 100644 --- a/oox/source/drawingml/colorchoicecontext.cxx +++ b/oox/source/drawingml/colorchoicecontext.cxx @@ -109,7 +109,17 @@ void ColorValueContext::onStartElement( const AttributeList& rAttribs ) case A_TOKEN( satOff ): case A_TOKEN( shade ): case A_TOKEN( tint ): - mrColor.addTransformation( nElement, rAttribs.getInteger( XML_val, 0 ) ); + { + OUString aValue = rAttribs.getString( XML_val, OUString() ); + sal_Int32 nVal = 0; + if (aValue.endsWith("%")) + { + nVal = aValue.toDouble() * PER_PERCENT; + } + else + nVal = rAttribs.getInteger(XML_val, 0); + mrColor.addTransformation( nElement, nVal ); + } break; case A_TOKEN( comp ): case A_TOKEN( gamma ): |