summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorPaul Trojahn <paul.trojahn@gmail.com>2017-07-04 19:38:31 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-17 12:11:38 +0200
commit41f098c0a2363f7607516a9fe20706ad4201b45c (patch)
treea7bf3fa073858ff6ceb986c6302157d3143b2b64 /oox
parent1c1783864a356a4394f80dec28db939f4cf572cd (diff)
tdf#89926 Fix OOXML gradient angle import
The rotation of the shape needs to be added to get the correct angle. Due to this nDmlAngle can be twice as big. The conversion to LO angles needs to be updated to prevent negative results. Change-Id: I3a13cb268af41a55cd8b9df3084d028008aed4f2 Reviewed-on: https://gerrit.libreoffice.org/39648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 314ff5822695..7d986709603b 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -533,9 +533,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
// Now we have a potential border and a largest segment. Use those.
aGradient.Style = bSymmetric ? awt::GradientStyle_AXIAL : awt::GradientStyle_LINEAR;
- sal_Int32 nDmlAngle = maGradientProps.moShadeAngle.get( 0 ) - nShapeRotation;
+ sal_Int32 nDmlAngle = maGradientProps.moShadeAngle.get( 0 ) + nShapeRotation;
// convert DrawingML angle (in 1/60000 degrees) to API angle (in 1/10 degrees)
- aGradient.Angle = static_cast< sal_Int16 >( (4500 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 );
+ aGradient.Angle = static_cast< sal_Int16 >( (8100 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 );
Color aStartColor, aEndColor;
if( bSymmetric )
{