Bug 154371 - FILEOPEN DOCX Numbering style setting of paragraph style not inherited
Summary: FILEOPEN DOCX Numbering style setting of paragraph style not inherited
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: DOCX-Styles
  Show dependency treegraph
 
Reported: 2023-03-24 18:29 UTC by Gabor Kelemen (allotropia)
Modified: 2023-08-13 12:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the issue in Word and Writer (152.04 KB, image/png)
2023-03-24 18:29 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-03-24 18:29:30 UTC
Created attachment 186195 [details]
Screenshot of the issue in Word and Writer

In attachment 186193 [details] there is a custom style called "Überschrift3" (this is not the built-in Heading 3, but one without space).
This is inherited from Heading 2 and that has a numbering style "1, 2, 3," set.
In Writer this inherited numbering is lost from "Überschrift3", so setting it on a paragraph does not make it numbered like in Word.

1. Open attachment 186193 [details] in Word and Writer
2. Change the style of any paragraph to "Überschrift3".
-> In Word the paragraph will get a "1.1" -like numbering (Heading 2 has Outline level 2 set), but in Writer there is no numbering.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b5c3a7502f7ff6ccf0f829c1f3a2ba50b8584c41
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: de-DE
Calc: threaded

and all the way back to 3.5
Comment 1 David 2023-03-24 20:45:48 UTC
Some direct formatting seems to be getting used. Use ctrl-a and ctrl-m to remove all direct formatting and see if that fixes it.
Comment 2 Dieter 2023-04-07 15:48:26 UTC
I confirm behaviour with

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1e9f4de320f67d1218c710bcee1969a2324c6888
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

Überschrift 3 is still inherited from Heading 2, but I won't expect "Heading Numbering" as list style, because you can only assign one style per heading level to heading numbering.
Comment 3 Justin L 2023-06-02 02:26:50 UTC
I consider this a valid bug report.
But yes, it is complicated by the LO-only Heading Numbering (aka chapter numbering, aka outline numbering) which specifically forbids inheritance from styles assigned to heading numbering.

However, the importer could take that into consideration and "spam" a copy of the setting instead of trying to "inherit" it. (Oh, here it is: ReApplyInheritedOutlineLevelFromChapterNumbering) 

P.S. by enabling experimental settings, the paragraph style UI allows you to assign a list level, and then the level is applied along with the style.
Comment 4 Commit Notification 2023-06-12 09:28:53 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#154371 writerfilter outineNumbering: copy inherited listId

It will be available in 24.2.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 5 Dieter 2023-08-13 12:07:30 UTC
VERIFIED with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e25e27c85ed970cdb97c468bdac86c80964f4231
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Justin, thanks for fixing it!