chart2/source/view/main/VLegend.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 07e011ea31e020f9eaa42225c59334366b023961 Author: Tomaž Vajngerl <[email protected]> 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;
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
