diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-19 19:12:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-19 20:54:52 +0100 |
commit | 79a2b786d3c39a4a756fb13778e437a20758caf8 (patch) | |
tree | 0b5b551185ad782307bf37a022ea481b24425e8f /chart2/source/model/main/ChartModel.cxx | |
parent | ea1cc9899a85e4379ea2c512d56d9b950c63b8f5 (diff) |
use more concrete types in chart2, InternalDataProvider
Change-Id: Iee2cc56b00f0464e652a14eace2640e5d798eb5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128629
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main/ChartModel.cxx')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 00aee342a50d..66248107227c 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -24,6 +24,7 @@ #include <ChartModelHelper.hxx> #include <DisposeHelper.hxx> #include <ControllerLockGuard.hxx> +#include <InternalDataProvider.hxx> #include <ObjectIdentifier.hxx> #include "PageBackground.hxx" #include <CloneHelper.hxx> @@ -695,24 +696,20 @@ Reference< chart2::data::XDataSource > ChartModel::impl_createDefaultData() Reference< chart2::data::XDataSource > xDataSource; if( hasInternalDataProvider() ) { - uno::Reference< lang::XInitialization > xIni(m_xInternalDataProvider,uno::UNO_QUERY); - if( xIni.is() ) + //init internal dataprovider { - //init internal dataprovider - { - beans::NamedValue aParam( "CreateDefaultData" ,uno::Any(true) ); - uno::Sequence< uno::Any > aArgs{ uno::Any(aParam) }; - xIni->initialize(aArgs); - } - //create data - uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({ - { "CellRangeRepresentation", uno::Any( OUString("all") ) }, - { "HasCategories", uno::Any( true ) }, - { "FirstCellAsLabel", uno::Any( true ) }, - { "DataRowSource", uno::Any( css::chart::ChartDataRowSource_COLUMNS ) } - })); - xDataSource = m_xInternalDataProvider->createDataSource( aArgs ); + beans::NamedValue aParam( "CreateDefaultData" ,uno::Any(true) ); + uno::Sequence< uno::Any > aArgs{ uno::Any(aParam) }; + m_xInternalDataProvider->initialize(aArgs); } + //create data + uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({ + { "CellRangeRepresentation", uno::Any( OUString("all") ) }, + { "HasCategories", uno::Any( true ) }, + { "FirstCellAsLabel", uno::Any( true ) }, + { "DataRowSource", uno::Any( css::chart::ChartDataRowSource_COLUMNS ) } + })); + xDataSource = m_xInternalDataProvider->createDataSource( aArgs ); } return xDataSource; } |