[Libreoffice-commits] core.git: sw/qa sw/source
Dushyant Bhalgami
dushyant.bhalgami at synerzip.com
Mon Jul 7 00:24:19 PDT 2014
sw/qa/extras/ooxmlexport/data/fdo80898.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 14 ++++++++++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 7 +++++++
3 files changed, 21 insertions(+)
New commits:
commit 163b5fd59fe1e9b8c8a1bcac9dab069c0bcd27e9
Author: Dushyant Bhalgami <dushyant.bhalgami at synerzip.com>
Date: Fri Jul 4 13:35:54 2014 +0530
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 at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80898.docx b/sw/qa/extras/ooxmlexport/data/fdo80898.docx
new file mode 100644
index 0000000..d4b9e1f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo80898.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 30ced5b..a1bf053 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 ebe556d..937a337 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";
More information about the Libreoffice-commits
mailing list