Description: Writer generates a wrong DOCX and MS Word can't open it Steps to Reproduce: 1. Open the file from attach in LO 7 2. Save it as DOCX with another name 3. Try open a new DOCX in MS Word. You'll see a message with error and Word will not open the file Actual Results: MS Word can't open a DOCX file that LO made Expected Results: MS Word opens a DOCX file that LO made Reproducible: Always User Profile Reset: No Additional Info: Version: 7.0.0.1 (x64) Build ID: 04ba7e3f1e51af6c5d653e543a620e36719083fd Потоков ЦП: 4; ОС: Windows 10.0 Build 18362; Отрисовка ИП: по умолчанию; VCL: win Locale: ru-RU (ru_RU); ИП: ru-RU Calc: threaded
repro in 6.3 but not in 6.2 =>regression
Created attachment 164445 [details] example DOCX
Confirmed with LO 7.1.0.0.alpha0+ daily build from 08-15 / Windows.
I bisected it and got bad commit aafaf1f55fa413ad49d4556cf7c0a713dd206ae4 https://gerrit.libreoffice.org/c/core/+/69598 CC: to Miklos Vajna and Grzegorz Araminowicz
LO also complains about this document being wrong. The problem is in header1.xml. After the final </w:hdr> we have this extra stuff tacked on at the end. <wp:docPr id="2" name="Diagram2"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/diagram"><dgm:relIds xmlns:dgm="http://schemas.openxmlformats.org/drawingml/2006/diagram" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:dm="rId2" r:lo="rId3" r:qs="rId4" r:cs="rId5"/></a:graphicData></a:graphic>
oox's WriteDialog just writes to mpFS. writerfilter is not setting that FS before calling the function. so - sax_fastparser::FSHelperPtr pFS = m_pImpl->getSerializer(); should have been replaced by + m_pImpl->getDrawingML()->SetFS(m_pImpl->getSerializer()); Proposed fix at http://gerrit.libreoffice.org/c/core/+/125441
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0afd2d3bfa9d55249ffd1408681ff04decf2d8fa tdf#135906 docxexport: set serializer before writing It will be available in 7.3.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/5853e4d137c3cb535571cba0233b05a48761ac52 tdf#135906 docxexport: set serializer before writing It will be available in 7.2.4. 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.
7.2.4 was a hotfix release, updating target in status-whiteboard