diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-29 19:07:21 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-29 23:31:49 +0100 |
commit | b937c6deb2e5610c26dc7082fcdbb0f4835ecd99 (patch) | |
tree | 04157f23900f74caa3467b69d08f0985ceeea2f3 | |
parent | 33c0a64650646fc542a104f025abbf30d1b7628f (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>
-rw-r--r-- | chart2/source/view/axes/DateHelper.cxx | 3 |
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) { |