diff options
author | Adam Co <rattles2013@gmail.com> | 2013-11-12 11:27:38 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-14 15:55:45 +0100 |
commit | ea4d69f5e81d7109ba06dd68252c9e92233c0ab4 (patch) | |
tree | 35ad47ca4b288b4e15011acff26edf376c1c0dcc /oox/source/vml | |
parent | 4b0cb789f8ddd87c92216e3e9520f88d3ad9115d (diff) |
fdo#65295 - fix gradient focus issue
There was a wrong 'if' statement, that checked if the focus was over 75%
and also if the angle was less than 180. If so - it compensated for that
by adding 180 degrees to the angle (and losing the 'focus' attribute).
But it should do that even if the angle is more than 180 degrees, so
this was fixed.
Reviewed on:
https://gerrit.libreoffice.org/6647
Change-Id: Ib2dc8a61359e656721c5c6c99587d4d547eed835
Diffstat (limited to 'oox/source/vml')
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 267d8e5b5082..25caa60a9666 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -740,7 +740,7 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, const GraphicHelper& gradient. BUT: For angles >= 180 deg., the behaviour is reversed. This means that in this case a focus of 0% swaps the gradient. */ - if( ((fFocus < -0.75) || (fFocus > 0.75)) == (nVmlAngle < 180) ) + if( fFocus < -0.5 || fFocus > 0.5 ) (nVmlAngle += 180) %= 360; // set the start and stop colors aFillProps.maGradientProps.maGradientStops[ 0.0 ] = aColor1; |