diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 4874f7f9575f..ce795abb17d0 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1619,7 +1619,11 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel if( nTextLevel>0 ) { lcl_shiftLabels(*apTickIter, aCummulatedLabelsDistance); - fRotationAngleDegree = 0.0; + //multilevel labels: 0 or 90 by default + if( m_aAxisProperties.m_bSwapXAndY ) + fRotationAngleDegree = 90.0; + else + fRotationAngleDegree = 0.0; } aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter, pTickFactory2D->getDistanceAxisTickToText(m_aAxisProperties), @@ -1682,6 +1686,7 @@ void VCartesianAxis::createLabels() aComplexProps.bOverlapAllowed = aComplexProps.fRotationAngleDegree != 0.0; if( nTextLevel > 0 ) { + //multilevel labels: 0 or 90 by default if( m_aAxisProperties.m_bSwapXAndY ) aComplexProps.fRotationAngleDegree = 90.0; else @@ -1769,7 +1774,7 @@ void VCartesianAxis::updatePositions() double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; if( nDepth > 0 ) { - /* Multi-level Labels: default to 0 or 90 */ + //multilevel labels: 0 or 90 by default if( pTickFactory2D->isHorizontalAxis() ) fRotationAngleDegree = 0.0; else @@ -1863,6 +1868,14 @@ void VCartesianAxis::createShapes() if( apTickIter ) { double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; + if( nTextLevel > 0 ) + { + //Multi-level Labels: default to 0 or 90 + if( m_aAxisProperties.m_bSwapXAndY ) + fRotationAngleDegree = 90.0; + else + fRotationAngleDegree = 0.0; + } B2DVector aLabelsDistance(lcl_getLabelsDistance( *apTickIter, pTickFactory2D->getDistanceAxisTickToText(m_aAxisProperties), fRotationAngleDegree)); |