summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-07 11:12:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-07 11:21:24 +0100
commit372f5902200b46edd794c865f6d316a4a32d9cc6 (patch)
tree920c1d893a6b2736b15787d007c3a65ab101b3b1 /chart2/source/controller
parent32c946c064cc2889bda2f46c1862e5100f0a257a (diff)
crashtesting ooo#20372
this reverts parts of the "use more concrete types in chart2, LabeledDataSequence" commits, since writer uses it's own implementation of the XLabeledDataSequence UNO interface Change-Id: Icc2c5e9a38f789cddd9fbca63301397ce759fbff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129587 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx12
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx8
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx2
6 files changed, 14 insertions, 14 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 0d78bdc53cf3..ca8e5a1564a0 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -1373,7 +1373,7 @@ IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit&, rEdit, voi
m_apDataBrowserModel->getHeaderForSeries( xSeries ).m_xChartType );
if( xChartType.is())
{
- rtl::Reference< LabeledDataSequence > xLabeledSeq =
+ uno::Reference< chart2::data::XLabeledDataSequence > xLabeledSeq =
DataSeriesHelper::getDataSequenceByRole( xSource, xChartType->getRoleOfSequenceForSeriesLabel());
if( xLabeledSeq.is())
{
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index d6df1c4789aa..8890da8eaa79 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -129,7 +129,7 @@ bool lcl_SequenceOfSeriesIsShared(
return bResult;
}
-typedef std::vector< rtl::Reference< ::chart::LabeledDataSequence > > lcl_tSharedSeqVec;
+typedef std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > lcl_tSharedSeqVec;
lcl_tSharedSeqVec lcl_getSharedSequences( const Sequence< Reference< chart2::XDataSeries > > & rSeries )
{
@@ -153,7 +153,7 @@ lcl_tSharedSeqVec lcl_getSharedSequences( const Sequence< Reference< chart2::XDa
break;
}
if( bShared )
- aResult.push_back( dynamic_cast<LabeledDataSequence*>(labeledDataSeq.get()) );
+ aResult.push_back( labeledDataSeq );
}
return aResult;
@@ -195,10 +195,10 @@ private:
struct lcl_RolesOfLSeqMatch
{
- explicit lcl_RolesOfLSeqMatch( const rtl::Reference< LabeledDataSequence > & xLSeq ) :
+ explicit lcl_RolesOfLSeqMatch( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq ) :
m_aRole(DataSeriesHelper::getRole(xLSeq)) {}
- bool operator() ( const rtl::Reference< LabeledDataSequence > & xLSeq )
+ bool operator() ( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
return DataSeriesHelper::getRole(xLSeq) == m_aRole;
}
@@ -341,7 +341,7 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
// Failed to insert new data series to the model. Bail out.
return;
- const std::vector<rtl::Reference<LabeledDataSequence> > & aLSequences = xNewSeries->getDataSequences2();
+ const std::vector<uno::Reference<chart2::data::XLabeledDataSequence> > & aLSequences = xNewSeries->getDataSequences2();
sal_Int32 nSeqIdx = 0;
sal_Int32 nSeqSize = aLSequences.size();
for (sal_Int32 nIndex = nStartCol; nSeqIdx < nSeqSize; ++nSeqIdx)
@@ -469,7 +469,7 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu
// Collect all the remaining data sequences in the same chart type. The
// deleted data series is already gone by this point.
- std::vector<rtl::Reference<LabeledDataSequence> > aAllDataSeqs =
+ std::vector<uno::Reference<chart2::data::XLabeledDataSequence> > aAllDataSeqs =
DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries());
// Check if the sequences to be deleted are still referenced by any of
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 8128b2c2d343..0bd1f7c457a8 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -266,7 +266,7 @@ rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries(
// set chart type specific roles
if( xChartType.is() )
{
- std::vector< rtl::Reference< ::chart::LabeledDataSequence > > aNewSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewSequences;
const OUString aRoleOfSeqForSeriesLabel = xChartType->getRoleOfSequenceForSeriesLabel();
const OUString aLabel(::chart::SchResId(STR_DATA_UNNAMED_SERIES));
Sequence< OUString > aPossibleRoles( xChartType->getSupportedMandatoryRoles());
@@ -596,9 +596,9 @@ void DialogModel::deleteSeries(
DataSeriesHelper::deleteSeries( xSeries, xChartType );
}
-rtl::Reference< LabeledDataSequence > DialogModel::getCategories() const
+uno::Reference< chart2::data::XLabeledDataSequence > DialogModel::getCategories() const
{
- rtl::Reference< LabeledDataSequence > xResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
try
{
if( m_xChartDocument.is())
@@ -637,7 +637,7 @@ void DialogModel::setCategories( const Reference< chart2::data::XLabeledDataSequ
OUString DialogModel::getCategoriesRange() const
{
- rtl::Reference< LabeledDataSequence > xLSeq( getCategories());
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq( getCategories());
OUString aRange;
if( xLSeq.is())
{
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index edc87d2e9356..66e7994d318a 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -120,7 +120,7 @@ public:
const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
const rtl::Reference< ::chart::ChartType > & xChartType );
- rtl::Reference< ::chart::LabeledDataSequence >
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getCategories() const;
void setCategories( const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xCategories );
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 583c71128514..44bcdcaffcb8 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -216,7 +216,7 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM
if( m_eObjectType == OBJECTTYPE_DATA_CURVE )
{
- const std::vector< rtl::Reference< LabeledDataSequence > > & aDataSeqs( xSeries->getDataSequences2());
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSeqs( xSeries->getDataSequences2());
Sequence< double > aXValues, aYValues;
bool bXValuesFound = false, bYValuesFound = false;
m_nNbPoints = 0;
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 63d7aee7bbeb..ef4ba8e50569 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -753,7 +753,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField)
if (bAll || (pField == m_xEDT_CATEGORIES.get()))
{
- rtl::Reference< LabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
+ uno::Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
if( xDataProvider.is())
{
OUString aRange(m_xEDT_CATEGORIES->get_text());