diff options
Diffstat (limited to 'chart2/source/controller/sidebar/ChartElementsPanel.cxx')
-rw-r--r-- | chart2/source/controller/sidebar/ChartElementsPanel.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 69931ff17303..572ea7de4bd3 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -34,8 +34,8 @@ #include <DiagramHelper.hxx> #include <Diagram.hxx> #include <ChartTypeHelper.hxx> - #include <ChartModel.hxx> +#include <BaseCoordinateSystem.hxx> using namespace css; @@ -409,18 +409,15 @@ namespace { css::uno::Reference<css::chart2::XChartType> getChartType(const rtl::Reference<ChartModel>& xModel) { rtl::Reference<Diagram > xDiagram = xModel->getFirstChartDiagram(); - if (!xDiagram.is()) { + if (!xDiagram.is()) return css::uno::Reference<css::chart2::XChartType>(); - } - css::uno::Sequence<css::uno::Reference<css::chart2::XCoordinateSystem>> xCooSysSequence(xDiagram->getCoordinateSystems()); + const std::vector<rtl::Reference<BaseCoordinateSystem>> & xCooSysSequence(xDiagram->getBaseCoordinateSystems()); - if (!xCooSysSequence.hasElements()) + if (xCooSysSequence.empty()) 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()); + css::uno::Sequence<css::uno::Reference<css::chart2::XChartType>> xChartTypeSequence(xCooSysSequence[0]->getChartTypes()); if (!xChartTypeSequence.hasElements()) return css::uno::Reference<css::chart2::XChartType>(); |