diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-03-17 12:38:46 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-03-30 23:54:30 +0200 |
commit | 1d9a03d4edc2c3748ea105c2f8cbc1314799cbc0 (patch) | |
tree | b03c5868735963f6c19127a1d1f7ad19ce20300a /chart2/source/view | |
parent | e5c8cbe1bacc8b99669aec9e6921417b1d4639f5 (diff) |
chart2: check if data provider is pivot chart in VLegend
Change-Id: I03f92ec2fae2e832e8e4d4d27f208741dacb88ac
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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; |