[Libreoffice-commits] core.git: Branch 'feature/pivotcharts' - chart2/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Fri Mar 17 11:39:25 UTC 2017
chart2/source/view/main/VLegend.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 07e011ea31e020f9eaa42225c59334366b023961
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Fri Mar 17 12:38:46 2017 +0100
chart2: check if data provider is pivot chart in VLegend
Change-Id: I03f92ec2fae2e832e8e4d4d27f208741dacb88ac
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index ceffae7daad3..939ae8314cd5 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -769,10 +769,12 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory,
ChartModel& rModel, long& nUsedHeight)
{
- uno::Reference<chart2::data::XPivotChartDataProvider> xPivotChartDataProvider(rModel.getDataProvider(), uno::UNO_QUERY);
-
std::vector<std::shared_ptr<VButton>> aButtons;
+ uno::Reference<chart2::data::XPivotChartDataProvider> xPivotChartDataProvider(rModel.getDataProvider(), uno::UNO_QUERY);
+ if (!xPivotChartDataProvider.is())
+ return aButtons;
+
if (!xPivotChartDataProvider->getColumnFields().hasElements())
return aButtons;
More information about the Libreoffice-commits
mailing list