diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-29 21:21:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-30 10:13:30 +0100 |
commit | 63e8c2ccd39263b24f644c3d0394044a2613eb88 (patch) | |
tree | 285f84e16dacde6434dc422ae354f4f708c88080 /chart2/source/model | |
parent | 63400fa8c2333a519f0c3180dd490d2b4204fbc7 (diff) |
use more concrete types in chart2, Diagram
Change-Id: Ieaee7c8381c19e3bfd3560d2f674bebf49afac56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129156
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/template/ChartTypeTemplate.cxx | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index d017bac24398..9f22619448f2 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -836,7 +836,7 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& Reference< chart2::data::XDataSource > xDataSource( m_xDataProvider->createDataSource( aArguments ) ); if( xDataSource.is() ) { - Reference< chart2::XDiagram > xDia( getFirstDiagram() ); + rtl::Reference< Diagram > xDia = getFirstChartDiagram(); if( !xDia.is() ) { rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 72e6fe64be16..79aab231d265 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -56,7 +56,7 @@ namespace void lcl_applyDefaultStyle( const Reference< XDataSeries > & xSeries, sal_Int32 nIndex, - const Reference< XDiagram > & xDiagram ) + const rtl::Reference< ::chart::Diagram > & xDiagram ) { // @deprecated: correct default color should be found by view without // setting color as hard attribute @@ -107,18 +107,17 @@ void lcl_resetLabelPlacementIfDefault( const Reference< beans::XPropertySet >& x } } -void lcl_ensureCorrectMissingValueTreatment( const Reference< chart2::XDiagram >& xDiagram, const rtl::Reference< ::chart::ChartType >& xChartType ) +void lcl_ensureCorrectMissingValueTreatment( const rtl::Reference< ::chart::Diagram >& xDiagram, const rtl::Reference< ::chart::ChartType >& xChartType ) { - Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY ); - if( xDiaProp.is() ) + if( xDiagram.is() ) { uno::Sequence < sal_Int32 > aAvailableMissingValueTreatment( ::chart::ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) ); if( aAvailableMissingValueTreatment.hasElements() ) - xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any( aAvailableMissingValueTreatment[0] ) ); + xDiagram->setPropertyValue( "MissingValueTreatment", uno::Any( aAvailableMissingValueTreatment[0] ) ); else - xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any() ); + xDiagram->setPropertyValue( "MissingValueTreatment", uno::Any() ); } } |