From a8950d08a33e7aded31d4591c98a03d1edf8c5a4 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Fri, 14 Aug 2020 13:45:38 +0200 Subject: tdf#123647 Chart XLSX export: fix missing empty chart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Save empty chart as empty bar chart, because a chart without chart type is invalid. Change-Id: Ieb9cc4300070b5280565fe814ba0343640dfff0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100844 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh --- sc/source/filter/xcl97/xcl97rec.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sc') diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 213dfe77d4ae..0f9ba1288d33 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -202,9 +202,11 @@ bool IsValidObject( const XclObj& rObj ) if (!xCooSysContainer.is()) return false; - const uno::Sequence > xCooSysSeq = xCooSysContainer->getCoordinateSystems(); - if (!xCooSysSeq.hasElements()) - return false; + const uno::Sequence> xCooSysSeq = xCooSysContainer->getCoordinateSystems(); + + // tdf#123647 Save empty charts too. + // if (!xCooSysSeq.hasElements()) + // return false; for (const auto& rCooSys : xCooSysSeq) { @@ -212,7 +214,7 @@ bool IsValidObject( const XclObj& rObj ) if (!xChartTypeCont.is()) return false; - uno::Sequence > xChartTypeSeq = xChartTypeCont->getChartTypes(); + uno::Sequence> xChartTypeSeq = xChartTypeCont->getChartTypes(); if (!xChartTypeSeq.hasElements()) // No chart type. Not good. return false; -- cgit