Kaydet (Commit) 8c515322 authored tarafından Eike Rathke's avatar Eike Rathke

do not write empty externalReferences element, fdo#45286 follow-up

OOXML validation spewed
- (xl/workbook.xml:2 col:700) cvc-complex-type.2.4.b: The content of
  element ´externalReferences´ is not complete. One of
  ´{"http://schemas.openxmlformats.org/spreadsheetml/2006/main":externalReference}´
  is expected.

Change-Id: I80552a0e9ffcc201d0462ac20ce37f6657e43587
üst 382ad738
...@@ -371,11 +371,9 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList ) ...@@ -371,11 +371,9 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
// COUNTRY - in BIFF8 in workbook globals // COUNTRY - in BIFF8 in workbook globals
Add( new XclExpCountry( GetRoot() ) ); Add( new XclExpCountry( GetRoot() ) );
aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_externalReferences ) );
// link table: SUPBOOK, XCT, CRN, EXTERNNAME, EXTERNSHEET, NAME // link table: SUPBOOK, XCT, CRN, EXTERNNAME, EXTERNSHEET, NAME
aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) ); aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) );
aRecList.AppendRecord( CreateRecord( EXC_ID_NAME ) ); aRecList.AppendRecord( CreateRecord( EXC_ID_NAME ) );
aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_externalReferences ) );
if( GetOutput() != EXC_OUTPUT_BINARY ) if( GetOutput() != EXC_OUTPUT_BINARY )
lcl_AddCalcPr( aRecList, *this ); lcl_AddCalcPr( aRecList, *this );
......
...@@ -2454,9 +2454,14 @@ void XclExpLinkManagerImpl8::SaveXml( XclExpXmlStream& rStrm ) ...@@ -2454,9 +2454,14 @@ void XclExpLinkManagerImpl8::SaveXml( XclExpXmlStream& rStrm )
{ {
if( !maXtiVec.empty() ) if( !maXtiVec.empty() )
{ {
sax_fastparser::FSHelperPtr pWorkbook = rStrm.GetCurrentStream();
pWorkbook->startElement( XML_externalReferences, FSEND);
// externalLink, externalBook, sheetNames, sheetDataSet, externalName // externalLink, externalBook, sheetNames, sheetDataSet, externalName
maSBBuffer.SaveXml( rStrm ); maSBBuffer.SaveXml( rStrm );
pWorkbook->endElement( XML_externalReferences);
// TODO: equivalent for EXTERNSHEET in OOXML? // TODO: equivalent for EXTERNSHEET in OOXML?
#if 0 #if 0
for( XclExpXtiVec::const_iterator aIt = maXtiVec.begin(), aEnd = maXtiVec.end(); aIt != aEnd; ++aIt ) for( XclExpXtiVec::const_iterator aIt = maXtiVec.begin(), aEnd = maXtiVec.end(); aIt != aEnd; ++aIt )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment