Bug 156552 - Text formatting of docx content control elements gets lost
Summary: Text formatting of docx content control elements gets lost
Status: RESOLVED DUPLICATE of bug 148035
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2023-07-31 13:51 UTC by thomas.fischer
Modified: 2023-08-22 00:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
docx with content control elements not properly loaded in LibreOffice 7.3 and newer (29.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-07-31 13:52 UTC, thomas.fischer
Details
Screenshot of the document in Word 2016 and Writer master (121.91 KB, image/png)
2023-08-03 20:40 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thomas.fischer 2023-07-31 13:51:55 UTC
Description:
The formatting (font, font size, ...) of text inside content control elements of the attached document is lost when opening the document in LibreOffice.

Until 7.2 the content control element is removed when opening the file, but original formatting is retained.
With 7.3 the content control element is kept (as an "Input Field"?), but formatting is lost. Considering the release notes I was unable to comprehend why this happens with 7.3.
In 7.4 there are hints of reworked content control support in LibreOffice, this does not seem to improve the provided document.

Tested Versions:
* 7.2.5.2 windows, portable (removes cc, keeps formatting)
* 7.2.7.2 windows, portable (removes cc, keeps formatting)
* 7.3.0.3 windows, portable (keeps cc, looses formatting - identical for all following versions)
* 7.3.7.2 windows, portable
* 7.4.7.2 linux, centos7
* 7.5.3.2 windows, installer
* 7.6.0.1 windows, installer, https://git.libreoffice.org/core/+log/776eaf34564cbf3f034a0ba1fd1d5c32ff9ccf1c

Steps to Reproduce:
1. Open attached document
2. Observe difference in formatting between different versions of LibreOffice and MS Word

Actual Results:
Formatting is lost

Expected Results:
Formatting should be retained. In my case, the behaviour of 7.2 was preferable over 7.3 and following versions.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.3.0.3 (x86) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 thomas.fischer 2023-07-31 13:52:52 UTC
Created attachment 188674 [details]
docx with content control elements not properly loaded in LibreOffice 7.3 and newer
Comment 2 Gabor Kelemen (allotropia) 2023-08-03 20:39:20 UTC
Confirming in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 34387332173782498acd4998c7c665d04ebc3c7d
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Looks like the direct formatting of the very first Content Control is missing, but for the others it seems to be correctly imported.
Comment 3 Gabor Kelemen (allotropia) 2023-08-03 20:40:11 UTC
Created attachment 188753 [details]
Screenshot of the document in Word 2016 and Writer master
Comment 4 Gabor Kelemen (allotropia) 2023-08-03 20:57:27 UTC
This changed first in 7.3 when content controls became imported as such:

https://git.libreoffice.org/core/+/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

Then in 7.4 the non-first controls (at least the second.. others became plain text with this) got back their DF with:

https://git.libreoffice.org/core/+/f2ab1375b266d7465ef31d06ec8f949c6b91d853

author	Miklos Vajna <vmiklos@collabora.com>	Wed Apr 20 08:29:35 2022 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Wed Apr 20 11:47:40 2022 +0200

sw content controls: add initial DOCX import

Then the others again became content controls with correct DF in

https://git.libreoffice.org/core/+/c53d3a1f4b8430507d54f5fac336870df7a700af

author	Miklos Vajna <vmiklos@collabora.com>	Fri Apr 29 08:12:25 2022 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Fri Apr 29 09:03:01 2022 +0200

sw content controls, checkbox: add DOCX import

Adding CC to: Miklos Vajna - looks like there was a bit of oversight for the "CC is very first item in the document" case.
Comment 5 Justin L 2023-08-22 00:16:17 UTC
These are block SDTs - controls that occur directly in the document instead of being wrapped in a paragraph marker. They require special handling which hasn't be attempted yet.

*** This bug has been marked as a duplicate of bug 148035 ***