oox/source/export/chartexport.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 6da480d086a599f6a0159c5244ce8fe0ae4131b8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Jan 15 11:18:06 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Jan 15 14:13:02 2024 +0100 crashtesting: null deref of xValueSeq since: commit 0bf4338cfe406a0d527ac78ce76ff7dd3837df03 (HEAD) Date: Mon Jan 8 13:52:03 2024 -0500 tdf#137691 chart2 export: preserve NumberFormat of DataSeries make CppunitTest_chart2_export3 CPPUNIT_TEST_NAME=tdf137691 Change-Id: Ibd65207b01885961f207da04204e7e2512c20d9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162083 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 7de4cee0c4c0..c80e8c1ba688 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2959,7 +2959,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen pFS->startElement(FSNS(XML_c, XML_numCache)); pFS->startElement(FSNS(XML_c, XML_formatCode)); OUString sNumberFormatString("General"); - const sal_Int32 nKey = xValueSeq->getNumberFormatKeyByIndex(-1); + const sal_Int32 nKey = xValueSeq.is() ? xValueSeq->getNumberFormatKeyByIndex(-1) : 0; if (nKey > 0) sNumberFormatString = getNumberFormatCode(nKey); pFS->writeEscaped(sNumberFormatString);