diff options
author | Andras Timar <andras.timar@collabora.com> | 2014-02-24 14:55:05 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-24 15:05:25 +0100 |
commit | 26bd175c7587f2d6d217885395846e8c1b5aeeda (patch) | |
tree | 3846161394ad2509edef659af5fcb0d9526beb34 /oox | |
parent | 5ba682c48e449f30e3cc1ec4acac75a6122ee6d7 (diff) |
OOXML chart import: ignore rot values outside the valid range
Change-Id: I506a78a024d761d1d263a7bb1dcbf09a4bbcf4ef
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 29cc07b6e9ec..2541d422beb9 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 ); } |