summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2017-09-06 23:26:27 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-15 17:26:28 +0200
commitef64fc4de91c91438f895d94431b5d124f04961c (patch)
treef43b59857df9fdb456e5d786e7853c2eb5bc6bbf /chart2
parent14f22c32e1edc2c5c4a72f3e3621e1de57b26b57 (diff)
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@libreoffice.org> Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> (cherry picked from commit 493d10b828ec475f63d399a98ba9b55b9766ee25) Reviewed-on: https://gerrit.libreoffice.org/42045 Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 38a6bb865730..c0c061e61a3a 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2062,13 +2062,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 );
}