[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - chart2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Oct 13 16:13:28 UTC 2016


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

New commits:
commit 0e8045fd2365c5adf986cd845d4d1a185ffe0aeb
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Oct 9 00:57:13 2016 +0200

    avoid crashes on broken charts, related tdf#98690
    
    Change-Id: If81f963babc15fc549d9daa904fd9836ea02ecef
    (cherry picked from commit c3cc9429d136178996d797ef8fd6d740b39cc94e)
    Reviewed-on: https://gerrit.libreoffice.org/29683
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 5085223..3992def 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -315,7 +315,7 @@ OUString ChartController::GetContextName()
 
     ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID);
 
-    css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(css::uno::Reference<css::chart2::XChartDocument>(getModel(), uno::UNO_QUERY_THROW));
+    css::uno::Reference<css::chart2::XChartType> xChartType = getChartType(css::uno::Reference<css::chart2::XChartDocument>(getModel(), uno::UNO_QUERY));
     switch (eObjectID)
     {
         case OBJECTTYPE_DATA_SERIES:
@@ -330,7 +330,7 @@ OUString ChartController::GetContextName()
         case OBJECTTYPE_GRID:
             return OUString("Grid");
         case OBJECTTYPE_DIAGRAM:
-            if (xChartType->getChartType() == "com.sun.star.chart2.PieChartType")
+            if (xChartType.is() && xChartType->getChartType() == "com.sun.star.chart2.PieChartType")
                 return OUString("ChartElements");
             break;
         case OBJECTTYPE_DATA_CURVE:


More information about the Libreoffice-commits mailing list