summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/chart/objectformatter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/chart/objectformatter.cxx')
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 5b898d4da6ed..d96e2d43dd6f 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1142,18 +1142,19 @@ void ObjectFormatter::convertTextRotation( PropertySet& rPropSet, const ModelRef
{
if( rxTextProp.is() )
{
- /* Chart2 expects rotation angle as double value in range of [0,360).
- OOXML counts clockwise, Chart2 counts counterclockwise. */
- double fAngle = rxTextProp->getTextProperties().moRotation.get( 0 );
- fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 );
- rPropSet.setProperty( PROP_TextRotation, fAngle );
-
+ bool bStacked = false;
if( bSupportsStacked )
{
sal_Int32 nVert = rxTextProp->getTextProperties().moVert.get( XML_horz );
- bool bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl);
+ bStacked = (nVert == XML_wordArtVert) || (nVert == XML_wordArtVertRtl);
rPropSet.setProperty( PROP_StackCharacters, bStacked );
}
+
+ /* 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 ) );
+ fAngle = getDoubleIntervalValue< double >( -fAngle / 60000.0, 0.0, 360.0 );
+ rPropSet.setProperty( PROP_TextRotation, fAngle );
}
}
@@ -1195,12 +1196,12 @@ void ObjectFormatter::convertAutomaticFill( PropertySet& rPropSet, ObjectType eO
pFormat->convertAutomaticFill( rPropSet, nSeriesIdx );
}
-bool ObjectFormatter::isAutomaticLine( const ModelRef< Shape >& rxShapeProp )
+/*static*/ bool ObjectFormatter::isAutomaticLine( const ModelRef< Shape >& rxShapeProp )
{
return !rxShapeProp || !rxShapeProp->getLineProperties().maLineFill.moFillType.has();
}
-bool ObjectFormatter::isAutomaticFill( const ModelRef< Shape >& rxShapeProp )
+/*static*/ bool ObjectFormatter::isAutomaticFill( const ModelRef< Shape >& rxShapeProp )
{
return !rxShapeProp || !rxShapeProp->getFillProperties().moFillType.has();
}