summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-08-14 13:45:38 +0200
committerLászló Németh <nemeth@numbertext.org>2020-08-19 10:31:51 +0200
commita8950d08a33e7aded31d4591c98a03d1edf8c5a4 (patch)
tree7b8d50403c2207c25e6dd5ff75e1f25297389ecf /oox
parent6724040e61c1efbee0b1456e3480b1e7b0827732 (diff)
tdf#123647 Chart XLSX export: fix missing empty chart
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ab8458d44b04..5ea054d83ca0 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1380,6 +1380,11 @@ void ChartExport::exportPlotArea( const Reference< css::chart::XChartDocument >&
// chart type
const Sequence< Reference< chart2::XCoordinateSystem > >
aCooSysSeq( xBCooSysCnt->getCoordinateSystems());
+
+ // tdf#123647 Save empty chart as empty bar chart.
+ if (!aCooSysSeq.hasElements())
+ exportBarChart(nullptr);
+
for( const auto& rCS : aCooSysSeq )
{
Reference< chart2::XChartTypeContainer > xCTCnt( rCS, uno::UNO_QUERY );