[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Caolán McNamara caolanm at redhat.com
Thu Apr 5 14:35:21 UTC 2018


 sc/source/filter/excel/xichart.cxx |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit ee9d80d6d93afe914097b3f1835777052cc0000d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 26 12:59:14 2018 +0100

    forcepoint #32 survive missing value range
    
    Change-Id: I90315f0481bf73c4d9071959bf5408f4a2690257
    Reviewed-on: https://gerrit.libreoffice.org/51886
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index db71be8dc037..89bb10efd5a9 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -3370,15 +3370,19 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
         {
             case cssc2::AxisType::CATEGORY:
             case cssc2::AxisType::SERIES:
-                OSL_ENSURE( mxLabelRange, "Missing Label Range" );
                 // #i71684# radar charts have reversed rotation direction
                 if (mxLabelRange)
                     mxLabelRange->Convert( aAxisProp, aScaleData, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR );
+                else
+                    SAL_WARN("sc.filter", "missing LabelRange");
             break;
             case cssc2::AxisType::REALNUMBER:
             case cssc2::AxisType::PERCENT:
                 // #i85167# pie/donut charts have reversed rotation direction (at Y axis!)
-                mxValueRange->Convert( aScaleData, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE );
+                if (mxValueRange)
+                    mxValueRange->Convert( aScaleData, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE );
+                else
+                    SAL_WARN("sc.filter", "missing ValueRange");
             break;
             default:
                 OSL_FAIL( "XclImpChAxis::CreateAxis - unknown axis type" );
@@ -3427,12 +3431,18 @@ void XclImpChAxis::ConvertAxisPosition( ScfPropertySet& rPropSet, const XclImpCh
 {
     if( ((GetAxisType() == EXC_CHAXIS_X) && rTypeGroup.GetTypeInfo().mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z) )
     {
-        OSL_ENSURE( mxLabelRange, "Missing Label Range" );
         if (mxLabelRange)
             mxLabelRange->ConvertAxisPosition( rPropSet, rTypeGroup.Is3dChart() );
+        else
+            SAL_WARN("sc.filter", "missing LabelRange");
     }
     else
-        mxValueRange->ConvertAxisPosition( rPropSet );
+    {
+        if (mxValueRange)
+            mxValueRange->ConvertAxisPosition( rPropSet );
+        else
+            SAL_WARN("sc.filter", "missing ValueRange");
+    }
 }
 
 void XclImpChAxis::ReadChAxisLine( XclImpStream& rStrm )


More information about the Libreoffice-commits mailing list