[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - oox/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri Sep 5 08:34:59 PDT 2014
oox/source/drawingml/colorchoicecontext.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 71d25406d9039633fea0bc07132ed180d8f661e6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Sep 3 19:55:35 2014 +0200
MSO finally decided to follow the spec, fdo#83312
Change-Id: I8c611b49e3bf4645736425bd33c2994ae2c28337
Reviewed-on: https://gerrit.libreoffice.org/11270
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx
index 1ee3129..9891bf1 100644
--- a/oox/source/drawingml/colorchoicecontext.cxx
+++ b/oox/source/drawingml/colorchoicecontext.cxx
@@ -111,7 +111,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 ):
More information about the Libreoffice-commits
mailing list