Bug 100581 - Filesave: ODT with page header and page break in the frame exported to DOCX cannot be open with MSO due to excess tag (export to DOC loses text)
Summary: Filesave: ODT with page header and page break in the frame exported to DOCX c...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.0.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Corrupted
  Show dependency treegraph
Reported: 2016-06-24 09:40 UTC by Andrey Skvortsov
Modified: 2020-05-20 07:55 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:

test document in odt (23.76 KB, application/vnd.oasis.opendocument.text)
2016-06-24 09:40 UTC, Andrey Skvortsov
broken document in docx (16.34 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-06-24 09:41 UTC, Andrey Skvortsov
error message in word 2010 (23.10 KB, image/png)
2016-06-24 09:41 UTC, Andrey Skvortsov

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Skvortsov 2016-06-24 09:40:54 UTC
Created attachment 125879 [details]
test document in odt

I saved my big odt document as docx and unfortunately it was broken. Word 2010 couldn't open it (see attached screenshot). So I minimized document to make it easier to find problem in it. It is attached to the bug report.

Steps to reproduce the issue:
1. Open test odt document in LO
2. Save a copy as docx document
3. Open saved docx document in MS Word

I can open saved docx document in LO without an issue. It's shown in LO as original odt. But MS Word can't open it.

As it's stated in the document if I remove page header or remove page break in the frame, then generated document is correct and can be opened in Word 2010.
Comment 1 Andrey Skvortsov 2016-06-24 09:41:18 UTC
Created attachment 125880 [details]
broken document in docx
Comment 2 Andrey Skvortsov 2016-06-24 09:41:46 UTC
Created attachment 125881 [details]
error message in word 2010
Comment 3 Justin L 2016-07-07 16:37:15 UTC
tested with Office 2003 with compatibility pack.

tested 5.3dev, 5.0, last43onmaster, last41onmaster, last36onmaster, oldest and got "there was an error opening the file" from all tests.
Comment 4 Buovjaga 2016-07-10 18:54:46 UTC
Same result with

Win 8.1 32-bit
MSO 2013
LibO Version:
Build ID: f5af917e3b91037002419ba33c6921a74ca7d4e1
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-07-10_09:00:08
Locale: fi-FI (fi_FI); Calc: group
Comment 5 Xisco Faulí 2016-09-14 14:47:21 UTC
Only regressions should use the keyword 'preBibisect'. Removing it...
Comment 6 QA Administrators 2017-12-10 16:40:46 UTC Comment hidden (obsolete, spam)
Comment 7 QA Administrators 2019-12-11 03:38:29 UTC Comment hidden (obsolete)
Comment 8 Timur 2019-12-11 09:44:46 UTC Comment hidden (me-too)
Comment 9 Timur 2019-12-11 10:00:55 UTC
Repro master LO 6.5+ for save as DOCX. ODT with page header and page break in the frame exported to DOCX cannot be open with MSO. 
It says "..we found a problem with its contents". Unspecified error. Location Part: /word/header1.xml, Line: 2, Column: 775.
It's closed tag > after: mc:Ignorable="w14 wp14".
It looks like this:
<w:hdr     >     </w:hdr>

Note: saved DOC opens in MSO with header and frame, but without text.
No need to open another bug now for DOC, but if this only solved for DOCX.
Comment 10 NISZ LibreOffice Team 2020-05-19 10:02:10 UTC
Docx export solved in:


author	Michael Stahl <Michael.Stahl@cib.de>	Tue Mar 31 16:05:28 2020 +0200
committer	Michael Stahl <michael.stahl@cib.de>	Tue Mar 31 17:50:20 2020 +0200

sw: DOCX export: avoid section breaks in text frames harder
Comment 11 Commit Notification 2020-05-19 13:14:40 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":


tdf#100581: sw: Add unittest

It will be available in 7.0.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:

Affected users are encouraged to test the fix and report feedback.