Kaydet (Commit) b174048e authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#55297: Fix regression in chart complex category placements.

This is effectively a revert of a769fd1e
and a1be31fd 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
üst dd9e17b8
...@@ -460,11 +460,11 @@ void VCartesianAxis::createAllTickInfosFromComplexCategories( ::std::vector< ::s ...@@ -460,11 +460,11 @@ void VCartesianAxis::createAllTickInfosFromComplexCategories( ::std::vector< ::s
rAllTickInfos.clear(); rAllTickInfos.clear();
sal_Int32 nLevel=0; sal_Int32 nLevel=0;
sal_Int32 nLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount(); sal_Int32 nLevelCount = m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoryLevelCount();
sal_Int32 nCatIndex = 0;
for( ; nLevel<nLevelCount; nLevel++ ) for( ; nLevel<nLevelCount; nLevel++ )
{ {
::std::vector< TickInfo > aTickInfoVector; ::std::vector< TickInfo > aTickInfoVector;
std::vector< ComplexCategory > aComplexCategories( m_aAxisProperties.m_pExplicitCategoriesProvider->getCategoriesByLevel( nLevel ) ); 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 aIt(aComplexCategories.begin());
std::vector< ComplexCategory >::const_iterator aEnd(aComplexCategories.end()); std::vector< ComplexCategory >::const_iterator aEnd(aComplexCategories.end());
for(;aIt!=aEnd;++aIt) for(;aIt!=aEnd;++aIt)
...@@ -1314,13 +1314,18 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel ...@@ -1314,13 +1314,18 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
B2DVector aCummulatedLabelsDistance(0,0); B2DVector aCummulatedLabelsDistance(0,0);
for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ ) for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ )
{ {
boost::scoped_ptr< TickIter > apTickIter(createLabelTickIterator( nTextLevel )); boost::scoped_ptr<TickIter> apTickIter(createLabelTickIterator(nTextLevel));
if(apTickIter) if (apTickIter)
{ {
double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
if( nTextLevel>0 )
{
lcl_shiftLables( *apTickIter.get(), aCummulatedLabelsDistance );
fRotationAngleDegree = 0.0;
}
aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter.get() aCummulatedLabelsDistance += lcl_getLabelsDistance( *apTickIter.get()
, pTickFactory2D->getDistanceAxisTickToText( m_aAxisProperties ) , pTickFactory2D->getDistanceAxisTickToText( m_aAxisProperties )
, fRotationAngleDegree ); , fRotationAngleDegree );
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment