oox/source/drawingml/chart/objectformatter.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit e2db2c98064ef88518004d5ff3e1a31a95645133 Author: Andras Timar <andras.ti...@collabora.com> Date: Mon Feb 24 14:55:05 2014 +0100 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 8c36959..dada09a 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1105,6 +1105,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 ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits