summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2016-12-28 09:56:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-01-01 17:41:28 +0000
commit7f94dfc93cdade37f371d0c583ff6e9b082737dc (patch)
treecfae61ceb783b7418f9c56ecd5be4c945c038b35
parent0690b64efac12eba37af78e66f8fff5e24c91c96 (diff)
tdf#104539 dir attribute of outerShdw has to be non-negative
Change-Id: Ic6f1c8555eb8d137ced2f4e87baa866df84c69ac Reviewed-on: https://gerrit.libreoffice.org/32471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--oox/source/export/drawingml.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index bfbd078ce83e..2e12ad50b999 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2959,7 +2959,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);