[Libreoffice-commits] core.git: chart2/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 7 16:21:33 UTC 2019


 chart2/source/view/main/ChartView.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 08016d2b0950e8706dc6c36f9804842156627c9e
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Dec 7 16:22:00 2019 +0100
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Dec 7 17:20:55 2019 +0100

    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 at yahoo.fr>

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;
             }
         }


More information about the Libreoffice-commits mailing list