diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-12-22 06:22:45 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-12-22 06:24:13 +0100 |
commit | b241910325456b32c2d3614c2e200305e85a357c (patch) | |
tree | 0ab211c8e247d468a402bc3649b693b4accf068f | |
parent | 3e551da43da5661396fbc2530a203d4774e29f78 (diff) |
fix another validation error for OOXML, related fdo#40746
e.g. exporting fdo40746-2.ods as OOXML
Change-Id: I8a19ec2caecbc3687229d820ac2ec11fc01facd1
-rw-r--r-- | sc/source/filter/excel/xelink.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 8ecef7646664..7cbf9a5b1b91 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); } |