Created attachment 102051 [details] Original file 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: 4.4.0.0.alpha0+ Master
Rohit Deshmukh committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=83d51e5e52688c4c9bc0ad70a511458bb06a242d 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: http://wiki.documentfoundation.org/Testing_Daily_Builds 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: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b927c1f4b334f80d2c2965e5b7327d6b6a685105