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

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


 sc/source/filter/excel/xelink.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 0095c410c5a47aef2fa28b69412067a8aa6a89a1
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Dec 22 06:18:07 2014 +0100

    fix OOXML validation error, related fdo#40746
    
    e.g. fdo40746-2.ods exported to OOXML
    
    Change-Id: I48bc7a7d21ddc00eceaeb09970a2b1a60330fbf0
    Reviewed-on: https://gerrit.libreoffice.org/13587
    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 bd34008..d9c2196 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1667,14 +1667,18 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
             FSNS(XML_r, XML_id),    XclXmlUtils::ToOString( sId ).getStr(),
             FSEND);
 
-    pExternalLink->startElement( XML_sheetNames, FSEND);
-    for (size_t nPos = 0, nSize = maXctList.GetSize(); nPos < nSize; ++nPos)
+    if (!maXctList.IsEmpty())
     {
-        pExternalLink->singleElement( XML_sheetName,
-                XML_val,    XclXmlUtils::ToOString( maXctList.GetRecord( nPos )->GetTabName()).getStr(),
-                FSEND);
+        pExternalLink->startElement( XML_sheetNames, FSEND);
+        for (size_t nPos = 0, nSize = maXctList.GetSize(); nPos < nSize; ++nPos)
+        {
+            pExternalLink->singleElement( XML_sheetName,
+                    XML_val,    XclXmlUtils::ToOString( maXctList.GetRecord( nPos )->GetTabName()).getStr(),
+                    FSEND);
+        }
+        pExternalLink->endElement( XML_sheetNames);
+
     }
-    pExternalLink->endElement( XML_sheetNames);
 
     pExternalLink->startElement( XML_sheetDataSet, FSEND);
 


More information about the Libreoffice-commits mailing list