[Libreoffice-commits] core.git: chart2/source
Xisco Fauli
anistenis at gmail.com
Thu Sep 7 10:09:49 UTC 2017
chart2/source/view/charttypes/VSeriesPlotter.cxx | 24 +++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
New commits:
commit 493d10b828ec475f63d399a98ba9b55b9766ee25
Author: Xisco Fauli <anistenis at gmail.com>
Date: Wed Sep 6 23:26:27 2017 +0200
tdf#112006: the result is different using getFirstSeries
Restore the old code and use c++11 for-statement
Change-Id: If85793d03fc9f022a938bcd365c605a7ddac2720
Reviewed-on: https://gerrit.libreoffice.org/42031
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index f72ef4420ea4..0ed27ee808b3 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2060,13 +2060,25 @@ uno::Sequence< OUString > VSeriesPlotter::getSeriesNames() const
if( m_xChartTypeModel.is() )
aRole = m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
-
- VDataSeries* pFirstSeries = getFirstSeries();
- uno::Reference<XDataSeries> xSeries(pFirstSeries ? pFirstSeries->getModel() : nullptr);
- if (xSeries.is())
+ for (std::vector<VDataSeriesGroup> const & rGroup : m_aZSlots)
{
- OUString aSeriesName(DataSeriesHelper::getDataSeriesLabel(xSeries, aRole));
- aRetVector.push_back(aSeriesName);
+ std::vector<VDataSeriesGroup>::const_iterator aXSlotIter = rGroup.begin();
+ const std::vector<VDataSeriesGroup>::const_iterator aXSlotEnd = rGroup.end();
+
+ if (aXSlotIter != aXSlotEnd)
+ {
+ VDataSeriesGroup aSeriesGroup(*aXSlotIter);
+ if (aSeriesGroup.m_aSeriesVector.size())
+ {
+ VDataSeries* pSeries = aSeriesGroup.m_aSeriesVector[0];
+ uno::Reference< XDataSeries > xSeries( pSeries ? pSeries->getModel() : nullptr );
+ if( xSeries.is() )
+ {
+ OUString aSeriesName( DataSeriesHelper::getDataSeriesLabel( xSeries, aRole ) );
+ aRetVector.push_back( aSeriesName );
+ }
+ }
+ }
}
return comphelper::containerToSequence( aRetVector );
}
More information about the Libreoffice-commits
mailing list