summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDushyant Bhalgami <dushyant.bhalgami@synerzip.com>2014-07-04 13:35:54 +0530
committerMichael Stahl <mstahl@redhat.com>2014-07-11 13:23:47 +0200
commit6b76a1855a60fce90eb09e3d40a79dca0c5901bd (patch)
tree3117a2bb31bf016297d4d5eb02de246960a24a42
parent1f9e3661ee2ca8334dc228c65cfc23442c2a9c39 (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> (cherry picked from commit 163b5fd59fe1e9b8c8a1bcac9dab069c0bcd27e9) Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80898.docxbin0 -> 21989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx14
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
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
new file mode 100644
index 000000000000..d4b9e1f23a13
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80898.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index da32d577fa29..312d9d9b6b9c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3595,6 +3595,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 0e7538a68625..3b71536b7bdc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4199,6 +4199,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";