Files
odfstudio/chart2
Caolán McNamara 4f2ea978af crashtesting: skip non-finite values in chart data table view
crash on saving forum-mso-en4-640039.xlsx (round-trip)

 soffice.bin: engine/tools/source/datetime/ttime.cxx:224:
   static void tools::Time::GetClock(...): Assertion `fSeconds < 1.0' failed.

 #4  tools::Time::GetClock (fTimeInDays=nan(0x8000000000000), ...)
     at engine/tools/source/datetime/ttime.cxx:224
 #5  SvNumberformat::ImpGetTimeOutput at engine/svl/source/numbers/zformat.cxx:3161
 ... SvNumberFormatter::GetOutputString
 #9  chart::NumberFormatterWrapper::getFormattedString
     at engine/chart2/source/tools/NumberFormatterWrapper.cxx:130
 #10 chart::VSeriesPlotter::getLabelTextForValue (fValue=nan)
     at engine/chart2/source/view/charttypes/VSeriesPlotter.cxx:371
 #11 chart::DataTableView::initializeValues
     at engine/chart2/source/view/main/DataTableView.cxx:574

The chart's data series carries a NaN at this point (missing data /
formula error). DataTableView::initializeValues iterates every point
unconditionally and feeds the value to the number formatter, if the
point's number format is a date/time/datetime format then that NaN
triggers an assert in Time::GetClock.

The other getLabelTextForValue callers filter missing data earlier, so
skip non-finite values at the data-table-view source.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I99327e590133f3ba52fc6db9bfc153df620b87dd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2059
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 2054a2128fff8028951669aad1f743bc6cff1e83)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204951
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-09 17:37:53 +02:00
..
…
…

Chart Implementation for LibreOffice Calc

The chart2 denotes a second generation re-write done to rid us of the foul and twisted legacy chart code.

Debugging

Shortcuts

CTRL + F12 creates a layout dump based on the XShapeDumper based on SAL_WARN("chart2", ...