summaryrefslogtreecommitdiff
path: root/chart2
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
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')
-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
-rw-r--r--chart2/source/inc/ChartTypeTemplate.hxx3
-rw-r--r--chart2/source/inc/DataInterpreter.hxx7
-rw-r--r--chart2/source/inc/DataSeries.hxx2
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx12
-rw-r--r--chart2/source/inc/DataSource.hxx2
-rw-r--r--chart2/source/inc/DiagramHelper.hxx7
-rw-r--r--chart2/source/inc/StatisticsHelper.hxx2
-rw-r--r--chart2/source/model/main/DataSeries.cxx10
-rw-r--r--chart2/source/model/template/BubbleDataInterpreter.cxx30
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx2
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx26
-rw-r--r--chart2/source/model/template/StockDataInterpreter.cxx6
-rw-r--r--chart2/source/model/template/XYDataInterpreter.cxx28
-rw-r--r--chart2/source/tools/AxisHelper.cxx4
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx40
-rw-r--r--chart2/source/tools/DataSource.cxx2
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx6
-rw-r--r--chart2/source/tools/DiagramHelper.cxx38
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx4
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx4
-rw-r--r--chart2/source/tools/StatisticsHelper.cxx12
-rw-r--r--chart2/source/view/main/VDataSeries.cxx2
28 files changed, 118 insertions, 159 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());
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx
index 1997c88e145e..3eb7b5fcae74 100644
--- a/chart2/source/inc/ChartTypeTemplate.hxx
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -250,8 +250,7 @@ private:
css::uno::Sequence<
css::uno::Reference<
css::chart2::XDataSeries > > > & aSeriesSeq,
- const rtl::Reference<
- LabeledDataSequence >& xCategories,
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq);
};
diff --git a/chart2/source/inc/DataInterpreter.hxx b/chart2/source/inc/DataInterpreter.hxx
index a11e263a387a..93b0806c24e7 100644
--- a/chart2/source/inc/DataInterpreter.hxx
+++ b/chart2/source/inc/DataInterpreter.hxx
@@ -39,7 +39,7 @@ class LabeledDataSequence;
struct InterpretedData
{
css::uno::Sequence< css::uno::Sequence< css::uno::Reference<css::chart2::XDataSeries> > > Series;
- rtl::Reference<::chart::LabeledDataSequence> Categories;
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > Categories;
};
/** offers tooling to interpret different data sources in a structural
@@ -74,11 +74,14 @@ public:
static bool HasCategories(
const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
const std::vector< rtl::Reference< LabeledDataSequence > > & rData );
+ static bool HasCategories(
+ const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
static bool UseCategoriesAsX(
const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
- static std::vector<rtl::Reference<LabeledDataSequence>> getDataSequences(
+ static std::vector<css::uno::Reference< css::chart2::data::XLabeledDataSequence >> getDataSequences(
const css::uno::Reference< css::chart2::data::XDataSource >& xSource);
// ____ DataInterpreter ____
diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
index e1859f817fcd..f15053262081 100644
--- a/chart2/source/inc/DataSeries.hxx
+++ b/chart2/source/inc/DataSeries.hxx
@@ -134,7 +134,7 @@ public:
virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
- typedef std::vector< rtl::Reference< LabeledDataSequence > > tDataSequenceContainer;
+ typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
void setData( const tDataSequenceContainer& aData );
const tDataSequenceContainer & getDataSequences2() const { return m_aDataSequences; }
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 93b1cffe30fb..15f03ea17060 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -61,7 +61,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString
@param aRole
The role that is to be filtered out.
*/
-OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::LabeledDataSequence >
+OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getDataSequenceByRole( const css::uno::Reference< css::chart2::data::XDataSource > & xSource,
const OUString& aRole,
bool bMatchPrefix = false );
@@ -76,20 +76,20 @@ OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::LabeledDataSequence >
The role that is to be filtered out.
*/
OOO_DLLPUBLIC_CHARTTOOLS std::vector<
- rtl::Reference< ::chart::LabeledDataSequence > >
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequencesByRole( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole );
OOO_DLLPUBLIC_CHARTTOOLS std::vector<
- rtl::Reference< ::chart::LabeledDataSequence > >
- getAllDataSequencesByRole( const std::vector< rtl::Reference< ::chart::LabeledDataSequence > > & aDataSequences,
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
+ getAllDataSequencesByRole( const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole );
OOO_DLLPUBLIC_CHARTTOOLS
-std::vector<rtl::Reference< ::chart::LabeledDataSequence > >
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequences(
const css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& aSeries );
OOO_DLLPUBLIC_CHARTTOOLS
-std::vector<rtl::Reference<::chart::LabeledDataSequence> >
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequences(
const std::vector<rtl::Reference<::chart::DataSeries> >& aSeries );
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 1ab8b68c161a..e1346fa27e92 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -40,7 +40,7 @@ public:
explicit DataSource(
const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
explicit DataSource(
- const std::vector< rtl::Reference< ::chart::LabeledDataSequence > > & rSequences );
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
virtual ~DataSource() override;
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index d5f81f30d552..9bf7770a72e8 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -193,13 +193,8 @@ public:
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bSetAxisType = false, // when this flag is true ...
bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
- static void setCategoriesToDiagram(
- const rtl::Reference< LabeledDataSequence >& xCategories,
- const rtl::Reference< ::chart::Diagram >& xDiagram,
- bool bSetAxisType = false, // when this flag is true ...
- bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
- static rtl::Reference< LabeledDataSequence >
+ static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getCategoriesFromDiagram(
const rtl::Reference< ::chart::Diagram > & xDiagram );
diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx
index 34127923e36f..a52fb1fb0d10 100644
--- a/chart2/source/inc/StatisticsHelper.hxx
+++ b/chart2/source/inc/StatisticsHelper.hxx
@@ -46,7 +46,7 @@ namespace chart::StatisticsHelper
// also called "Standard deviation of the mean (SDOM)"
OOO_DLLPUBLIC_CHARTTOOLS double getStandardError( const css::uno::Sequence< double > & rData );
- OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::LabeledDataSequence >
+ OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getErrorLabeledDataSequenceFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 4b10f5ef06bb..b932a7b06578 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -298,13 +298,13 @@ Reference< beans::XPropertySet >
{
Reference< beans::XPropertySet > xResult;
- std::vector< rtl::Reference< LabeledDataSequence > > aSequences;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences;
{
MutexGuard aGuard( m_aMutex );
aSequences = m_aDataSequences;
}
- std::vector< rtl::Reference< LabeledDataSequence > > aValuesSeries(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values" ) );
if (aValuesSeries.empty())
@@ -392,9 +392,7 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
std::swap( aOldDataSequences, m_aDataSequences );
for (const auto & i : aData)
{
- auto p = dynamic_cast<LabeledDataSequence*>(i.get());
- assert(p);
- aNewDataSequences.push_back(p);
+ aNewDataSequences.push_back(i);
}
m_aDataSequences = aNewDataSequences;
}
@@ -403,7 +401,7 @@ void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data:
fireModifyEvent();
}
-void DataSeries::setData( const std::vector< rtl::Reference< LabeledDataSequence > >& aData )
+void DataSeries::setData( const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >& aData )
{
tDataSequenceContainer aOldDataSequences;
tDataSequenceContainer aNewDataSequences;
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx
index 84b51b4dcd74..b15e3eb80b73 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -53,13 +53,13 @@ InterpretedData BubbleDataInterpreter::interpretDataSource(
if( ! xSource.is())
return InterpretedData();
- std::vector< rtl::Reference< LabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
- rtl::Reference< LabeledDataSequence > xValuesX;
- vector< rtl::Reference< LabeledDataSequence > > aYValuesVector;
- vector< rtl::Reference< LabeledDataSequence > > aSizeValuesVector;
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aYValuesVector;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSizeValuesVector;
- rtl::Reference< LabeledDataSequence > xCategories;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
bool bHasCategories = HasCategories( aArguments, aData );
bool bUseCategoriesAsX = UseCategoriesAsX( aArguments );
@@ -120,15 +120,16 @@ InterpretedData BubbleDataInterpreter::interpretDataSource(
vector< Reference< XDataSeries > > aSeriesVec;
aSeriesVec.reserve( aSizeValuesVector.size());
- rtl::Reference< LabeledDataSequence > xClonedXValues = xValuesX;
+ Reference< data::XLabeledDataSequence > xClonedXValues = xValuesX;
+ Reference< util::XCloneable > xCloneableX( xValuesX, uno::UNO_QUERY );
for( size_t nN = 0; nN < aSizeValuesVector.size(); ++nN, ++nSeriesIndex )
{
- vector< rtl::Reference< LabeledDataSequence > > aNewData;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData;
if( xValuesX.is() )
{
- if( nN > 0 )
- xClonedXValues = new LabeledDataSequence(*xValuesX);
+ if( nN > 0 && xCloneableX.is() )
+ xClonedXValues.set( xCloneableX->createClone(), uno::UNO_QUERY );
aNewData.push_back( xClonedXValues );
}
if( aYValuesVector.size() > nN )
@@ -164,18 +165,18 @@ InterpretedData BubbleDataInterpreter::reinterpretDataSeries(
Reference< data::XDataSource > xSeriesSource( aSeries[i], uno::UNO_QUERY_THROW );
Sequence< Reference< data::XLabeledDataSequence > > aNewSequences;
- rtl::Reference< LabeledDataSequence > xValuesSize(
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesSize(
DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-size" ));
- rtl::Reference< LabeledDataSequence > xValuesY(
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesY(
DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y" ));
- rtl::Reference< LabeledDataSequence > xValuesX(
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX(
DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x" ));
if( ! xValuesX.is() ||
! xValuesY.is() ||
! xValuesSize.is() )
{
- vector< rtl::Reference< LabeledDataSequence > > aValueSeqVec(
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValueSeqVec(
DataSeriesHelper::getAllDataSequencesByRole(
xSeriesSource->getDataSequences(), "values" ));
if( xValuesX.is())
@@ -236,8 +237,7 @@ InterpretedData BubbleDataInterpreter::reinterpretDataSeries(
#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
for( auto const & j : aSeqs )
{
- rtl::Reference< ::chart::LabeledDataSequence > j2 = dynamic_cast<LabeledDataSequence*>(j.get());
- assert( (j2 == xValuesY || j2 == xValuesX || j2 == xValuesSize) && "All sequences should be used" );
+ assert( (j == xValuesY || j == xValuesX || j == xValuesSize) && "All sequences should be used" );
}
#endif
Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index df4cb7d17c92..190741bb01a3 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -715,7 +715,7 @@ sal_Int32 ChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension )
void ChartTypeTemplate::FillDiagram(
const rtl::Reference< ::chart::Diagram >& xDiagram,
const Sequence< Sequence< Reference< XDataSeries > > >& aSeriesSeq,
- const rtl::Reference< LabeledDataSequence >& xCategories,
+ const uno::Reference< chart2::data::XLabeledDataSequence >& xCategories,
const std::vector< rtl::Reference< ChartType > >& aOldChartTypesSeq )
{
adaptDiagram( xDiagram );
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 6155fa7e7144..2496147cce57 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -68,9 +68,9 @@ InterpretedData DataInterpreter::interpretDataSource(
lcl_ShowDataSource( xSource );
#endif
- std::vector< rtl::Reference< LabeledDataSequence > > aData = getDataSequences(xSource);
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = getDataSequences(xSource);
- rtl::Reference< LabeledDataSequence > xCategories;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
vector< Reference< data::XLabeledDataSequence > > aSequencesVec;
// check if we should use categories
@@ -79,7 +79,7 @@ InterpretedData DataInterpreter::interpretDataSource(
// parse data
bool bCategoriesUsed = false;
- for( rtl::Reference< LabeledDataSequence > const & labeledData : aData )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledData : aData )
{
try
{
@@ -140,10 +140,10 @@ InterpretedData DataInterpreter::interpretDataSource(
lcl_ShowDataSource( xSource );
#endif
- std::vector< rtl::Reference< LabeledDataSequence > > aData = getDataSequences(xSource);
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = getDataSequences(xSource);
- rtl::Reference< LabeledDataSequence > xCategories;
- vector< rtl::Reference< LabeledDataSequence > > aSequencesVec;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequencesVec;
// check if we should use categories
@@ -151,7 +151,7 @@ InterpretedData DataInterpreter::interpretDataSource(
// parse data
bool bCategoriesUsed = false;
- for( rtl::Reference< LabeledDataSequence > const & labeledData : aData )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labeledData : aData )
{
try
{
@@ -182,7 +182,7 @@ InterpretedData DataInterpreter::interpretDataSource(
for (auto const& elem : aSequencesVec)
{
- std::vector< rtl::Reference< LabeledDataSequence > > aNewData { elem };
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData { elem };
rtl::Reference< DataSeries > xSeries;
if( nSeriesIndex < static_cast<sal_Int32>(aSeriesToReUse.size()))
xSeries = aSeriesToReUse[nSeriesIndex];
@@ -437,7 +437,7 @@ bool DataInterpreter::HasCategories(
bool DataInterpreter::HasCategories(
const Sequence< beans::PropertyValue > & rArguments,
- const std::vector< rtl::Reference< LabeledDataSequence > > & rData )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rData )
{
bool bHasCategories = false;
@@ -473,15 +473,13 @@ css::uno::Sequence< OUString > SAL_CALL DataInterpreter::getSupportedServiceName
return { "com.sun.star.chart2.DataInterpreter" };
}
-std::vector< rtl::Reference< LabeledDataSequence > > DataInterpreter::getDataSequences(
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > DataInterpreter::getDataSequences(
const css::uno::Reference< css::chart2::data::XDataSource >& xSource)
{
- std::vector< rtl::Reference< LabeledDataSequence > > aData;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData;
for (const Reference< data::XLabeledDataSequence > & rLDS : xSource->getDataSequences() )
{
- auto pLDS = dynamic_cast<LabeledDataSequence*>(rLDS.get());
- assert(pLDS);
- aData.push_back(pLDS);
+ aData.push_back(rLDS);
}
return aData;
}
diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx
index df7f6d7f70cc..f96084e06dae 100644
--- a/chart2/source/model/template/StockDataInterpreter.cxx
+++ b/chart2/source/model/template/StockDataInterpreter.cxx
@@ -52,8 +52,8 @@ InterpretedData StockDataInterpreter::interpretDataSource(
if( ! xSource.is())
return InterpretedData();
- rtl::Reference< LabeledDataSequence > xCategories;
- std::vector< rtl::Reference< LabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
const sal_Int32 nDataCount( aData.size());
// sub-type properties
@@ -88,7 +88,7 @@ InterpretedData StockDataInterpreter::interpretDataSource(
sal_Int32 nNumberOfGroups( bHasVolume ? 2 : 1 );
// sequences of data::XLabeledDataSequence per series per group
- std::vector< std::vector< std::vector< rtl::Reference< LabeledDataSequence > > > > aSequences( nNumberOfGroups );
+ std::vector< std::vector< std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > > > aSequences( nNumberOfGroups );
const sal_Int32 nBarGroupIndex( 0 );
const sal_Int32 nCandleStickGroupIndex( nNumberOfGroups - 1 );
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index 772963b7e29e..fb9d1d9c788b 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -54,19 +54,19 @@ InterpretedData XYDataInterpreter::interpretDataSource(
if( ! xSource.is())
return InterpretedData();
- std::vector< rtl::Reference< LabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData = DataInterpreter::getDataSequences(xSource);
- rtl::Reference< LabeledDataSequence > xValuesX;
- vector< rtl::Reference< LabeledDataSequence > > aSequencesVec;
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSequencesVec;
- rtl::Reference< LabeledDataSequence > xCategories;
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
bool bHasCategories = HasCategories( aArguments, aData );
bool bUseCategoriesAsX = UseCategoriesAsX( aArguments );
// parse data
bool bCategoriesUsed = false;
bool bSetXValues = aData.size()>1;
- for( rtl::Reference< LabeledDataSequence > const & labelData : aData )
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labelData : aData )
{
try
{
@@ -104,15 +104,16 @@ InterpretedData XYDataInterpreter::interpretDataSource(
vector< Reference< XDataSeries > > aSeriesVec;
aSeriesVec.reserve( aSequencesVec.size());
- rtl::Reference< LabeledDataSequence > xClonedXValues = xValuesX;
+ Reference< data::XLabeledDataSequence > xClonedXValues = xValuesX;
+ Reference< util::XCloneable > xCloneable( xValuesX, uno::UNO_QUERY );
sal_Int32 nSeriesIndex = 0;
for (auto const& elem : aSequencesVec)
{
- vector< rtl::Reference< LabeledDataSequence > > aNewData;
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewData;
- if( nSeriesIndex )
- xClonedXValues = new LabeledDataSequence(*xValuesX);
+ if( nSeriesIndex && xCloneable.is() )
+ xClonedXValues.set( xCloneable->createClone(), uno::UNO_QUERY );
if( xValuesX.is() )
aNewData.push_back( xClonedXValues );
@@ -149,15 +150,15 @@ InterpretedData XYDataInterpreter::reinterpretDataSeries(
Sequence< Reference< data::XLabeledDataSequence > > aNewSequences;
// values-y
- rtl::Reference< LabeledDataSequence > xValuesY(
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesY(
DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y" ));
- rtl::Reference< LabeledDataSequence > xValuesX(
+ uno::Reference< chart2::data::XLabeledDataSequence > xValuesX(
DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x" ));
// re-use values-... as values-x/values-y
if( ! xValuesX.is() ||
! xValuesY.is())
{
- vector< rtl::Reference< LabeledDataSequence > > aValueSeqVec(
+ vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValueSeqVec(
DataSeriesHelper::getAllDataSequencesByRole(
xSeriesSource->getDataSequences(), "values" ));
if( xValuesX.is())
@@ -200,8 +201,7 @@ InterpretedData XYDataInterpreter::reinterpretDataSeries(
#ifdef DBG_UTIL
for( auto const & j : aSeqs )
{
- rtl::Reference< ::chart::LabeledDataSequence > j2 = dynamic_cast<LabeledDataSequence*>(j.get());
- SAL_WARN_IF((j2 == xValuesY || j2 == xValuesX), "chart2.template", "All sequences should be used" );
+ SAL_WARN_IF((j == xValuesY || j == xValuesX), "chart2.template", "All sequences should be used" );
}
#endif
Reference< data::XDataSink > xSink( xSeriesSource, uno::UNO_QUERY_THROW );
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 52225c48b413..b8e8ca37c11f 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -212,11 +212,11 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
Reference< data::XDataSource > xSource( DataSourceHelper::getUsedData( *xChartDoc ) );
if( xSource.is() )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aXValues(
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aXValues(
DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), "values-x" ) );
if( aXValues.empty() )
{
- rtl::Reference< LabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
if( xCategories.is() )
{
Reference< data::XDataSequence > xSeq( xCategories->getValues());
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 830a94d0a240..8ba8c3529f25 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -214,57 +214,53 @@ OUString getRole( const rtl::Reference< ::chart::LabeledDataSequence >& xLabeled
return aRet;
}
-rtl::Reference< ::chart::LabeledDataSequence >
+uno::Reference< chart2::data::XLabeledDataSequence >
getDataSequenceByRole(
const Reference< chart2::data::XDataSource > & xSource,
const OUString& aRole,
bool bMatchPrefix /* = false */ )
{
- rtl::Reference< LabeledDataSequence > aNoResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > aNoResult;
if( ! xSource.is())
return aNoResult;
const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLabeledSeq( xSource->getDataSequences());
for (auto const & i : aLabeledSeq)
{
- auto p = dynamic_cast<LabeledDataSequence*>(i.get());
- assert(p);
- if (lcl_MatchesRole(aRole, bMatchPrefix)(p))
- return p;
+ if (lcl_MatchesRole(aRole, bMatchPrefix)(i))
+ return i;
}
return aNoResult;
}
-std::vector< rtl::Reference< LabeledDataSequence > >
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >
getAllDataSequencesByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aResultVec;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResultVec;
for (const auto & i : aDataSequences)
{
- auto p = dynamic_cast<LabeledDataSequence*>(i.get());
- assert(p);
- if (lcl_MatchesRole(aRole, /*bMatchPrefix*/true)(p))
- aResultVec.push_back(p);
+ if (lcl_MatchesRole(aRole, /*bMatchPrefix*/true)(i))
+ aResultVec.push_back(i);
}
return aResultVec;
}
-std::vector< rtl::Reference< LabeledDataSequence > >
- getAllDataSequencesByRole( const std::vector< rtl::Reference< LabeledDataSequence > > & aDataSequences,
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
+ getAllDataSequencesByRole( const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aResultVec;
+ std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > aResultVec;
std::copy_if( aDataSequences.begin(), aDataSequences.end(),
std::back_inserter( aResultVec ),
lcl_MatchesRole(aRole, /*bMatchPrefix*/true) );
return aResultVec;
}
-std::vector<rtl::Reference<LabeledDataSequence> >
+std::vector<uno::Reference<chart2::data::XLabeledDataSequence> >
getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >& aSeries )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aSeqVec;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVec;
for( uno::Reference<chart2::XDataSeries> const & dataSeries : aSeries )
{
@@ -274,9 +270,7 @@ getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >&
const Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( xSource->getDataSequences());
for (const auto & i : aSeq)
{
- auto p = dynamic_cast<LabeledDataSequence*>(i.get());
- assert(p);
- aSeqVec.push_back(p);
+ aSeqVec.push_back(i);
}
}
}
@@ -284,14 +278,14 @@ getAllDataSequences( const uno::Sequence<uno::Reference<chart2::XDataSeries> >&
return aSeqVec;
}
-std::vector<rtl::Reference<::chart::LabeledDataSequence> >
+std::vector<uno::Reference<chart2::data::XLabeledDataSequence> >
getAllDataSequences( const std::vector<rtl::Reference<DataSeries> >& aSeries )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aSeqVec;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVec;
for( rtl::Reference<DataSeries> const & dataSeries : aSeries )
{
- const std::vector< rtl::Reference< LabeledDataSequence > > & aSeq( dataSeries->getDataSequences2());
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aSeq( dataSeries->getDataSequences2());
aSeqVec.insert( aSeqVec.end(), aSeq.begin(), aSeq.end() );
}
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index d695fb3b4013..2770a76211d5 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -42,7 +42,7 @@ DataSource::DataSource(
{}
DataSource::DataSource(
- const std::vector< rtl::Reference< ::chart::LabeledDataSequence > > & rSequences )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rSequences )
{
m_aDataSeq = comphelper::containerToSequence< Reference< chart2::data::XLabeledDataSequence > >(rSequences);
}
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index fa0b4ebfcf1a..c2680446e1b8 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -291,17 +291,17 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
uno::Reference< chart2::data::XDataSource > DataSourceHelper::getUsedData(
ChartModel& rModel )
{
- std::vector< rtl::Reference< LabeledDataSequence > > aResult;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResult;
rtl::Reference< Diagram > xDiagram = rModel.getFirstChartDiagram();
- rtl::Reference< LabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
if( xCategories.is() )
aResult.push_back( xCategories );
std::vector< rtl::Reference< DataSeries > > aSeriesVector = ChartModelHelper::getDataSeries( &rModel );
for (auto const& series : aSeriesVector)
{
- const std::vector< rtl::Reference< LabeledDataSequence > > & aDataSequences( series->getDataSequences2() );
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences( series->getDataSequences2() );
aResult.insert( aResult.end(), aDataSequences.begin(), aDataSequences.end() );
}
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index c45bb92e663e..53c530810b7b 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -490,7 +490,7 @@ void DiagramHelper::replaceCoordinateSystem(
try
{
- rtl::Reference< LabeledDataSequence > xCategories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
+ uno::Reference< chart2::data::XLabeledDataSequence > xCategories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
// move chart types of xCooSysToReplace to xReplacement
xReplacement->setChartTypes( xCooSysToReplace->getChartTypes());
@@ -756,7 +756,7 @@ bool DiagramHelper::isCategoryDiagram(
}
void DiagramHelper::setCategoriesToDiagram(
- const Reference< chart2::data::XLabeledDataSequence >& xCategories,
+ const uno::Reference< chart2::data::XLabeledDataSequence >& xCategories,
const rtl::Reference< Diagram >& xDiagram,
bool bSetAxisType /* = false */,
bool bCategoryAxis /* = true */ )
@@ -782,38 +782,11 @@ void DiagramHelper::setCategoriesToDiagram(
}
}
-void DiagramHelper::setCategoriesToDiagram(
- const rtl::Reference< LabeledDataSequence >& xCategories,
- const rtl::Reference< Diagram >& xDiagram,
- bool bSetAxisType /* = false */,
- bool bCategoryAxis /* = true */ )
-{
- std::vector< Reference< chart2::XAxis > > aCatAxes(
- lcl_getAxisHoldingCategoriesFromDiagram( xDiagram ));
-
- for (const Reference< chart2::XAxis >& xCatAxis : aCatAxes)
- {
- if( xCatAxis.is())
- {
- ScaleData aScaleData( xCatAxis->getScaleData());
- aScaleData.Categories = xCategories;
- if( bSetAxisType )
- {
- if( bCategoryAxis )
- aScaleData.AxisType = AxisType::CATEGORY;
- else if( aScaleData.AxisType == AxisType::CATEGORY || aScaleData.AxisType == AxisType::DATE )
- aScaleData.AxisType = AxisType::REALNUMBER;
- }
- xCatAxis->setScaleData( aScaleData );
- }
- }
-}
-
-rtl::Reference< LabeledDataSequence >
+uno::Reference< chart2::data::XLabeledDataSequence >
DiagramHelper::getCategoriesFromDiagram(
const rtl::Reference< Diagram > & xDiagram )
{
- rtl::Reference< LabeledDataSequence > xResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
try
{
@@ -828,8 +801,7 @@ rtl::Reference< LabeledDataSequence >
ScaleData aScaleData( xCatAxis->getScaleData());
if( aScaleData.Categories.is() )
{
- xResult = dynamic_cast<LabeledDataSequence*>(aScaleData.Categories.get());
- assert(!aScaleData.Categories || xResult);
+ xResult = aScaleData.Categories;
uno::Reference<beans::XPropertySet> xProp(xResult->getValues(), uno::UNO_QUERY );
if( xProp.is() )
{
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 7bcdc0cf8785..91e09b5ef303 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -117,8 +117,8 @@ struct lcl_internalizeSeries
{}
void operator() ( const rtl::Reference< DataSeries > & xSeries )
{
- const std::vector< rtl::Reference< LabeledDataSequence > > & aOldSeriesData = xSeries->getDataSequences2();
- std::vector< rtl::Reference< LabeledDataSequence > > aNewSeriesData( aOldSeriesData.size() );
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aOldSeriesData = xSeries->getDataSequences2();
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aNewSeriesData( aOldSeriesData.size() );
for( sal_Int32 i=0; i<static_cast<sal_Int32>(aOldSeriesData.size()); ++i )
{
sal_Int32 nNewIndex( m_bDataInColumns ? m_rInternalData.appendColumn() : m_rInternalData.appendRow() );
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 06d46efee17a..f2b2837b263f 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -272,8 +272,8 @@ void RangeHighlighter::fillRangesForDataPoint( const rtl::Reference< DataSeries
Color nPreferredColor = defaultPreferredColor;
std::vector< chart2::data::HighlightedRange > aHilightedRanges;
- const std::vector< rtl::Reference< LabeledDataSequence > > & aLSeqSeq( xDataSeries->getDataSequences2());
- for( rtl::Reference< LabeledDataSequence > const & labelDataSeq : aLSeqSeq )
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aLSeqSeq( xDataSeries->getDataSequences2());
+ for( uno::Reference< chart2::data::XLabeledDataSequence > const & labelDataSeq : aLSeqSeq )
{
Reference< chart2::data::XDataSequence > xLabel( labelDataSeq->getLabel());
Reference< chart2::data::XDataSequence > xValues( labelDataSeq->getValues());
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index ac748c1901c4..1d056e7fe223 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -70,7 +70,7 @@ double lcl_getVariance( const Sequence< double > & rData, sal_Int32 & rOutValidC
return (fQuadSum - fSum*fSum/fN) / fN;
}
-rtl::Reference< ::chart::LabeledDataSequence > lcl_getErrorBarLabeledSequence(
+uno::Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence(
const Reference< chart2::data::XDataSource > & xDataSource,
bool bPositiveValue, bool bYError,
OUString & rOutRoleNameUsed )
@@ -91,7 +91,7 @@ rtl::Reference< ::chart::LabeledDataSequence > lcl_getErrorBarLabeledSequence(
aRole.append( "negative" );
OUString aLongRole = aRole.makeStringAndClear();
- rtl::Reference< ::chart::LabeledDataSequence > xLSeq =
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
::chart::DataSeriesHelper::getDataSequenceByRole( xDataSource, aLongRole );
// try role without "-negative" or "-positive" postfix
if( xLSeq.is())
@@ -189,17 +189,17 @@ double StatisticsHelper::getStandardError( const Sequence< double > & rData )
return sqrt( fVar ) / sqrt( double(nValCount) );
}
-rtl::Reference< LabeledDataSequence > StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
+uno::Reference< chart2::data::XLabeledDataSequence > StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
const Reference< chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError /* = true */ )
{
- rtl::Reference< LabeledDataSequence > xResult;
+ uno::Reference< chart2::data::XLabeledDataSequence > xResult;
if( !xDataSource.is())
return xResult;
OUString aRole;
- rtl::Reference< LabeledDataSequence > xLSeq =
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
lcl_getErrorBarLabeledSequence( xDataSource, bPositiveValue, bYError, aRole );
if( xLSeq.is())
xResult = xLSeq;
@@ -212,7 +212,7 @@ Reference< chart2::data::XDataSequence > StatisticsHelper::getErrorDataSequenceF
bool bPositiveValue,
bool bYError /* = true */ )
{
- rtl::Reference< LabeledDataSequence > xLSeq =
+ uno::Reference< chart2::data::XLabeledDataSequence > xLSeq =
StatisticsHelper::getErrorLabeledDataSequenceFromDataSource(
xDataSource, bPositiveValue,
bYError );
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 33a73927a1e2..9054899485f4 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -164,7 +164,7 @@ VDataSeries::VDataSeries( const rtl::Reference< DataSeries >& xDataSeries )
{
m_xDataSeriesProps = m_xDataSeries;
- const std::vector< rtl::Reference< LabeledDataSequence > > & aDataSequences =
+ const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSequences =
m_xDataSeries->getDataSequences2();
for(sal_Int32 nN = aDataSequences.size();nN--;)