summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 9ffd92348a12..b75e12d823cc 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -473,11 +473,11 @@ void VCartesianAxis::createAllTickInfosFromComplexCategories( ::std::vector< ::s
rAllTickInfos.clear();
sal_Int32 nLevel=0;
sal_Int32 nLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount();
- sal_Int32 nCatIndex = 0;
for( ; nLevel<nLevelCount; nLevel++ )
{
::std::vector< TickInfo > aTickInfoVector;
std::vector< ComplexCategory > aComplexCategories( m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoriesByLevel( nLevel ) );
+ sal_Int32 nCatIndex = 0;
std::vector< ComplexCategory >::const_iterator aIt(aComplexCategories.begin());
std::vector< ComplexCategory >::const_iterator aEnd(aComplexCategories.end());
for(;aIt!=aEnd;++aIt)
@@ -1328,13 +1328,18 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
B2DVector aCummulatedLabelsDistance(0,0);
for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
{
- boost::scoped_ptr< TickIter > apTickIter(createLabelTickIterator( nTextLevel ));
- if(apTickIter)
+ boost::scoped_ptr<TickIter> apTickIter(createLabelTickIterator(nTextLevel));
+ if (apTickIter)
{
double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ if( nTextLevel>0 )
+ {
+ lcl_shiftLables( *apTickIter.get(), aCummulatedLabelsDistance );
+ fRotationAngleDegree = 0.0;
+ }
aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter.get()
- , pTickFactory2D->getDistanceAxisTickToText( m_aAxisProperties )
- , fRotationAngleDegree );
+ , pTickFactory2D->getDistanceAxisTickToText( m_aAxisProperties )
+ , fRotationAngleDegree );
}
}
}