Bug 116301 - FILESAVE Diagram layout is saved with incorrect content type in DOCX
Summary: FILESAVE Diagram layout is saved with incorrect content type in DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All All
: low trivial
Assignee: Aron Budea
URL:
Whiteboard: target:6.1.0
Keywords: filter:docx
Depends on:
Blocks:
 
Reported: 2018-03-09 02:50 UTC by Aron Budea
Modified: 2018-03-09 04:53 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-03-09 02:50:38 UTC
Open and save attachment 81684 [details] again as DOCX in Writer.
Extract [Content_Types].xml, and note the following XML element:
<Override PartName="/word/diagrams/drawing2.xml" ContentType="application/vnd.openxmlformats-officedocument.drawingml.diagramDrawing+xml"/>

The original DOCX has the following instead:
<Override PartName="/word/diagrams/drawing1.xml" ContentType="application/vnd.ms-office.drawingml.diagramDrawing+xml"/>

The ContentType attribute, which is defined as an extension in MS-ODRAWXML is wrong after roundtrip:
https://msdn.microsoft.com/en-us/library/dd910819(v=office.12).aspx

The roundtripped file can be opened fine in Word, but LO should write the correct content type nevertheless. The document with the incorrect content type can't be opened with Open XML SDK 2.5 Productivity Tool.

Observed using LO 6.0.2.1 / Windows 7.
Comment 1 Commit Notification 2018-03-09 04:47:42 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=612ed5e752a0b317cf63a27ff1bb663a774022ef

tdf#116301: write correct content type for diagramDrawing

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.