Download it now!
Bug 91064 - FILESAVE: Docx Corrupted on Round-Trip
Summary: FILESAVE: Docx Corrupted on Round-Trip
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) Master
Hardware: Other All
: highest critical
Assignee: Not Assigned
Whiteboard: target:5.0.0
Keywords: regression
Depends on:
Reported: 2015-05-04 06:21 UTC by Luke
Modified: 2015-05-15 18:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Empty document saved as docx from Office 2013 (10.94 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-05-09 19:21 UTC, Luke

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2015-05-04 06:21:57 UTC
Steps to reproduce:
1. Open any Word Docx with a Chart such as attachment 115115 [details] or attachment 97015 [details] in a recent 5.0 build of Calc
2. Save as Docx
3. Open in MS Word
4. Repeat Steps 1-3 in build of Calc before 2015-04-23

In recent builds, Words says "We're sorry. We can't open 016.docx because we found a problem with its contents. 
The file is corrupt and cannot be opened."

Build ID: 93f0b14458a618ad575cd446680e5c4aa7d87bdc

I have to boot into Windows to bisect this bug. Is there a tinderbox that saves Windows builds for more than a few days?
Comment 1 Luke 2015-05-04 10:12:22 UTC
Before the windows tinderbox builds faded into the ether, I bisected this down to: 

Build ID: 0ecf20cd185813327613c01bc6cbff9721cef1f1

Build ID: 393c51cee8bc3de5a2a9f4e04161c59e8712f631

possible culprit:

Miklos what do you think? Also I was testing against MSO 2013.
Comment 2 Luke 2015-05-04 22:31:27 UTC
A quick way to reproduce this bug is in Writer
1. Create a blank file 
2. "save as" DOCX 
3. Open in Word 2013

Verified this is caused by:

Last known good commit:
Comment 3 Radu 2015-05-07 07:33:57 UTC
Luke please add an empty document saved as docx from Office 2013. Thank you!
Comment 4 Yousuf Philips (jay) (retired) 2015-05-07 11:56:48 UTC
Tested this with all the below combinations and MS Word gave an error each time saying that it doesnt understand the version number and could couldnt open it or would repair the file. Seems the AppVersion tag is exclusive to MSO version numbers.$Linux_x86 LibreOffice_project/1aa43709f1eafe76bb5b2c658bf88c16bb73ea4f$Linux_x86 LibreOffice_project



Comment 5 Luke 2015-05-09 19:21:05 UTC
Created attachment 115477 [details]
Empty document saved as docx from Office 2013
Comment 6 Jorendc 2015-05-10 18:10:18 UTC
(In reply to Luke from comment #2)
> Verified this is caused by:
> ?id=480ca7434a330b2678f9ef287cffd6d9cf27bed5

Indeed, reverting this commit resolves the problem

Kind regards,
Comment 7 Luke 2015-05-12 20:15:07 UTC
Jay and Radu,
If you don't have an immediate fix for this issue, can you please revert commit 480ca7434a330b2678f9ef287cffd6d9cf27bed5? Markus is in the midst of a major cleanup of the chart OOXML export code, but I have no way of testing if his fixes also also working in MSO.
Comment 8 Commit Notification 2015-05-15 18:16:36 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "master":

tdf#91064: Revert "tdf#89790 DOCX: saving LO version number in app.xml"

It will be available in 5.0.0.

The patch should be included in the daily builds available at in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 9 Jorendc 2015-05-15 18:17:51 UTC
Patch reverted. It looks like Microsoft only accept it own versions.
Nice work though Radu!

Kind regards,