Open the issue file in LO. > Save file as docx > Open the saved file in MS WORD 2010 Expected Result :: File Opens without corruption on Word Actual Result :: File is shown as corrupt on Word Root Cause:- In the original file /word/header2.xml there is an SDT and, a drawing which has a PAGE field. In RT file there are two SDTs instead of one as in the original.
Created attachment 105232 [details] Optimized file
Created attachment 105233 [details] Issue File
Confirmed on Windows with master, 4.1.6 and 3.6.7. Word 2013 gives an error but if you go through the error messages, the file opens fine.
Vinaya Mandke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e6b295e55d82f236206c24f5cf1dcc314c34b20f fdo#83057 File corrupts on save, as SDT is added incorrectly 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.
Patch merged + unit test -> RESOLVED FIXED.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/914d246e0edcbdfa5969b7f3eea7c67e1a5b7522 crashtesting: fix PDF export of fdo83057-2.docx It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.