oox/source/export/chartexport.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 27338affafc845b37bb59c9ad2bf1a35a0f07c0c Author: Caolán McNamara <[email protected]> AuthorDate: Mon Jan 15 11:18:06 2024 +0000 Commit: Michael Stahl <[email protected]> CommitDate: Tue Jan 16 13:39:13 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 <[email protected]> (cherry picked from commit 6da480d086a599f6a0159c5244ce8fe0ae4131b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162103 Reviewed-by: Xisco Fauli <[email protected]> Reviewed-by: Justin Luth <[email protected]> (cherry picked from commit 1a64228c8fa995cfb068dbb719caf4e6f5bfa7cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162106 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]> 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);
