summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-29 19:07:21 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-29 23:31:49 +0100
commitb937c6deb2e5610c26dc7082fcdbb0f4835ecd99 (patch)
tree04157f23900f74caa3467b69d08f0985ceeea2f3 /chart2
parent33c0a64650646fc542a104f025abbf30d1b7628f (diff)
related tdf#42915, pass NaN through date transformation
Many places in chart2 use NaN to mean no available value. Not propagating NaN through the helper disables all this functionality. Change-Id: I37f966007b5b7cc16778c5c6903710fbd144631b Reviewed-on: https://gerrit.libreoffice.org/64266 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/axes/DateHelper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/chart2/source/view/axes/DateHelper.cxx b/chart2/source/view/axes/DateHelper.cxx
index 2e1fa3a4b867..6006d3e48bed 100644
--- a/chart2/source/view/axes/DateHelper.cxx
+++ b/chart2/source/view/axes/DateHelper.cxx
@@ -68,6 +68,9 @@ bool DateHelper::IsLessThanOneYearAway( const Date& rD1, const Date& rD2 )
double DateHelper::RasterizeDateValue( double fValue, const Date& rNullDate, long TimeResolution )
{
+ if (rtl::math::isNan(fValue))
+ return fValue;
+
Date aDate(rNullDate); aDate.AddDays(::rtl::math::approxFloor(fValue));
switch(TimeResolution)
{