Kaydet (Commit) b937c6de authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 33c0a646
...@@ -68,6 +68,9 @@ bool DateHelper::IsLessThanOneYearAway( const Date& rD1, const Date& rD2 ) ...@@ -68,6 +68,9 @@ bool DateHelper::IsLessThanOneYearAway( const Date& rD1, const Date& rD2 )
double DateHelper::RasterizeDateValue( double fValue, const Date& rNullDate, long TimeResolution ) 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)); Date aDate(rNullDate); aDate.AddDays(::rtl::math::approxFloor(fValue));
switch(TimeResolution) switch(TimeResolution)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment