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

Marco Cecchetti marco.cecchetti at collabora.com
Thu Aug 10 14:10:01 UTC 2017


 chart2/source/view/charttypes/PieChart.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit f44e218ac77e1a6125e645a44c801808df99c7f0
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Tue Aug 8 13:04:02 2017 +0200

    bug fix: tdf#111173
    
    Mostly based on patch by Julien Nabet:
    http://bugs.documentfoundation.org/attachment.cgi?id=135107
    
    Thanks Julien!
    
    Change-Id: I02440be7dfa5881e5bf63710a9d3c4f261d00533
    Reviewed-on: https://gerrit.libreoffice.org/40877
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit 05c3791710397346aae0b2a9cca1792567941d62)
    Reviewed-on: https://gerrit.libreoffice.org/40898
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 669143f26277..de8a2375fe3c 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -355,8 +355,13 @@ void PieChart::createTextLabelShape(
     ///a new `PieLabelInfo` instance is initialized with all the info related to
     ///the current label in order to simplify later label position rearrangement;
     uno::Reference< container::XChild > xChild( aPieLabelInfo.xTextShape, uno::UNO_QUERY );
-    if( xChild.is() )
-        aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), uno::UNO_QUERY );
+
+    ///text shape could be empty; in that case there is no need to add label info
+    if( !xChild.is() )
+        return;
+
+    aPieLabelInfo.xLabelGroupShape.set( xChild->getParent(), uno::UNO_QUERY );
+
     aPieLabelInfo.fValue = nVal;
     aPieLabelInfo.bMovementAllowed = bMovementAllowed;
     aPieLabelInfo.bMoved= false;
@@ -367,9 +372,7 @@ void PieChart::createTextLabelShape(
         performLabelBestFit(rParam, aPieLabelInfo);
     }
 
-
     m_aLabelInfoList.push_back(aPieLabelInfo);
-
 }
 
 void PieChart::addSeries( VDataSeries* pSeries, sal_Int32 /* zSlot */, sal_Int32 /* xSlot */, sal_Int32 /* ySlot */ )


More information about the Libreoffice-commits mailing list