diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-02-08 19:56:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-09 07:32:09 +0100 |
commit | 6e800111d6daa927564e5f4dba8937bbf56e7b8f (patch) | |
tree | 033ce484665e4c88cc345131e16fab60d7d3f6d2 /chart2/source/controller/main | |
parent | 425ff2e7911436cf2a20d5640d87274d2467b7c0 (diff) |
use more concrete types in chart2, DataSource
Change-Id: I513491e8d39ee79edf8521d279bd32031cf22a93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/main')
-rw-r--r-- | chart2/source/controller/main/ChartDropTargetHelper.cxx | 12 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartModelClone.cxx | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx index dd53e2cf73ea..e4ffd2a29568 100644 --- a/chart2/source/controller/main/ChartDropTargetHelper.cxx +++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx @@ -18,6 +18,7 @@ */ #include "ChartDropTargetHelper.hxx" +#include <DataSource.hxx> #include <DataSourceHelper.hxx> #include <ChartModel.hxx> #include <Diagram.hxx> @@ -125,10 +126,10 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) if( xDataProvider.is() && xDiagram.is() && DataSourceHelper::allArgumentsForRectRangeDetected( m_xChartDocument )) { - Reference< chart2::data::XDataSource > xDataSource( - DataSourceHelper::pressUsedDataIntoRectangularFormat( m_xChartDocument )); + rtl::Reference< DataSource > xDataSource1 = + DataSourceHelper::pressUsedDataIntoRectangularFormat( m_xChartDocument ); Sequence< beans::PropertyValue > aArguments( - xDataProvider->detectArguments( xDataSource )); + xDataProvider->detectArguments( xDataSource1 )); OUString aOldRange; beans::PropertyValue * pCellRange = nullptr; @@ -156,8 +157,9 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) pCellRange->Value <<= aRangeString; } - xDataSource.set( xDataProvider->createDataSource( aArguments )); - xDiagram->setDiagramData( xDataSource, aArguments ); + Reference< chart2::data::XDataSource > xDataSource2 = + xDataProvider->createDataSource( aArguments ); + xDiagram->setDiagramData( xDataSource2, aArguments ); // always return copy state to avoid deletion of the dragged range nResult = DND_ACTION_COPY; diff --git a/chart2/source/controller/main/ChartModelClone.cxx b/chart2/source/controller/main/ChartModelClone.cxx index dfb089d566e8..d4cae52d0ff6 100644 --- a/chart2/source/controller/main/ChartModelClone.cxx +++ b/chart2/source/controller/main/ChartModelClone.cxx @@ -21,6 +21,7 @@ #include <ChartModel.hxx> #include <ChartModelHelper.hxx> #include <ControllerLockGuard.hxx> +#include <DataSource.hxx> #include <DataSourceHelper.hxx> #include <com/sun/star/chart2/XAnyDescriptionAccess.hpp> @@ -201,7 +202,7 @@ namespace chart if ( i_model->hasInternalDataProvider() ) { Reference< XInternalDataProvider > xNewDataProvider( i_model->getDataProvider(), UNO_QUERY ); - Reference< XDataSource > xUsedData( DataSourceHelper::getUsedData( *i_model ) ); + rtl::Reference< DataSource > xUsedData = DataSourceHelper::getUsedData( *i_model ); if ( xUsedData.is() && xNewDataProvider.is() ) { const Sequence< Reference< XLabeledDataSequence > > aData( xUsedData->getDataSequences() ); |