Bug 62032 - Cannot specify a Paragraph Style to use a numbering level (over 1) for a chosen Numbering (List) style (See comment 35)
Summary: Cannot specify a Paragraph Style to use a numbering level (over 1) for a chos...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/en/questi...
Whiteboard: target:7.3.0 target:7.4.0 target:7.3....
Keywords:
: 42920 54729 74552 78519 86905 104206 126887 136812 141453 144086 145701 (view as bug list)
Depends on:
Blocks: 83071 ODF-import Heading-Numbering
  Show dependency treegraph
 
Reported: 2013-03-08 17:41 UTC by Miguel
Modified: 2023-10-04 18:08 UTC (History)
29 users (show)

See Also:
Crash report or crash signature:


Attachments
Proof of concept of the issue (11.47 KB, application/vnd.oasis.opendocument.text)
2013-03-08 17:41 UTC, Miguel
Details
File with paragraph style with style:list-level (17.85 KB, application/vnd.oasis.opendocument.text)
2021-12-13 15:05 UTC, Regina Henschel
Details
DOCX file with heading numbering problems (12.63 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-12-16 03:17 UTC, Daniel Espinosa
Details
Mockup (33.91 KB, image/png)
2022-01-11 09:54 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel 2013-03-08 17:41:29 UTC
Created attachment 76173 [details]
Proof of concept of the issue

Consider the attached file, where we have a Heading 1 (H1), a Heading 2 (H2) and a Heading 3 (H3).

One of the ways to define numberings (the only way if you intend to create a style template that you can then apply to existing documents) is do the following:

1) Tools-Outline numbering: Set "paragraph style" to (none) in first 3 levels
2) Styles & formatting - list styles: use Numbering 1 to define your numbering style
3) Styles & formatting - Paragraph styles: Change H1,H2,H3. Outline & numbering tab - set "numbering style" to Numbering 1 and Outline Level to 1,2 an 3 respectively.


Expected:
With these settings, you'd expect the following numbering:

1. Heading 1
1.1 Heading 2
1.1.1 Heading 3


Actual:
1. Heading 1
2. Heading 2
3. Heading 3

You can confirm this in the attachment, where the proof is even more evident because I set the prefix XX to Level 1 in the style Numbering 1. It should be applied to H1 only, but it's being applied to H1,H2 and H3!
Comment 1 Brenda Granados 2013-05-19 12:37:51 UTC
Hi, I can confirm that LibreOffice is behaving as you stated, but I am not very familiar with Styles and Outline numbering. Why do you think it should show

1. Heading 1
1.1 Heading 2
1.1.1 Heading 3

I will do some more research to understand what the expected behavior should be.

Thanks,

Brenda
Comment 2 sophie 2014-03-24 16:08:12 UTC
Confirmed but this is really not a good way to set a chapter numbering. 
Using the Numbering 1 style alone works as expected, i.e demoting the levels gives:
1.
1.1
1.1.1
But once set in the Heading style dialogs, the full numbering is not displayed.
Verified with 4.1.5.3 and 4.2.3.1
Set as New - Sophie
Comment 3 Albrecht Müller 2014-09-02 09:04:52 UTC
My current understanding of concepts of outline numbering is:

You can define outline levels for paragraph styles, and you can attach list styles the paragraph styles. The numbering level you see is independent of the outline level.

This implies that you have to set the numbering level by hand. If your outline level is "Body Text" that is usually what you want. If the outline level is something else I think you usually expect that the numbering level reflects the outline level. This is what happens if you define the numbering using the Tools -> Outline Numbering window.

I think it is not possible to fix this issue by automatically linking the numbering level to the outline level: This would break existing documents that rely on the fact that the applied numbering level is independent of the outline level.

A possible solution may be to add a check-box that allows you to specify if the resulting numbering level should depend on the outline level.

I think bug 74552 is essentially a duplicate of this one.
Comment 4 Albrecht Müller 2014-09-02 09:08:29 UTC
*** Bug 74552 has been marked as a duplicate of this bug. ***
Comment 5 Owen Genat (retired) 2015-01-25 00:49:43 UTC
(In reply to Albrecht Müller from comment #3)
> You can define outline levels for paragraph styles, and you can attach list
> styles the paragraph styles. The numbering level you see is independent of
> the outline level.
> 
> This implies that you have to set the numbering level by hand. If your
> outline level is "Body Text" that is usually what you want. If the outline
> level is something else I think you usually expect that the numbering level
> reflects the outline level. This is what happens if you define the numbering
> using the Tools -> Outline Numbering window.
> 
> I think it is not possible to fix this issue by automatically linking the
> numbering level to the outline level: This would break existing documents
> that rely on the fact that the applied numbering level is independent of the
> outline level.

I just want to add to (and largely agree with) what has been stated above. There is currently a hopeless confusion between styling ordered list items (associating paragraph and list styles; Format > Bullets and Numbering...; using the list toolbar buttons) and setting heading outline numbering (Tools > Outline numbering). This is largely due to how the related options are exposed to the user in the UI (modify style > Outline and Numbering tab; Format > Bullets and Numbering > Options tab). The two use similar terminology to that in the Tools > Outline Numbering facility and yet generate quite different XML in the background. 

I have almost given up trying to explain the differences over on the AskLO site as the UI indicates that the on-screen results should be similar. While ordered lists can be defined to use an outline style of numbering it needs to be remembered that headings are not list items. At this point there may be little that can be done to improve the situation with the term "outline" being used for both headings and lists. Perhaps we can more clearly indicate in the UI which relates to headings and which to list items? It may be that the core problem here relates to shortcomings with the ODF specification or a need for OOXML interoperability? In any case this is not a problem that I see being resolved any time soon.
Comment 6 QA Administrators 2016-02-21 08:35:47 UTC Comment hidden (obsolete)
Comment 7 Smith Kennedy 2017-01-27 18:33:05 UTC
Still a problem in:

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 8; OS Version: Mac OS X 10.12.3; UI Render: GL; 
Locale: en-US (en_US.UTF-8); Calc: group

I simply don't understand what value the "Outline level" setting in the "Outline & Numbering" tab of the Paragraph Style settings window provides, if not to automatically set the outline level.

For document authors of structured documents, this is quite a serious problem. The user has the ability to define a paragraph style that includes an outline level, which sets the expectation that if a paragraph has its style set, that its outline level will be set accordingly.

If the Document Foundation hopes that LibreOffice and the Open Document formats are to  become more broadly adopted as a document format in professional organizations such as technology standards bodies (several of which I take part in and NONE of them use ODF or LibreOffice) this issue MUST be resolved.
Comment 8 Regina Henschel 2017-04-05 19:18:13 UTC
The outline level is set correctly, but the paragraph does not get a list-level, which corresponds to the outline level.

The list level is not given by an attribute in the file format, but by nesting lists, which is a structure.

I have looked around in the ODF 1.2 specification, whether it is possible to specify an associated list level. If I understand the spec correctly, it would be possible to use the attribute "style:list-level" in the paragraph style. That is section 19.495 in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html. It seems, that currently LibreOffice does not evaluate that attribute at all. At least adding it manually to the file has no effect and resaving the document removes this attribute.

With that attribute it would be possible to build a set of paragraph styles similar to "Heading 1", "Heading 2", ..., so that when assigning the paragraph style, LibreOffice knows, that it has to put the paragraph to the specified list level, which means to generate the nested lists accordingly.

If I'm correct with my interpretation, then implementing the attribute could solve the problem. In this sense this bug report would be an enhancement request.
Comment 9 Mike Kaganski 2017-04-05 20:52:53 UTC
*** Bug 104206 has been marked as a duplicate of this bug. ***
Comment 10 Regina Henschel 2017-07-02 00:28:25 UTC
*** Bug 78519 has been marked as a duplicate of this bug. ***
Comment 11 Regina Henschel 2017-08-18 11:10:10 UTC
*** Bug 86905 has been marked as a duplicate of this bug. ***
Comment 12 sdc.blanco 2019-12-23 02:40:24 UTC
I can reproduce the problem using attachment 76173 [details] with 

Version: 6.4.0.0.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: CL

Additional comments.

1.  Outline level "Heading 1" was set to "Text Body"  (but it did not seem to matter if it was subsequently changed to "Level 1")

2.  Selecting the three lines, and toggling the number list (F12) or from toolbar gave THREE different appearances  (but I cannot explain why).

3.  After trying to modify a style, then this effect disappears.

4.  Tried to get things to work (without success) by modifying the styles.  Is it correct to believe that it is impossible with this method?

5.  Open attachment 76173 [details], use Tools > Chapter Numbering.  Levels 1 to 4 have No paragraph style, and "Show sublevels" is 1 for each level.  


(In reply to Regina Henschel from comment #8)

> If I'm correct with my interpretation, then implementing the attribute 
> could solve the problem. In this sense this bug report would be an 
> enhancement request.
I get the impression that this has been attempted (linking list styles with paragraph styles) - which may be why Tools - Chapter Numbering works.  See here:
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentStylePoolManager.cxx?r=24314773#209
Comment 13 sdc.blanco 2019-12-23 02:48:15 UTC
(In reply to sdc.blanco from comment #12)
> I get the impression that this has been attempted (linking list styles with
> paragraph styles) - which may be why Tools - Chapter Numbering works. 

Sorry -- I should have specified that the technique for linking list styles with paragraph styles seems to have been worked out Headings.  I understand that in this case, there is an attempt to link list styles with paragraph styles, which does not seem to be possible manually.
Comment 14 sdc.blanco 2019-12-27 22:34:22 UTC
Have changed bug summary to better express the problem. 

To understand the problem.

Start in a Paragraph Style dialog box (e.g., Format > Paragraph for any line).

0.  Ignore "Outline Level" in this dialog box.  It is not relevant for this issue.
1.  Click on drop-down box in Numbering Style, choose one you like.
2.  Now, edit that chosen Numbering Style (i.e., View > Styles (F11), click on List Style icon.
3.  Find the Style chosen in step 1, right-click, Modify
4.  For different levels, set different values for Number.

Now here is the problem.....how do you tell your paragraph style which numbering level (which was set in step 4) to use for the numbering style chosen in step 1?  (The claim is:  You can't -- with one exception noted below).

You can specify the numbering style in the Paragraph style dialog box. And you can specify the appearance of each level in the Numbering Style dialog box. But you cannot link these two dialogs (i.e., to specify which numbering level should be used in the chosen paragraph style, so you always get Level 1). That is the problem reported in this bug.

This is consistent with Regina's hypothesis (comment #8), that there is no way in the Paragraph style dialog to give a level to the numbering style.

It is possible -- as discussed in bug #42920 - to use the Tab key or the Promote/Demote icons in the Bullets and Numbering Toolbar to introduce these levels in the document, but there is no way for a user to specify these levels in the Paragraph style.

A solution, as requested in bug #42920, would be to add a drop-down box in the Paragraph dialog box in the Numbering section, for example, under the Numbering Style, where the Level could be specified.
Comment 15 sdc.blanco 2020-01-15 15:58:16 UTC
*** Bug 126887 has been marked as a duplicate of this bug. ***
Comment 16 Xisco Faulí 2020-02-19 17:08:33 UTC
Changing priority back to 'high' since the number of duplicates is 5 or more
Comment 17 Cor Nouws 2020-02-23 21:21:38 UTC
Wasn't this a use case in which you have to type TAB at the start of the heading to move it to the next level?
Comment 18 Smith Kennedy 2020-02-23 23:23:59 UTC
(In reply to Cor Nouws from comment #17)
> Wasn't this a use case in which you have to type TAB at the start of the
> heading to move it to the next level?

Sort of but you shouldn't have to type TAB - it should assume the right numbering level based on the style. You shouldn't have to touch the style AND the numbering.
Comment 19 Cor Nouws 2020-04-21 19:50:04 UTC
@miguel  : can you pls check this? thanks!

(In reply to Cor Nouws from comment #17)
> Wasn't this a use case in which you have to type TAB at the start of the
> heading to move it to the next level?
Comment 20 Atticus 2020-06-05 13:01:19 UTC
We are talking about the same thing but describing Bug 62032 differently.

Problem [1]

Even though both "Heading <x>" and "Example <x>" are using Paragraph Styles and List Styles editing each corresponding set (Heading <x>, {List Style : Paragraph Style} ; Example <x>, {List Style : Paragraph Style}) is approached and done differently. Each Paragraph Style, {"Heading 1" : ... : "Heading 9"}, and List Style, "Chapter Numbering", is edited using the editing menu under Paragraph Style and the editing menu under Tools->Chapter Numbering. However, each Paragraph Style, {"Example 1" : ... : "Example 9"}, and List Style, "Example 123", is edited using the editing menu under Paragraph Style and the editing menu under List Styles.

Problem [2]

List Style "Chapter Numbering" is not present under List Styles; which segues into Problem one-s' approach to editing Paragraph and List Styles: {"Heading 1" : ... : "Heading 9"} and "Chapter Numbering". So the ways in which these styles are edited and presented are neither consistent with nor congruent to each other.

Problem [3]

Applying custom Paragraph Style "Example 2", which is assigned to Numbering Style "Example 123" and outline level 2, to my target, does not result in a corresponding change in that targets' outline level. Here, the observed behavior does not match the expected behavior. When I apply Paragraph Style "Example 2", which has been edited and assigned outline level 2, I expect the target to be changed to outline level 2.

Problem [4]

If I click to the left of {"Example 1" : ... : "Example 9"} and press "Tab" then there is a change in the targets' outline level; but that change does not match the styles' edited and assigned outline level and there is no corresponding change under the Paragraph Style Menu to indicate the targets' outline level has been changed. Here, the observed behavior does not match the expected behavior. The observed behavior ought to match the results of the activating process for Paragraph Styles {"Heading 1" : ... : "Heading 9"} and List Style "Chapter Numbering". The List Style "Chapter Numbering" is activated, automatically, when its' corresponding Paragraph Styles {Heading "1" : ... : Heading "9"} are activated. So, at the present moment, activating each distinct Paragraph style results in observable behavior that is neither consistent with nor congruent to each other; when, in fact they ought to be.

For example, when I select Paragraph Style and apply Heading 2 to my target, then that target changes to Outline Level 2 (Heading 2 is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. When I click to the left of "Heading 1", formatted as a Multi-level List, and press "Tab" then that Heading changes to Level 2 from Level 1, as is expected. Additionally, there is a corresponding change under the Paragraph Style indicating the target has been changed to "Heading 2" ("Heading 2" is assigned Outline Level 2). Here, the observed behavior matches the expected behavior.

Heading Multilevel List Style :: 
List Style: "Chapter Numbering"
Paragraph Style: {"Heading 1" : ... : "Heading 9"}

Expected Behavior and Observed Behavior Match:

- 1. Heading 1          == Outline Level 1
- 1.1 Heading 2         == Outline Level 2

- 2. Heading 1          == Outline Level 1
- 2.1 Heading 2         == Outline Level 2

Custom Multilevel List Style :: 
Editing custom List Style: "Example 123"
Editing custom Paragraph Style: {"Example 1" : ... : "Example 9"}

- List Styles -> 
- New ->
 - Tab.Organizer.Name           "Example 123"
 - Tab.Outline.Select           "Numeric with all sublevels"
 - Tab.Position ->              ...Multiple Options Set
 - Tab.Customize ->             ...Multiple Options Set


- Paragraph Styles ->
- New ->
 - Tab.Organizer ->                 Name                "Example 1"
 - Tab.Outline and Numbering ->     Outline level:      "Level 1"
 - Tab.Outline and Numbering ->     Numbering style:    "Example 123"

Paragraph Styles {"Example 2" : ... : "Example 9"} follow the above editing process and to each corresponding edit, "Example X" is assigned Outline level: "Level X".

Expected Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 2
- Example 2         == Outline Level 2

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 3
- Example 3         == Outline Level 3

Observed Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 1
- Example 2         == Outline Level 1

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 1
- Example 3         == Outline Level 1
Comment 21 Atticus 2020-06-05 13:33:05 UTC
LibreOffice Version and OS Information is as follows:
- LibreOffice Writer Version: 6.3.6.2
- Build ID: FreeBSD ports 6.3.6
- OS: FreeBSD 12.1; UI render: default; VCL: gtk2; 
- Locale: en-US (C); UI-Language: en-US


Multi-Level List Style [1]
Numbering Style  "Chapter Numbering"
Paragraph Styles "Heading 1" ... "Heading 9"

Multi-Level List Style [2]
Numbering Style  "Example 123"                 ## Customized Style
Paragraph Styles "Example 1" ... "Example 9"   ## Customized Style


Problem [1]

Numbering Style "Chapter Numbering" is edited using Tools-Chapter Numbering
Paragraph Style "Heading <X>" is edited using Paragraph Styles

Numbering Style "Example 123" is edited using List Styles
Paragraph Style "Example <X>" is edited using Paragraph Styles

So even though "Chapter Numbering" and "Example 123" are List Styles each are edited differently.


Problem [2]

List Style "Chapter Numbering" is not present under List Styles; which segues into Problem [1]s' approach to editing List Styles "Chapter Numbering" and "Example 123".  So the ways in which these styles are edited and presented are neither consistent with nor congruent to each other.


Problem [3]

Applying Paragraph Style "Example 2", which is assigned to Numbering Style "Example 123" and outline level 2, to my target, does not result in a corresponding change in that targets' outline level. Here, the observed behavior does not match the expected behavior. When I apply Paragraph Style "Example 2", which has been edited and assigned outline level 2, I expect the target to be changed to outline level 2.


Problem [4]

If I click to the left of "Example <X>" and press "Tab" then there is a change in the targets' outline level; but that change does not match the styles' edited and assigned outline level.  Additionally, there is no corresponding change under the Paragraph Style Menu to indicate the targets' outline level has been changed. Here, the observed behavior does not match the expected behavior.

The observed behavior ought to match the results of the activating process for Paragraph Styles "Heading <X>" and List Style "Chapter Numbering". List Style "Chapter Numbering" is activated, automatically, when its' corresponding Paragraph Styles "Heading <X>" is activated. So, at the present moment, activating each Paragraph style for Multi-Level List [1] and [2] results in observable behavior that is neither consistent with nor congruent to each other; when, in fact they ought to be.

For example, when I select Paragraph Style and apply Heading 2 to my target, then that target changes to Outline Level 2 (Heading 2 is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. When I click to the left of "Heading 1", formatted as a Multi-level List, and press "Tab" then that Heading changes to Level 2 from Level 1, as is expected. Additionally, there is a corresponding change under the Paragraph Style indicating the target has been changed to "Heading 2" ("Heading 2" is assigned Outline Level 2). Here, the observed behavior matches the expected behavior. However, duly note, the preceding changes visible under Paragraph Styles do not occur when the corresponding style activation is applied to "Example <X>".


Multi-Level List Style [1]
Numbering Style  "Chapter Numbering"
Paragraph Styles "Heading 1" ... "Heading 9"

Expected Behavior and Observed Behavior Match:

- 1. Heading 1          == Outline Level 1
- 1.1 Heading 2         == Outline Level 2

- 2. Heading 1          == Outline Level 1
- 2.1 Heading 2         == Outline Level 2

Multi-Level List Style [2]
Numbering Style  "Example 123"                 ## Customized Style
Paragraph Styles "Example 1" ... "Example 9"   ## Customized Style

- List Styles -> 
- New ->
 - Tab.Organizer.Name           "Example 123"
 - Tab.Outline.Select           "Numeric with all sublevels"
 - Tab.Position ->              ...Multiple Options Set
 - Tab.Customize ->             ...Multiple Options Set


- Paragraph Styles ->
- New ->
 - Tab.Organizer ->                 Name                "Example 1"
 - Tab.Outline and Numbering ->     Outline level:      "Level 1"
 - Tab.Outline and Numbering ->     Numbering style:    "Example 123"

Paragraph Style "Example <X>" follows the above editing process and to each corresponding edit, "Example <X>" is assigned Outline level: "Level <X>".

Expected Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 2
- Example 2         == Outline Level 2

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 3
- Example 3         == Outline Level 3

Observed Behavior

- 1. Heading 1      == Outline Level 1
- Example 2         == Outline Level 1
- Example 2         == Outline Level 1

- 1.1 Heading 2     == Outline Level 2
- Example 3         == Outline Level 1
- Example 3         == Outline Level 1
Comment 22 Regina Henschel 2020-09-13 16:31:54 UTC
You can use a conditional style, so that changing the list level automatically changes the paragraph style. You need to define for each numbering level a paragraph style. To make them headings, set for each of them the corresponding outline level.

A list level information cannot be stored in a paragraph style, because the list level is not determined by an attribute but it is determined by nesting of list-elements. It would be only possible, that LibreOffice provides, that setting an outline level will automatically change the numbering level too.
Comment 23 Regina Henschel 2020-09-13 16:50:53 UTC
The needed attribute style:list-level, now 19.499 ODF 1.3, which would solve the problem, is still not implemented.
Comment 24 Regina Henschel 2020-09-13 16:54:54 UTC
Add blocks 94587 to reflect, that an existing ODF feature is not implemented.
Comment 25 Mike Kaganski 2020-09-17 05:51:30 UTC
(In reply to Regina Henschel from comment #22)
> A list level information cannot be stored in a paragraph style, because the
> list level is not determined by an attribute but it is determined by nesting
> of list-elements. It would be only possible, that LibreOffice provides, that
> setting an outline level will automatically change the numbering level too.

I suppose that the idea is not to store list level information in a paragraph style, but to store assigned paragraph style names for each level in the list style, and have program explicitly change paragraph style of a paragraph when changing list level of a paragraph (unlike conditional style approach, where the assigned paragraph style isn't changed; more in line with the existing chapter numbering feature).
Comment 26 Regina Henschel 2020-09-17 13:42:03 UTC
(In reply to Mike Kaganski from comment #25)
> I suppose that the idea is not to store list level information in a
> paragraph style, but to store assigned paragraph style names for each level
> in the list style, and have program explicitly change paragraph style of a
> paragraph when changing list level of a paragraph (unlike conditional style
> approach, where the assigned paragraph style isn't changed; more in line
> with the existing chapter numbering feature).

The existing chapter numbering feature does not work in the way "store assigned paragraph style names for each level in the list style". Coupling a heading paragraph style with a level of the <text:outline-style> list happens in the UI and in rendering. Nothing about that is directly stored in the file.
Comment 27 Mike Kaganski 2020-09-17 14:12:52 UTC
(In reply to Regina Henschel from comment #26)

I should had written more clearly, that the parts "where to store" was not linked to "more in line with existing chapter numbering feature", while "how to behave" was, so I was only talking that *behaviour* of the new feature should be like in existing one - that program would assign new paragraph style when level changes. But the proposal to reference the assigned paragraph styles from list style was new, possibly needing an extension to ODF.
Comment 28 Regina Henschel 2020-09-17 16:20:57 UTC
*** Bug 136812 has been marked as a duplicate of this bug. ***
Comment 29 Eyal Rozenberg 2021-04-02 10:14:34 UTC
I've recently also stumbled on this and related issues. I filed bug 141453, but after noticing this one I thought I'd make that one a meta-bug for the more general issue, as described in Owen Genat's comment #5.
Comment 30 Justin L 2021-05-01 06:50:34 UTC
*** Bug 54729 has been marked as a duplicate of this bug. ***
Comment 31 Justin L 2021-05-01 06:51:11 UTC
*** Bug 42920 has been marked as a duplicate of this bug. ***
Comment 32 Justin L 2021-05-01 07:56:07 UTC
*** Bug 141453 has been marked as a duplicate of this bug. ***
Comment 33 Justin L 2021-09-01 13:01:01 UTC
Initial step taken in bug 137363, where this now works for DOCX (unchangeably specified by import only).
Comment 34 Commit Notification 2021-09-03 17:01:45 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#62032 ODT export: handle style:list-level="..." for para styles

It will be available in 7.3.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 35 Miklos Vajna 2021-09-06 06:43:07 UTC
Let's keep this open: import/export works not, but there is no UI yet.
Comment 36 Justin L 2021-10-12 08:29:08 UTC
*** Bug 144086 has been marked as a duplicate of this bug. ***
Comment 37 Mike Kaganski 2021-11-21 08:11:44 UTC
*** Bug 145701 has been marked as a duplicate of this bug. ***
Comment 38 Regina Henschel 2021-12-10 23:29:23 UTC
Suggestion for UI is missing.
Comment 39 Heiko Tietze 2021-12-13 10:30:13 UTC
(In reply to Regina Henschel from comment #38)
> Suggestion for UI is missing.

Please explain what's needed. I can assign a list style to paragraphs, but using a particular level is pointless because this is done per promote/demote.
Comment 40 Regina Henschel 2021-12-13 14:42:22 UTC
@Miklos: The list level is off by one. style:list-level="2" results in list level 3.
Comment 41 Regina Henschel 2021-12-13 15:05:10 UTC
Created attachment 176906 [details]
File with paragraph style with style:list-level

(In reply to Heiko Tietze from comment #39)
> (In reply to Regina Henschel from comment #38)
> > Suggestion for UI is missing.
> 
> Please explain what's needed. I can assign a list style to paragraphs, but
> using a particular level is pointless because this is done per
> promote/demote.

The point is, that the attribute style:list-level in a paragraph style automatically sets a list level to the paragraph to which the style is assigned. That is the feature Miklos has implemented. Thanks Miklos! But there is no UI, that the user can determine the value of the style:list-level attribute.

To test the new feature open the attached document. It contains paragraph style "My Numbered Section" and "My Numbered Chapter". Both are bound to list style "My Outline Numbering". But "My Numbered Chapter" has set style:list-level="0" and "My Numbered Section" has style:list-level="1". [Should be ="1" and ="2" see comment #40.]
Now apply "My Numbered Chapter" to a paragraph. You will get numbering "A" according to first level in list style "My Outline Numbering".
Apply "My Numbered Section" to a paragraph. You will get numbering "-1-" according to second level in list style "My Outline Numbering".

That is exact the behavior this bug report wishes. No longer using promote/demote but assigning a paragraph style sets outline level and list level at the same time. Besides the mentioned off-by-one error, the feature exists now. You even see the levels in the "Organize" tab. But a UI is missing, that the user can specify the list level which the paragraph style applies.
Comment 42 Justin L 2021-12-13 15:10:39 UTC
From the spec referenced in comment 8, we have:
The values of the style:list-level attribute are a value of type positiveInteger or an empty string.

The ·value space· of positiveInteger is the infinite set {1,2,...}. The ·base type· of positiveInteger is nonNegativeInteger.

Internally, the code is zero based - or nonNegativeInteger.  Thanks for catching this Regina.
Comment 43 Heiko Tietze 2021-12-14 09:24:06 UTC
(In reply to Regina Henschel from comment #41)
> But a UI is missing, that the user can specify the list level which 
> the paragraph style applies.

Isn't this the "outline level"?
Comment 44 Mike Kaganski 2021-12-14 09:35:03 UTC
(In reply to Heiko Tietze from comment #43)
> Isn't this the "outline level"?

No. Outline level defines a *document structure* - simply said, "chapter heading". List levels are orthogonal to being heading. Associating paragraph styles with list levels must *not* be bound to outline levels.
Comment 45 Commit Notification 2021-12-14 09:38:03 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#62032 xmloff: list-level is positiveInteger, impl is 0-based

It will be available in 7.4.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 46 Commit Notification 2021-12-14 10:48:40 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#62032 xmloff: list-level is positiveInteger, impl is 0-based

It will be available in 7.3.0.0.beta2.

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 47 Justin L 2021-12-14 11:08:38 UTC
(In reply to Heiko Tietze from comment #43)
> Isn't this the "outline level"?

No. OutlineLevel is completely separate and unrelated to listLevel, even though they are typically set to the same value.

I would suggest that the UI design encourages these having matching values, and that changing one automatically changes the other (via a synchronized checkbox for example).
Comment 48 Heiko Tietze 2021-12-14 13:20:43 UTC
You can have Outline Level = 2 (typically for a H2 chapter) and List Level = 3 (for some reason different to the outline level). Correct?

If so, isn't the to-be-introduced List Level best suited as dropdown below the list style selection?

(In reply to Justin L from comment #47)
> I would suggest that the UI design encourages these having matching values,
> and that changing one automatically changes the other (via a synchronized
> checkbox for example).

We could use an entry "Same as Outline Level" in the dropdown.
Comment 49 Daniel Espinosa 2021-12-16 03:17:06 UTC Comment hidden (off-topic)
Comment 50 Heiko Tietze 2022-01-11 09:54:02 UTC
Created attachment 177453 [details]
Mockup

(In reply to Heiko Tietze from comment #48)
> We could use an entry "Same as Outline Level" in the dropdown.

Like this?

In case Outline is set to Text Body the "same as" option should be hidden, of course.

I wonder what happens on promote/demote. Sounds wrong to change the value in this dialog. Perhaps we have to name it "Initial List Level", which adds some confusion in first place.

Mockup is here: https://design.penpot.app/#/view/83184000-72be-11ec-8da6-c2b142838c8b?page-id=83184001-72be-11ec-8da6-c2b142838c8b&index=0&share-id=b40c0ac0-72c3-11ec-8da6-c2b142838c8b
Comment 51 sdc.blanco 2022-01-11 10:20:17 UTC Comment hidden (off-topic)
Comment 52 Heiko Tietze 2022-01-11 10:39:11 UTC Comment hidden (off-topic)
Comment 53 Buovjaga 2022-01-11 10:43:18 UTC Comment hidden (no-value)
Comment 54 Heiko Tietze 2022-01-17 11:30:19 UTC Comment hidden (no-value)
Comment 55 Commit Notification 2023-03-01 21:43:39 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#62032 sw: let paragraph UI set List Level

It will be available in 7.6.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 56 Commit Notification 2023-03-01 21:44:42 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/46e74a8bf03c06776cb144418206db7c4b843b41

tdf#62032 sw: make List Level UI experimental

It will be available in 7.6.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 57 sdc.blanco 2023-03-02 07:21:56 UTC
(In reply to Commit Notification from comment #55)
> Affected users are encouraged to test the fix and report feedback.

1.  "List Level" is not remembered (and not applied).

Test A.  
Use existing PS, change List Level to "Level 2"  (OK).
Apply updated PS to paragraph
Actual:  Outline level is applied, List level is 1.
Expected:  Outline level is applied, List level is 2.

Test B.
Make a new PS.
Set Outline Level 2, List Level 2
Apply new PS to paragraph
Actual:  Outline level is applied, List level is 1.
Expected:  Outline level is applied, List level is 2.

Test C.  
With each PS from Test A and Test B.
Set list level as "Same as outline level"
Actual:  Outline level is applied, List level is 1.
Expected:  Outline level is applied, List level is 2.

In all cases, after opening the PS for editing, the list level had reverted to Level 1.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 46e74a8bf03c06776cb144418206db7c4b843b41
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 58 sdc.blanco 2023-03-02 11:32:48 UTC
Problem in sum: 

if Outline level is Text Body, and list level is set to a particular level, then list level is changed to "Same as outline level"

If Outline level is set to non-Text Body outline levels, and list level is set to a particular level, then list level is changed to "Level 1"

based on following tests.

Test D. Edit "Default Paragraph Style"

-Do not change Outline Level.
-Choose List style, and a List level (e.g., Level 3)
-OK, and then edit again.

Actual:  List level changed to "Same as outline level"

Test E. . Edit "Default Paragraph Style"

-Change Outline Level (eg. Level 4)
-Choose List style, and a List level (e.g., Level 3)
-OK, and then edit again.

Actual:  List level changed to "Level 1",
Comment 59 Justin L 2023-03-02 15:43:54 UTC
(In reply to sdc.blanco from comment #58)
The problem was that the list level wasn't changed/set at all. (A "no level defined" means level 1.) A last minute change to my code broke the situation where no list level was previous assigned. Fix coming soon.

P.S. Testing hint: using "Numbering ivx" as the testing style because it shows different numbering depending on the level. Level 1 uses lower roman "i.", level 2 uses upper roman "I.", level 3 uses "a)", and level 4+ use a bullet.

I'll also add a note that I hit some kind of infinite loop on one (unshareable) document when setting "Default Paragraph Style" to numbering ivx and some list level both at the same time. (It didn't lock up when doing it separately - although of course then it doesn't apply the indenting/sublevels either). Probably just a coincidence, but it confirms the benefit of keeping this as experimental.
Comment 60 Commit Notification 2023-03-02 17:59:07 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#62032 sw List Level UI: don't require old value

It will be available in 7.6.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 61 sdc.blanco 2023-03-03 13:50:23 UTC
Some experiences from today:
1. Changes to list level in dialog are remembered now. (Thanks for repair Justin.)
2. DPS (=Default Paragraph Style), OL(=outline level), LL (=list level)
    a. New document, edit DPS, assign List Style, give arbitrary OL and LL
       Actual: first paragraph takes those assignments. 
    b. Press Enter.
       Actual: List level (and numbering) is lost   (standard "list" behavior)
       Expected: List level remains
    c. Press Ctrl+M (clear formatting).
       Actual:  PS settings applied  (OK)
   
Additional Notes:  
    (Style Inspector does not show any Direct Formatting after step b)
    (Ctrl+M on existing paragraphs (with different outline levels and list levels applied manually) does not change them (OK).  
    (Changing OL or LL in DPS does not apply "retroactively" to existing paragraphs (OK)

3.    a. Repeat step 2a (to set up DPS with OL and LL), then make several paragraphs.
      b. For the last paragraph, press Backspace twice (standard practice to get out of a list). 
      c. Change settings for OL or LL in DPS.
         Actual: No change to paragraphs  (same as point 2)
      d. Insert new paragraphs
         Actual: PS is not applied to the new paragraphs, until Ctrl+M is used on the paragraphs.      
         Expected:  I guess I expected that new paragraphs would pick up PS.

4.  The Promote/Demote Outline Level widgets on Bullet and Numbering toolbar change list level. (this is not your fault; it reveals some long-standing problems with UI to adjust outline level and list level for paragraphs that have both).  Could only change outline level using Navigator.

5.  More interesting:   Can use option in meaningful situations.  For example, two new PS, "Appendix H2" and "Appendix H3" with OL =2 (or 3) and LL = outline level.  (In the past, it was necessary to manually increase the LL for such PS, now the correct numbering appears automatically. Very useful). 

One "cloud" in the picture:  Apply "Appendix H3" to paragraph.  Then apply "Appendix H2" to same paragraph.  Outline Level changes to "2" as expected, but LL remains at 3.
Comment 62 Commit Notification 2023-07-10 06:19:09 UTC
luigiiucci committed a patch related to this issue.
It has been pushed to "master":

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

tdf#62032 use style list level when changing style

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 63 Buovjaga 2023-08-08 19:16:06 UTC
Any other change needed or can this be closed as fixed?
Comment 64 Justin L 2023-08-08 21:14:50 UTC
(In reply to Buovjaga from comment #63)
> Any other change needed or can this be closed as fixed?

More changes are needed. The UI is only experimental (comment 56)