summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-03-08 12:24:48 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-08 13:36:24 +0100
commit11c916bf87aac524fa1a833328dc6b7c99a138e4 (patch)
tree2cb820e30a5a973782a577977cdd47d82b8b4d91 /sc
parentf11693d5f99bbb8c9ebcd407bc3b13f05bdbd075 (diff)
oox customXml: Don't write the Relationship to DOCX files twice.
Change-Id: Id3da40138e86c142707e377aa897df372aacb704 Reviewed-on: https://gerrit.libreoffice.org/50943 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx4
-rw-r--r--sc/source/filter/excel/excdoc.cxx3
2 files changed, 6 insertions, 1 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index c013d836fb8b..793b239d510d 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3030,6 +3030,10 @@ void ScExportTest::testCustomXml()
xmlDocPtr pRelsDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, "customXml/_rels/item1.xml.rels");
CPPUNIT_ASSERT(pRelsDoc);
+ // Check there is a relation to itemProps1.xml.
+ assertXPath(pRelsDoc, "/r:Relationships/r:Relationship", 1);
+ assertXPath(pRelsDoc, "/r:Relationships/r:Relationship[@Id='rId1']", "Target", "itemProps1.xml");
+
std::shared_ptr<SvStream> pStream = XPathHelper::parseExportStream(pXPathFile, m_xSFactory, "ddp/ddpfile.xen");
CPPUNIT_ASSERT(pStream);
}
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 70e4d4e68b28..f9ff9a891b55 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -853,7 +853,8 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
- rStrm.exportDocumentProperties( xDocProps );
+ rStrm.exportDocumentProperties(xDocProps);
+ rStrm.exportCustomFragments();
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
rWorkbook->startElement( XML_workbook,