[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - chart2/source
Xisco Fauli
anistenis at gmail.com
Fri Sep 15 15:26:53 UTC 2017
chart2/source/view/charttypes/VSeriesPlotter.cxx | 24 +++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
New commits:
commit ef64fc4de91c91438f895d94431b5d124f04961c
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>
(cherry picked from commit 493d10b828ec475f63d399a98ba9b55b9766ee25)
Reviewed-on: https://gerrit.libreoffice.org/42045
Reviewed-by: Michael Stahl <mstahl at redhat.com>
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 );
}
More information about the Libreoffice-commits
mailing list