[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Tue Aug 12 05:01:44 PDT 2014


 sc/source/filter/excel/excdoc.cxx |    2 --
 sc/source/filter/excel/xelink.cxx |    5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 8c51532289db36337c4984baec1bf5a7ca9e40af
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 12 13:53:11 2014 +0200

    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

diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 8dd2b15..416e411 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -371,11 +371,9 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
         // COUNTRY - in BIFF8 in workbook globals
         Add( new XclExpCountry( GetRoot() ) );
 
-        aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_externalReferences ) );
         // link table: SUPBOOK, XCT, CRN, EXTERNNAME, EXTERNSHEET, NAME
         aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) );
         aRecList.AppendRecord( CreateRecord( EXC_ID_NAME ) );
-        aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_externalReferences ) );
 
         if( GetOutput() != EXC_OUTPUT_BINARY )
             lcl_AddCalcPr( aRecList, *this );
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 0a54a6f..f4c4224 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -2454,9 +2454,14 @@ void XclExpLinkManagerImpl8::SaveXml( XclExpXmlStream& rStrm )
 {
     if( !maXtiVec.empty() )
     {
+        sax_fastparser::FSHelperPtr pWorkbook = rStrm.GetCurrentStream();
+        pWorkbook->startElement( XML_externalReferences, FSEND);
+
         // externalLink, externalBook, sheetNames, sheetDataSet, externalName
         maSBBuffer.SaveXml( rStrm );
 
+        pWorkbook->endElement( XML_externalReferences);
+
         // TODO: equivalent for EXTERNSHEET in OOXML?
 #if 0
         for( XclExpXtiVec::const_iterator aIt = maXtiVec.begin(), aEnd = maXtiVec.end(); aIt != aEnd; ++aIt )


More information about the Libreoffice-commits mailing list