sc/source/filter/xcl97/xcl97rec.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 2081ab036bfd203d4d3be07064ef783baae97c3b Author: Serge Krot <serge.k...@cib.de> AuthorDate: Thu Jun 4 11:14:39 2020 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Sat Jun 6 02:25:05 2020 +0200 tdf#133595 FILESAVE XLSX: invalid content when opening file with shape Change-Id: I67fe29bbc9b982328a3efe63874922e7ed1a5854 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95490 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 0580e30bbbae..4f114bbbd04f 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -278,6 +278,21 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm ) void SaveFormControlObjects(XclExpObjList& rList, XclExpXmlStream& rStrm) { + bool hasControls = false; + for (const auto& rxObj : rList) + { + if (IsFormControlObject(rxObj.get())) + { + hasControls = true; + break; + } + } + + if (!hasControls) + { + return; + } + sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream(); rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits