[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Wed Jan 7 06:13:58 PST 2015


 sc/source/filter/excel/xelink.cxx |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 97b85e69a1585c366907584751c869f45062ec43
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Dec 22 06:22:45 2014 +0100

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index d9c2196..fe43ee7 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);
 }


More information about the Libreoffice-commits mailing list