Kaydet (Commit) 163b5fd5 authored tarafından Dushyant Bhalgami's avatar Dushyant Bhalgami Kaydeden (comit) Miklos Vajna

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/10078Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 624892d0
......@@ -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: */
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment