Bug 153097 - FILESAVE: DOCX: value of content control not displayed in MSO after RT
Summary: FILESAVE: DOCX: value of content control not displayed in MSO after RT
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2023-01-18 17:16 UTC by Xisco Faulí
Modified: 2025-04-16 09:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparsion LibreOffice 7.6 master vs MSO after RT (128.53 KB, image/png)
2023-01-18 17:16 UTC, Xisco Faulí
Details
simplifier file (26.19 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-19 09:07 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-01-18 17:16:55 UTC
Created attachment 184761 [details]
Comparsion LibreOffice 7.6 master vs MSO after RT

Steps to reproduce:
1. Download attachment 51789 [details] from bug 41355
2. Convert the file to DOCX with 'instdir/program/soffice --headless --convert-to docx Bicycle-and-Pedestrian-Volunteer-Instructions_2011.docx --outdir <folder>'
3. Open it in MSO Word ( in my case I'm using 2016 )

-> The header shows '[Type the document title]' instead of 'Volunteer Instructions and Count Form'

Reproduced in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b9411e587586750f36ba9009b5f1e29fe461d8b5
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (es_ES.UTF-8); UI: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2023-01-18 19:58:07 UTC
Regression introduced by:

author	Noel Grandin <noelgrandin@gmail.com>	2022-08-20 10:57:19 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2022-08-22 09:35:31 +0200
commit db04b3e154a1fb8f222232ef969bb3617e051329 (patch)
tree 84195e6f47abd82024127ced37405585df7708bb
parent b2b3b4e833484aa70cb73b296bb62cdb0304eac9 (diff)
return 64-bit hash for O[U]String

Bisected with: bibisect-linux64-7.5

Adding Cc: to Noel Grandin
Comment 2 Xisco Faulí 2023-01-19 09:07:31 UTC
Created attachment 184770 [details]
simplifier file
Comment 3 Noel Grandin 2023-01-19 12:00:58 UTC Comment hidden (obsolete)
Comment 4 Xisco Faulí 2023-01-19 15:47:19 UTC
(In reply to Noel Grandin from comment #3)
> If you roundtrip it with "--convert-to docx" and then you open the output
> file in Libreoffice, do you see the same problem?

No, it's only reproducible in Word. LibreOffice displays the right value after roundtrip
Comment 5 Justin L 2023-08-22 00:46:11 UTC
repro 24.2+
Comment 6 Aron Budea 2025-01-14 03:03:25 UTC
Interestingly, this bug was Linux-only until very recently. Since the following commit in 25.8, the bug occurs in Windows as well (tested with headless conversion on the simplified reproducer):
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c90c1d4435a64531e1d9b41d0a8dc0b91ba236cd
author		Justin Luth <justin.luth@collabora.com>	2024-12-31 16:56:03 -0500
committer	Justin Luth <justin.luth@collabora.com>	2025-01-01 18:10:51 +0100

"tdf#164201 docx convert-to: prefer Word 2010–365 Document, not 2007"

Adding a couple of related changes, bibisected in Windows.

The text formatting changes in 7.4 (backported to 7.3), this can also be seen in attachment 184761 [details]:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b5c616d10bff3213840d4893d13b4493de71fa56
author		Vasily Melenchuk <vasily.melenchuk@cib.de>	2021-11-24 14:50:12 +0300
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	2021-12-20 00:16:12 +0100

"tdf#104823: support for sdt plain text fields"

Later it is fixed in 24.2 by a commit in the following range (single commit in bibisect-win64-24.2):
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=5dff1f3a995a8e78a156214fd9c32b1005337183..a0b003257aa87d34a4403531798d0074e19a18ac
The commit is almost certainly the following (it also fixed bug 148035):
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5082d50d24c3fec4487c724a15eb0d54a82ecd0d
author		Jaume Pujantell <jaume.pujantell@collabora.com>	2023-09-13 08:58:21 +0200
committer	Jaume Pujantell <jaume.pujantell@collabora.com>	2023-10-11 15:19:58 +0200

"writerfilter: use content controls for text in block SDTs"

There is a similar issue with the date picker, it is now reported in bug 164694.
Comment 7 Aron Budea 2025-03-22 14:19:18 UTC
For the record, I checked in Windows, and the bug mentioned in comment 6 is resolved by the fix in bug 164201 comment 13. Bug can be cloosed after verifying the same in Linux.

Fixing commit:
https://git.libreoffice.org/core/commit/e4b629c1eecf8cd46007fb064179d765d55fd26b

tdf#165207 tdf#164201 docx: always use errata uri in docProps/core.xml

It will be available in 25.8.0.
Comment 8 Aron Budea 2025-04-16 09:27:04 UTC
I have tested and confirmed the same commit also fixes this on Linux. Thanks, Justin!