Bug 169101 - FILESAVE DOCX Certain document with data binding in date picker can't be opened in Word after roundtrip
Summary: FILESAVE DOCX Certain document with data binding in date picker can't be open...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:26.8.0 target:26.2.2
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: DOCX-Corrupted DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2025-10-27 17:07 UTC by Aron Budea
Modified: 2026-03-20 17:17 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX (24.17 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-10-27 17:07 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-10-27 17:07:59 UTC
Created attachment 203572 [details]
Sample DOCX

Open the attached DOCX, a shortened version of forum-mso-en-863.docx, save it back to DOCX format, and try opening it in Word.

=> Word can't open the file cleanly.

The document has a date field showing "Week #". When opened in Writer, this is shown as "30 december 1899", which is also a bug.

This started from the following commit in 7.5, seems to be implementation error:
https://git.libreoffice.org/core/commit/58002ab85d992c7ac44d8bb4d135246b67aa5cc7
author		Miklos Vajna <vmiklos@collabora.com>	Wed Oct 26 10:03:04 2022 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Wed Oct 26 10:47:59 2022 +0200

"sw content controls: enable data binding for date"

Bug also seems similar to bug 168988, the immediate cause is actually the same, invalid 'w:fulldate' attribute:
<w:date w:fullDate="Week #">
(spoiler alert: it's a different bug)
Comment 1 Commit Notification 2026-02-12 06:34:53 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a16f47ccb3ee9ff509a56bba026568f29800120

tdf#169101 docx export: ensure valid ISO8601 Sdt fullDate

It will be available in 26.8.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.
Comment 2 Justin L 2026-02-12 06:39:04 UTC
(In reply to Aron Budea from comment #0)
> => Word can't open the file cleanly.
Fixed.

> The document has a date field showing "Week #". When opened in Writer, this
> is shown as "30 december 1899", which is also a bug.
Fixed.

In LO, this now round-trips with 'Week #' showing in the date field. HOWEVER, MS Word is showing the placeholder instead of 'Week #' when it opens the round-tripped file. I'm not sure why.
Comment 3 Commit Notification 2026-02-12 15:59:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/6aadce0e4475fbc88c695df7412cd0a8db75b32a

tdf#169101 docx export: ensure valid ISO8601 Sdt fullDate

It will be available in 26.2.2.

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.
Comment 4 Justin L 2026-02-12 17:34:36 UTC
(In reply to Justin L from comment #2)
> In LO, this now round-trips with 'Week #' showing in the date field.
> HOWEVER, MS Word is showing the placeholder instead of 'Week #' when it
> opens the round-tripped file. I'm not sure why.

Because we are missing customXml _rels of item1.xml

<Relationships>
  <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps" Target="itemProps1.xml"/>
</Relationships>
Comment 5 Aron Budea 2026-02-19 05:27:42 UTC
Commit notification was missing for this.

----

Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e12c061dbf1330b00cdc73b7691171b6af883764

tdf#169101 docx export: create a _rels for customXml/item1.xml

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