diff options
author | Dushyant Bhalgami <dushyant.bhalgami@synerzip.com> | 2014-07-04 13:35:54 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-07 07:23:54 +0000 |
commit | 163b5fd59fe1e9b8c8a1bcac9dab069c0bcd27e9 (patch) | |
tree | 8cfad734032e4e481891d682c136e1c0e5e845ab | |
parent | 624892d06d8a8b6b5aff115f6d0c1ae2439b6517 (diff) |
fdo#80898:Fix for embedded obj 97-2003 MS Doc File
Added implementation for embedded Word 97-2003 document.
Change-Id: I47ec39f25beee9a37f2a1e914384bc458df31b78
Reviewed-on: https://gerrit.libreoffice.org/10078
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo80898.docx | bin | 0 -> 21989 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80898.docx b/sw/qa/extras/ooxmlexport/data/fdo80898.docx Binary files differnew file mode 100644 index 000000000000..d4b9e1f23a13 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo80898.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 30ced5b81757..a1bf053c8d5e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3731,6 +3731,20 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80523_sldm,"fdo80523_sldm.docx") "/word/embeddings/oleObject1.sldm"); } +DECLARE_OOXMLEXPORT_TEST(testfdo80898, "fdo80898.docx") +{ + // This UT for DOCX embedded with binary excel work sheet. + xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml"); + + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Override[@ContentType='application/msword']", + "PartName", + "/word/embeddings/oleObject1.doc"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index ebe556d8fd7e..937a3375e1b8 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4407,6 +4407,13 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"; sFileExtension = "docm"; } + //Implementation for embedded Word 97-2003 document was missing + else if( sProgID == "Word.Document.8" ) + { + sMediaType = "application/msword"; + sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"; + sFileExtension = "doc"; + } else { sMediaType = "application/vnd.openxmlformats-officedocument.oleObject"; |