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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 1 21:38:47 UTC 2019


 chart2/source/view/charttypes/BarChart.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit b8d2d78974fcb3e95de87dd98103e5bc015b7687
Author:     Jozsef Szakacs <zmx3 at citromail.hu>
AuthorDate: Mon Dec 17 11:42:23 2018 +0100
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Tue Jan 1 22:38:25 2019 +0100

    tdf#114141 draw the top of the zero height 3D bars
    
    in bar charts, instead of leaving an empty place
    at the zero data point.
    
    Note: This is an initial workaround for the
    interoperability problem. We need a new LibreOffice
    chart option or setting to support both ways of data
    visualization.
    
    Change-Id: I5c04a265ffe1392f659097054ab11a23374e88b7
    Reviewed-on: https://gerrit.libreoffice.org/65269
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 42741fb37a2e..b3d27a933d7a 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -685,6 +685,11 @@ void BarChart::createShapes()
                             fLogicBarHeight = 0.0;
                     }
 
+                    // tdf#114141 to draw the top of the zero height 3D bar
+                    // we set a small positive value, here the smallest one for the type double (DBL_MIN)
+                    if( fLogicBarHeight == 0.0 )
+                        fLogicBarHeight = DBL_MIN;
+
                     //sort negative and positive values, to display them on different sides of the x axis
                     bool bPositive = fLogicBarHeight >= 0.0;
                     double fLowerYValue = bPositive ? fPositiveLogicYForNextSeries : fNegativeLogicYForNextSeries;


More information about the Libreoffice-commits mailing list