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@googlemail.com>
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 42741fb..b3d27a9 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -685,6 +685,11 @@
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;