diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-15 11:18:06 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-01-15 19:06:43 +0100 |
commit | d86650835705a426397bbe292bfc221604f89b20 (patch) | |
tree | 43110812166b30573a8185f094ca2f2819b318fd | |
parent | 9a026f62bab0cc181ae58c880967ffd75ef06f5e (diff) |
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.mcnamara@collabora.com>
(cherry picked from commit 6da480d086a599f6a0159c5244ce8fe0ae4131b8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162103
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Justin Luth <jluth@mail.com>
-rw-r--r-- | oox/source/export/chartexport.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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); |