Bug 127606 - DOCX imported numbered item formatting not reflected when removed
Summary: DOCX imported numbered item formatting not reflected when removed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords:
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2019-09-17 16:40 UTC by Jan-Marek Glogowski
Modified: 2023-12-08 22:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT with three numbered items (8.57 KB, application/vnd.oasis.opendocument.text)
2019-09-19 08:45 UTC, Jan-Marek Glogowski
Details
DOCX with three numbered items generated in Word (12.15 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-19 08:46 UTC, Jan-Marek Glogowski
Details
DOCX with three numbered items generated in LO (4.94 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-19 08:46 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2019-09-17 16:40:02 UTC
This is a bug found when analyzing bug 49785. When importing a DOCX saved from an ODT, which has some overridden font properties (size, font, underline, italic, etc.), changing any of these overridden values of the item won't be reflected in the number.

This is quite probably the result of the different numbering font properties between the ODT and the DOCX import. While for ODT these values are stored in the SwAttrSet, for the imported DOCX they are stored as SwpHints.

This needs some further investigation.
Comment 1 Jan-Marek Glogowski 2019-09-19 08:45:18 UTC
Created attachment 154284 [details]
ODT with three numbered items
Comment 2 Jan-Marek Glogowski 2019-09-19 08:46:04 UTC
Created attachment 154285 [details]
DOCX with three numbered items generated in Word
Comment 3 Jan-Marek Glogowski 2019-09-19 08:46:35 UTC
Created attachment 154286 [details]
DOCX with three numbered items generated in LO
Comment 4 Jan-Marek Glogowski 2019-09-19 09:00:47 UTC
To reproduce:

1. Open one of the DOCX.
2. Select the text of one of the formated number items (italic / bold)
3.1 Remove the respective formating
3.2 Change the formating in any other way
4. Save the DOCX as ODT
5. Re-open the ODT
6. Changing any formating works again.

Result:

3.1 The changed formating is *not* reflected in the number.
3.2 The changed formating is reflected in the number.

Expected result:

3.1 The formating should be reflected in the number.
3.2 Works as expected.

Conclusion:

There seems to be a bug in the DOCX import filter.
Comment 5 Timur 2019-09-19 09:11:52 UTC
Looks like formatting not reflected just for removal of imported status, regardless if direct or Ctrl+M. Setting other format works. New.
Comment 6 Commit Notification 2020-04-17 07:52:24 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6287845eab339a8eb3c660d648d012e9f1dcce30

tdf#127606 DOCX lists: fix unchangeable formatting

It will be available in 7.0.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 7 László Németh 2020-04-17 07:56:17 UTC
Note: Ctrl-M isn't supported, only modifying character formatting of the whole paragraph will remove the compatibility paragraph setting, to avoid of unwanted formatting changes.
Comment 8 Commit Notification 2020-04-27 09:31:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/11768f901b4c9e34e598187a31adf5028377c65c

tdf#127606 DOCX lists: fix unchangeable formatting

It will be available in 6.4.4.

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.