Kaydet (Commit) 5943e74f authored tarafından yogesh.bharate001's avatar yogesh.bharate001 Kaydeden (comit) Andras Timar

tdf#92754: Excel Chart content type is not exported properly.

Problem Description :
- Excel chart contenttype is not exported properly,
it exported the .xls file as .bin file.
- Due to this when we open the roundtrip file back in MS Office,
the embedded excel chart is not open and gives ERROR.

Solution : Added support for embedded .xls for docx file.

Change-Id: I16e18ffa4f6c72526665ff9d34d6c6053278c2c5
Reviewed-on: https://gerrit.libreoffice.org/17066Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 0f64e580)
Signed-off-by: 's avatarMichael Stahl <mstahl@redhat.com>
(cherry picked from commit e190f4c5)
üst 45c237cc
......@@ -800,7 +800,19 @@ DECLARE_OOXMLEXPORT_TEST(testSimpleSdts, "simple-sdts.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:picture", 1);
assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:group", 1);
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:citation", 1);
}
DECLARE_OOXMLEXPORT_TEST(testEmbeddedExcelChart, "EmbeddedExcelChart.docx")
{
xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");
if (!pXmlDoc) // only test the export, not initial import
return;
assertXPath(pXmlDoc,
"/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.xls']",
"ContentType",
"application/vnd.ms-excel");
}
DECLARE_OOXMLEXPORT_TEST(testTdf83227, "tdf83227.docx")
......
......@@ -4763,6 +4763,12 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
sFileExtension = "doc";
}
else if( sProgID == "Excel.Chart.8" )
{
sMediaType = "application/vnd.ms-excel";
sRelationType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
sFileExtension = "xls";
}
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