diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2010-12-01 13:46:27 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2010-12-01 13:46:27 +0100 |
commit | 4f958ff57dc8654ae10f6ee5da1e7a37a526d6ee (patch) | |
tree | 471eb2d0f82a7b938d5d0cf6057be67e911b5b75 /chart2/source/model | |
parent | 039076d86f2fe956bfe9a13fb774a7ac71c73248 (diff) |
chart46: #i25706# implement date axis - switching to net chart
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/template/ChartTypeTemplate.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 498be4e2daf9..82aa3e12075e 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -643,17 +643,21 @@ void ChartTypeTemplate::adaptScales( sal_Int32 nDim( xCooSys->getDimension()); if( nDim > 0 ) { - const sal_Int32 nMaxIndex = xCooSys->getMaximumAxisIndexByDimension(0); + const sal_Int32 nDimensionX = 0; + const sal_Int32 nMaxIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionX); for(sal_Int32 nI=0; nI<=nMaxIndex; ++nI) { - Reference< XAxis > xAxis( xCooSys->getAxisByDimension(0,nI) ); + Reference< XAxis > xAxis( xCooSys->getAxisByDimension(nDimensionX,nI) ); if( xAxis.is()) { ScaleData aData( xAxis->getScaleData() ); aData.Categories = xCategories; if(bSupportsCategories) { - if( aData.AxisType != AxisType::CATEGORY && aData.AxisType != AxisType::DATE ) + + Reference< XChartType > xChartType( getChartTypeForNewSeries(Sequence< Reference< XChartType > >() )); + bool bSupportsDates = ::chart::ChartTypeHelper::isSupportingDateAxis( xChartType, 2, nDimensionX ); + if( aData.AxisType != AxisType::CATEGORY && ( aData.AxisType != AxisType::DATE || !bSupportsDates) ) { aData.AxisType = AxisType::CATEGORY; aData.AutoDateAxis = true; |