Bug 168567 - FILESAVE DOCX Content controls embedding each other in table end up in page header, creating invalid document error in Word
Summary: FILESAVE DOCX Content controls embedding each other in table end up in page h...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2025-09-26 19:18 UTC by Gabor Kelemen (Collabora)
Modified: 2025-09-29 09:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimized example file from Word 2016 (35.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-09-26 19:18 UTC, Gabor Kelemen (Collabora)
Details
The example file saved with Writer master (29.13 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-09-26 19:18 UTC, Gabor Kelemen (Collabora)
Details
The original file in Word, the saved one in Writer and the error message from Word (64.87 KB, image/png)
2025-09-26 19:19 UTC, Gabor Kelemen (Collabora)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (Collabora) 2025-09-26 19:18:22 UTC
Created attachment 202984 [details]
Minimized example file from Word 2016

Attached user made, minimized file contains a table with content controls embedding each other.

When roundtripped in Writer, the resulting file can not be opened in Word.

1. Open attached document
2. Save as docx
3. Open the resulting docx in Word

-> Invalid content is detected in the header.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4ba94c18b2ebf1872d1db1f03857172e9a114917
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seems to have started in 24.2 with:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7c4dba1deffd81f647a4a3be7a79f68f3bf9f1

author	Jaume Pujantell <jaume.pujantell@collabora.com>	2023-11-22 11:59:09 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	2023-11-23 08:27:57 +0100
commit 7c4dba1deffd81f647a4a3be7a79f68f3bf9f1ba (patch)

fix a regression crash from commit 5082d50
Comment 1 Gabor Kelemen (Collabora) 2025-09-26 19:18:45 UTC
Created attachment 202985 [details]
The example file saved with Writer master
Comment 2 Gabor Kelemen (Collabora) 2025-09-26 19:19:18 UTC
Created attachment 202986 [details]
The original file in Word, the saved one in Writer and the error message from Word