sw/source/filter/ww8/docxattributeoutput.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 28207c36c3b68af1d09f68e1ae022b21cda976c5 Author: Jacobo Aragunde Pérez <jaragu...@igalia.com> Date: Fri May 23 16:51:28 2014 +0200 sw: Properly embed .xls sheets in .docx documents Word requires exactly the right relationship and content types to open embedded documents properly. The case of xls sheets is different from xlsx so we added it to the exporter. We know if the file is a xls or xlsx using the ProgID field: ProgID="Excel.Sheet.8" -> Excel version 8 -> xls ProgID="Excel.Sheet.12" -> Excel version 12 -> xlsx Change-Id: I80bae0eadd4af2fb9793c8f6581b3f288fb42c09 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8a2ac9d..8e3a435 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4197,12 +4197,18 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S aObjectsInteropList[i].Value >>= sProgID; break; } - if( sProgID.startsWith("Excel.Sheet") ) + if( sProgID == "Excel.Sheet.12" ) { sMediaType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"; sFileExtension = "xlsx"; } + else if( sProgID.startsWith("Excel.Sheet") ) + { + sMediaType = "application/vnd.ms-excel"; + sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"; + sFileExtension = "xls"; + } else if( sProgID.startsWith("PowerPoint.Show") ) { sMediaType = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits