Created attachment 102051 [details]
Steps to reproduce :
1] Open attached DOCX in LibreOffice
2] Perform save_as DOCX
3] Open saved file in MS Office 2010
Current behavior :
File gets corrupted
Expected behavior :
File should open without any warning or error.
Operating System: All
Version: 126.96.36.199.alpha0+ Master
Rohit Deshmukh committed a patch related to this issue.
It has been pushed to "master":
fdo#80748: Fix for file corruption due to framePr
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:
Affected users are encouraged to test the fix and report feedback.
Created attachment 126462 [details]
FDO78590b.docx - with paragraphs above and below the graphic (lost when roundtripped)
The fix in comment 1 causes one paragraph to disappear each time LO saves the file, so both the "Before graphic" and "After graphic" paragraphs will be deleted after a couple of round-trips.
This fix just throws information away to avoid corruption. It looks like a couple of "w:pict"s eventually get converted into a couple of "mc:AlternateContent" by the second save, and that is likely what is causing the corruption. MergeMarks::IGNORE discards the pict information (as well as anything else) and so avoids corruption, but introduces data loss.
(In reply to Commit Notification from comment #1)
The unit-test referred to in the commit is from bug 78590 and was a copy/paste of the model unit-test above it. The description was left unchanged, so it doesn't at all reflect what is being tested.
Regression now fixed: