diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-02-08 20:41:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-09 07:34:22 +0100 |
commit | 7c62e59587949344160dd346f7e060577fbc3490 (patch) | |
tree | d82f2e321bd06f604ddd776d506f599117eda0e5 /chart2/source/model | |
parent | da7e9f8613f66265bc8822519fa60412cd463917 (diff) |
use more concrete types in chart2, Axis
Change-Id: Ia47fd6deedd0a1cf6bedc882cb9817206dfa88b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/template/ChartTypeTemplate.cxx | 14 | ||||
-rw-r--r-- | chart2/source/model/template/PieChartTypeTemplate.cxx | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 362706a68a66..1398785066fe 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -496,7 +496,7 @@ void ChartTypeTemplate::createCoordinateSystems( // #i69680# make grid of first y-axis visible (was in the CooSys CTOR before) if( xCooSys->getDimension() >= 2 ) { - Reference< chart2::XAxis > xAxis( xCooSys->getAxisByDimension( 1, 0 )); + rtl::Reference< Axis > xAxis = xCooSys->getAxisByDimension2( 1, 0 ); if( xAxis.is()) AxisHelper::makeGridVisible( xAxis->getGridProperties() ); } @@ -673,7 +673,7 @@ void ChartTypeTemplate::adaptAxes( sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension( nDim ); for( sal_Int32 nAxisIndex=0; nAxisIndex<=nMaxAxisIndex; nAxisIndex++ ) { - Reference< XAxis > xAxis( AxisHelper::getAxis( nDim, nAxisIndex, xCooSys ) ); + rtl::Reference< Axis > xAxis = AxisHelper::getAxis( nDim, nAxisIndex, xCooSys ); if( !xAxis.is() ) continue; @@ -683,13 +683,9 @@ void ChartTypeTemplate::adaptAxes( bool bPercent = (getStackMode(0) == StackMode::YStackedPercent); if( bPercent && nDim == 1 ) { - Reference< beans::XPropertySet > xAxisProp( xAxis, uno::UNO_QUERY ); - if( xAxisProp.is()) - { - // set number format to source format - xAxisProp->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true)); - xAxisProp->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any()); - } + // set number format to source format + xAxis->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(true)); + xAxis->setPropertyValue(CHART_UNONAME_NUMFMT, uno::Any()); } } } diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 9369104f5b52..da7ec3bef878 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -542,8 +542,8 @@ void PieChartTypeTemplate::resetStyles( const rtl::Reference< ::chart::Diagram > { try { - Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/ - , coords ) ); + rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/ + , coords ); if( xAxis.is() ) { chart2::ScaleData aScaleData( xAxis->getScaleData() ); |