diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-25 18:58:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-25 19:15:00 +0100 |
commit | 8a2da2585f2dc031235cda98ecd811683755474e (patch) | |
tree | 1152fa04df54aed6ca508355d7e2be830284c8ad /chart2/source/model | |
parent | 37d720b980c116a5b396b730d5850ebc6fc9d5a0 (diff) |
use more concrete types in chart2, ChartType
Change-Id: I0f95c0a7be864ebde5f3234e77e4f915f57ffdcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128939
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 | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 28f0c7303efa..997de84ad302 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -803,35 +803,10 @@ void ChartTypeTemplate::createChartTypes( } void ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( - const Sequence< Reference< XChartType > > & rOldChartTypesSeq, - const Reference< XChartType > & xNewChartType ) -{ - Reference< beans::XPropertySet > xDestination( xNewChartType, uno::UNO_QUERY ); - if( !xDestination.is() ) - return; - - OUString aNewChartType( xNewChartType->getChartType() ); - - Reference< beans::XPropertySet > xSource; - for( Reference< XChartType > const & xOldType : rOldChartTypesSeq ) - { - if( xOldType.is() && xOldType->getChartType() == aNewChartType ) - { - xSource.set( Reference< beans::XPropertySet >(xOldType, uno::UNO_QUERY ) ); - if( xSource.is() ) - break; - } - } - if( xSource.is() ) - comphelper::copyProperties( xSource, xDestination ); -} - -void ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( const std::vector< rtl::Reference< ChartType > > & rOldChartTypesSeq, - const Reference< XChartType > & xNewChartType ) + const rtl::Reference< ChartType > & xNewChartType ) { - Reference< beans::XPropertySet > xDestination( xNewChartType, uno::UNO_QUERY ); - if( !xDestination.is() ) + if( !xNewChartType.is() ) return; OUString aNewChartType( xNewChartType->getChartType() ); @@ -847,7 +822,7 @@ void ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( } } if( xSource.is() ) - comphelper::copyProperties( xSource, xDestination ); + comphelper::copyProperties( xSource, xNewChartType ); } } // namespace chart |