diff options
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 34036f3dd0ed..f7e828425246 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2657,9 +2657,28 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( Sequence< OUString > aCategoryNames; if( m_pExplicitCategoriesProvider ) aCategoryNames = m_pExplicitCategoriesProvider->getSimpleCategories(); - + Sequence<sal_Int32> deletedLegendEntries; + try + { + rSeries.getPropertiesOfSeries()->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntries; + } + catch (const uno::Exception&) + { + } for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx ) { + bool deletedLegendEntry = false; + for (auto& deletedLegendEntryIdx : deletedLegendEntries) + { + if (nIdx == deletedLegendEntryIdx) + { + deletedLegendEntry = true; + break; + } + } + if (deletedLegendEntry) + continue; + // symbol uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget )); |