summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-22 06:22:45 +0100
committerEike Rathke <erack@redhat.com>2015-01-07 14:13:27 +0000
commit97b85e69a1585c366907584751c869f45062ec43 (patch)
tree7549c37be2686463a9d33afcea9f63a218563cde
parent0095c410c5a47aef2fa28b69412067a8aa6a89a1 (diff)
fix another validation error for OOXML, related fdo#40746
e.g. exporting fdo40746-2.ods as OOXML Change-Id: I8a19ec2caecbc3687229d820ac2ec11fc01facd1 Reviewed-on: https://gerrit.libreoffice.org/13588 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/filter/excel/xelink.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index d9c2196ef57d..fe43ee7d2fd8 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -241,7 +241,7 @@ protected:
/** Writes the list of externalName elements. */
void WriteExtNameBufferXml( XclExpXmlStream& rStrm );
-private:
+protected:
typedef boost::shared_ptr< XclExpExtNameBuffer > XclExpExtNameBfrRef;
XclExpExtNameBfrRef mxExtNameBfr; /// List of EXTERNNAME records.
};
@@ -1680,14 +1680,18 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
}
- pExternalLink->startElement( XML_sheetDataSet, FSEND);
+ if (!maXctList.IsEmpty() || mxExtNameBfr)
+ {
+ pExternalLink->startElement( XML_sheetDataSet, FSEND);
- // sheetData elements
- maXctList.SaveXml( rStrm );
- // externalName elements
- WriteExtNameBufferXml( rStrm );
+ // sheetData elements
+ maXctList.SaveXml( rStrm );
+ // externalName elements
+ WriteExtNameBufferXml( rStrm );
- pExternalLink->endElement( XML_sheetDataSet);
+ pExternalLink->endElement( XML_sheetDataSet);
+
+ }
pExternalLink->endElement( XML_externalBook);
pExternalLink->endElement( XML_externalLink);
}