Bug 168988 - FILESAVE DOCX Certain document with invalid date in date picker can't be opened in Word after roundtrip
Summary: FILESAVE DOCX Certain document with invalid date in date picker can't be open...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.3.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: DOCX-Corrupted DOCX-Content_Control Regressions-sdt-plain-text-support
  Show dependency treegraph
 
Reported: 2025-10-21 15:36 UTC by Aron Budea
Modified: 2025-10-27 17:07 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-10-21 15:36:24 UTC
Open attachment 98549 [details] from bug 78333, a DOCX, save it back to DOCX format, and try opening it in Word.

=> Word can't open the file cleanly.

If one:
- unzips the saved DOCX,
- executes the following command (can be done in Linux/Cygwin, needs xmllint installed): find . \( -name "*.xml" -o -name "*.rels" \) -type f -exec xmllint --output '{}' --format '{}' \;
- rezips the files with DOCX extension,

Word points to line 552 in word/document.xml, which is this line:
<w:date w:fullDate="                                               2012./2013.T00:00:00Z">

The document has a date picker content control with the value: "                                               2012./2013."
Based on section 17.5.2.7 date (Date Structured Document Tag) of the OOXML specification, fullDate should be written as ST_DateTime (xsd:dateTime) type. However, when looking at the original document, it simply has <w:date> without an attribute, which makes more sense when the value isn't a valid date.

This is a regression/implementation error from the following commit in 7.4, and from its backport in 7.3:
https://git.libreoffice.org/core/commit/a4432eb0946c0bc775b3d30b634bef5d66544f8d
author		Vasily Melenchuk <vasily.melenchuk@cib.de>	Wed Nov 24 14:50:12 2021 +0300
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	Tue Dec 21 23:23:51 2021 +0100

tdf#104823: support for sdt plain text fields