From 54d07bdc22067cead094b994491e5c57e1591d76 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 28 Dec 2016 09:56:59 +0100 Subject: tdf#104539 dir attribute of outerShdw has to be non-negative Change-Id: Ic6f1c8555eb8d137ced2f4e87baa866df84c69ac Reviewed-on: https://gerrit.libreoffice.org/32467 Tested-by: Jenkins Reviewed-by: Andras Timar --- oox/source/export/drawingml.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 2568902aaf15..7de9e39c52e1 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2982,7 +2982,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) aShadowAttribsGrabBag[0].Name = "dist"; aShadowAttribsGrabBag[0].Value = Any(static_cast< sal_Int32 >(sqrt(dX*dX + dY*dY) * 360)); aShadowAttribsGrabBag[1].Name = "dir"; - aShadowAttribsGrabBag[1].Value = Any(static_cast< sal_Int32 >(atan2(dY,dX) * 180 * 60000 / M_PI)); + aShadowAttribsGrabBag[1].Value = Any((static_cast< sal_Int32 >(atan2(dY,dX) * 180 * 60000 / M_PI) + 21600000) % 21600000); aShadowGrabBag[0].Name = "Attribs"; aShadowGrabBag[0].Value = Any(aShadowAttribsGrabBag); -- cgit