summaryrefslogtreecommitdiff
path: root/oox/source/export/chartexport.cxx
diff options
context:
space:
mode:
authorsushil_shinde <sushil.shinde@synerzip.com>2014-03-19 18:34:45 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-23 11:02:16 +0100
commit23b65a84fd827555dfb84c7e2f78879c479c2f78 (patch)
tree67268495c42ca6639ab4e76d27eff53319c017d6 /oox/source/export/chartexport.cxx
parentcfde7ea8ee8526a66db22d690ef2de0f43c76d0b (diff)
fdo#76356 : Docx file contianing chart in footer/header gets corrupted.
- Docx file with chart in footer/header or .bin file referred in chart was getting corrupted. - Embedded file for footer.xml was not grabbaged. - .bin embedded files were not grab baged. - Added grab bag support for both case. - Added UT to check .bin files are grab baged properly. Reviewed on: https://gerrit.libreoffice.org/8674 Change-Id: I221e3867798fc2a3a42f6385d687e80b80a3678f
Diffstat (limited to 'oox/source/export/chartexport.cxx')
-rw-r--r--oox/source/export/chartexport.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 91d761f55ca2..0d30e29d1b42 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -801,8 +801,12 @@ void ChartExport::exportExternalData( Reference< ::com::sun::star::chart::XChart
}
}
FSHelperPtr pFS = GetFS();
+ OUString type = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
+ if (relationPath.endsWith(OUString(".bin")))
+ type = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
+
OUString sRelId = GetFB()->addRelation(pFS->getOutputStream(),
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package",
+ type,
relationPath);
pFS->singleElementNS( XML_c, XML_externalData,
FSNS(XML_r, XML_id), OUStringToOString(sRelId, RTL_TEXTENCODING_UTF8),