diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/sidebar/ChartElementsPanel.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 7f2a471ce0f7..2f9d7ebaec27 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -397,10 +397,16 @@ css::uno::Reference<css::chart2::XChartType> getChartType(const css::uno::Refere css::uno::Sequence<css::uno::Reference<css::chart2::XCoordinateSystem>> xCooSysSequence(xCooSysContainer->getCoordinateSystems()); + if (xCooSysSequence.getLength() == 0) + return css::uno::Reference<css::chart2::XChartType>(); + css::uno::Reference<css::chart2::XChartTypeContainer> xChartTypeContainer(xCooSysSequence[0], css::uno::UNO_QUERY_THROW); css::uno::Sequence<css::uno::Reference<css::chart2::XChartType>> xChartTypeSequence(xChartTypeContainer->getChartTypes()); + if (xChartTypeSequence.getLength() == 0) + return css::uno::Reference<css::chart2::XChartType>(); + return xChartTypeSequence[0]; } |