diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-09-24 15:29:01 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-09-24 19:15:25 -0400 |
commit | b174048ebd041175efd121751fddfb053d476c80 (patch) | |
tree | 212c56d73c84743a30a2259026afc5f58917d098 /chart2 | |
parent | try to explicitly include map for tinderbox (diff) | |
download | core-b174048ebd041175efd121751fddfb053d476c80.tar.gz core-b174048ebd041175efd121751fddfb053d476c80.zip |
fdo#55297: Fix regression in chart complex category placements.
This is effectively a revert of a769fd1ec076b61c1ce2f84da87283cc637dd5d5
and a1be31fd8bf830a4f5961e690bcffd050782e210 which unfortunately caused
regression in complex category placements.
This unfortunately re-introduces fdo#44832. We need to re-think how to
fix that one without breaking the multi-level category feature.
Change-Id: I1ed8364a46174ac6c29aa0b027a33f84bcca51fa
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 016c3e24e24a..6c0dd0424090 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -460,11 +460,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) @@ -1314,13 +1314,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 ); } } } |