File ooxml-rotation-values.patch of Package libreoffice.openSUSE_13.1_Update

From cd5a25dedbff94e8d7be714432c36fc18de269bc Mon Sep 17 00:00:00 2001
From: Andras Timar <andras.timar@collabora.com>
Date: Mon, 24 Feb 2014 13:55:05 +0000
Subject: OOXML chart import: ignore rot values outside the valid range

Change-Id: I506a78a024d761d1d263a7bb1dcbf09a4bbcf4ef
---
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 29cc07b..2541d42 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1096,6 +1096,11 @@ void ObjectFormatter::convertTextRotation( PropertySet& rPropSet, const ModelRef
         /*  Chart2 expects rotation angle as double value in range of [0,360).
             OOXML counts clockwise, Chart2 counts counterclockwise. */
         double fAngle = static_cast< double >( bStacked ? 0 : rxTextProp->getTextProperties().moRotation.get( 0 ) );
+        // MS Office UI allows values only in range of [-90,90].
+        if ( fAngle <= -5400000.0 || fAngle >= 5400000.0 )
+        {
+            fAngle = 0.0;
+        }
         fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 );
         rPropSet.setProperty( PROP_TextRotation, fAngle );
     }
--
cgit v0.9.0.2-2-gbebe
openSUSE Build Service is sponsored by