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

Scope level reduction & explain what the max axis index really is.

The concept of axis index and dimension index is quite confusing in the
chart2 code....

Change-Id: I035af0a225396bd5394089d6f584f78dcaf0ad31
üst 139f0f44
......@@ -276,7 +276,15 @@ private:
SeriesPlottersType m_aSeriesPlotterList;
std::vector< VCoordinateSystem* >& m_rVCooSysList;
::std::map< uno::Reference< XAxis >, AxisUsage > m_aAxisUsageList;
/**
* Max axis index of all dimensions. Currently this can be either 0 or 1
* since we only support primary and secondary axes per dimension. The
* value of 0 means all dimensions have only primary axis, while 1 means
* at least one dimension has a secondary axis.
*/
sal_Int32 m_nMaxAxisIndex;
bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
sal_Int32 m_nDefaultDateNumberFormat;
};
......@@ -778,8 +786,9 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
continue;
uno::Reference< XDiagram > xDiagram( rModel.getFirstDiagram() );
if( xDiagram.is() )
{
if (!xDiagram.is())
continue;
bool bSeriesAttachedToThisAxis = false;
sal_Int32 nAttachedAxisIndex = -1;
{
......@@ -798,8 +807,9 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
}
}
if( !bSeriesAttachedToThisAxis && nAttachedAxisIndex >= 0 )
{
if (bSeriesAttachedToThisAxis || nAttachedAxisIndex < 0)
continue;
for( size_t nC = 0; nC < aVCooSysList_Y.size(); ++nC )
{
aVCooSysList_Y[nC]->prepareAutomaticAxisScaling( rAxisUsage.aAutoScaling, 1, nAttachedAxisIndex );
......@@ -858,8 +868,6 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
}
}
}
}
}
if( AxisHelper::isAxisPositioningEnabled() )
{
......
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