summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2020-06-04 11:14:39 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-06-06 02:25:05 +0200
commit2081ab036bfd203d4d3be07064ef783baae97c3b (patch)
tree8835723ef8b863a0bf7a1641bded52fb1b3009e9 /sc
parentbfb807bf6cf07243a88dc1e66883dfcea872ceab (diff)
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.Behrens@CIB.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx15
1 files changed, 15 insertions, 0 deletions
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),