diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-12-07 16:22:00 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-12-07 17:20:55 +0100 |
commit | 08016d2b0950e8706dc6c36f9804842156627c9e (patch) | |
tree | 68009c2b3bee28ade29a19ce8c01b2d01d231053 | |
parent | d61e9c9c226cdebaf01f765f7cef657656640740 (diff) |
Check secondary Y axis exists before retrieving value for "Show" prop (chart2)
Change-Id: I7d2a69635de6625e09dd71a33553261898e30420
Reviewed-on: https://gerrit.libreoffice.org/84685
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 04595a6138db..e541d2509674 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -481,9 +481,9 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( // Let's check whether the secondary Y axis is visible try { - Reference< beans::XPropertySet > xAxisProp(xCooSys->getAxisByDimension(1, 1), uno::UNO_QUERY); - if (xAxisProp.is()) + if (xCooSys->getMaximumAxisIndexByDimension(1) > 0) { + Reference< beans::XPropertySet > xAxisProp(xCooSys->getAxisByDimension(1, 1), uno::UNO_QUERY); xAxisProp->getPropertyValue("Show") >>= bSecondaryYaxisVisible; } } |