Bug 104206 - Allow Paragraph Styles to bind to List Styles' levels, like with Outline Numbering
Summary: Allow Paragraph Styles to bind to List Styles' levels, like with Outline Numb...
Status: RESOLVED DUPLICATE of bug 62032
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2016-11-27 17:31 UTC by Mike Kaganski
Modified: 2021-11-21 16:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2016-11-27 17:31:23 UTC
This enhancement request is about extending current List Styles and Paragraph Styles to cover what is currently available as Outline Numbering feature.

Outline Numbering works like a special kind of List Style that has following properties:
1. It is outline-style list;
2. It has unique ability to bind its levels to paragraph styles;
3. Its levels are also associated with document outline levels;
4. It is associated by default with document's Heading X paragraph styles;
5. If paragraph with a style having such association is promoted/demoted (e.g. using Bullets and Numbering toolbar), its paragraph style also changes to that which is associated with new list level.

When a paragraph style is associated with Outline Numbering level, its "Outline & Numbering" property page controls for Numbering style and Outline level become disabled.

OTOH, any paragraph, that is not used in Outline Numbering, may be associated with a list style using controls on that property page. This allows paragraphs with that paragraph style to become numbered using selected list style, and retain the paragraph style on changing list's level.

Currently, there's no way to provide alternating numbering style associated with outline levels in a document, e.g. to allow headers numbered this way:

1. Heading
1.1. Sub-heading
1.2. Sub-heading
2. Heading
2.1. ...
...
Appendix A. Appendix heading
A.1. Appendix sub-heading
...

To make such numbering today, the second style of numbering will require manually assigning levels in each appendix (sub-)heading, because otherwise LO doesn't associate list level to outline level for normal lists.

The proposal is the following: to allow paragraph style to optionally specify selected list style's level at the Outline & Numbering property page. With this change, if there is a new drop-down list labelled like "Numbering level:" with options "Any;1;2;3...10", then if "Any" is selected (by default), then the paragraph/list would work as normal paragraph/list styles work today; if any numbering level is specified in this list, then the paragraph+list begin working like Outline Numbering works today.

Associating a paragraph style to list style level should not disable choosing paragraph's outline level. They should be different properties, so allowing to use the feature not only with heading, but also in other scenarios.

If a paragraph style is associated with a list style's level, then it should be impossible to select the same list style's level for another paragraph style (1:1 relation). This is to allow promoting/demoting list levels, and at the same time changing paragraph styles (see #5 in the Outline Numbering properties). This will automatically associate numbering levels with paragraph style's outline levels.

Implementing this proposal would not require breaking compatibility (as current behavior is default and is subset of the proposal); it will make separate Outline Numbering feature obsolete, as its functionality is also completely superseded by this enhancement. It would allow for outline numbering schemes like the one depicted above, by providing a new set of headings with its own associated list style that will assign levels accordingly to heading style.

I suppose that it could be made a GSoC project task.
Comment 1 Heiko Tietze 2016-12-11 09:33:55 UTC Comment hidden (no-value)
Comment 2 Regina Henschel 2016-12-13 01:54:29 UTC
Please examine ODF and its concepts of outline and lists and discuss file format solutions very early.

(In reply to Mike Kaganski from comment #0)

> When a paragraph style is associated with Outline Numbering level, its
> "Outline & Numbering" property page controls for Numbering style and Outline
> level become disabled.
More exact, if it gets the default outline numbering via Tools > Outline Numbering.

> 
> OTOH, any paragraph, that is not used in Outline Numbering, may be
> associated with a list style using controls on that property page. This
> allows paragraphs with that paragraph style to become numbered using
> selected list style, and retain the paragraph style on changing list's level.
"associated with a list style" is not exact enough. You need to distinguish, whether the paragraph has got an outline level or not on that property page.


> 
> The proposal is the following: to allow paragraph style to optionally
> specify selected list style's level at the Outline & Numbering property
> page.

I'm not sure about this. In case of the default outline, the <text:h> has the text:outline-level attribute. In case of a user outline it has already the same text:outline-level attribute.

Currently in case of user outline, not the numbering-style is used, which has the same text:level value. In case of the default outline this binding between text:outline-level and text:level is done.

 
I see an additional problem: Currently a <test:list> is written, whether an outline level is set or not. So there exists a "level" given by the <test:list> nesting and a setting of the numbering style by the <test:list>. On the other hand, the paragraph style has a list-style-name attribute and a default-outline-level attribute.


>I suppose that it could be made a GSoC project task.
Do you will mentor it?
Comment 3 Mike Kaganski 2016-12-13 06:26:20 UTC
(In reply to Regina Henschel from comment #2)

Thank you for considerations!

> Please examine ODF and its concepts of outline and lists and discuss file
> format solutions very early.

You are absolutely right.
However, I hope, and my vision is, that my proposal can be implemented without modifying the ODF standard at all.

I must say that I see this as UI-only concept. From the user PoV, the binding between a paragraph style and a list style is what program does when user sets the style or changes list level. I suppose that the bond may be defined in ODF by using application-specific extended tags in corresponding styles, and then modifying the app behavior in relevant places. The ODF output should stay unmodified (modulo the extended style properties to keep the bond between sessions).

So, the output file should have normal list and outline structure, so it will be open with any previous version, or with other ODF viewer, without problems; the only missing thing in those older/alien versions will be the bond loss and, thus, need to make all style-to-level adjustments manually.

> >I suppose that it could be made a GSoC project task.
> Do you will mentor it?

It would be an honor for me. I may only hope that I can succeed in this.
Comment 4 Heiko Tietze 2016-12-13 09:57:51 UTC
(In reply to Mike Kaganski from comment #3)
> > >I suppose that it could be made a GSoC project task.
> > Do you will mentor it?
> 
> It would be an honor for me. I may only hope that I can succeed in this.

You are very welcome! https://wiki.documentfoundation.org/Development/GSoC

Any further UX advice needed?
Comment 5 Regina Henschel 2016-12-13 10:25:50 UTC
ODF 1.2 has no means to store information about a 1:1 relationship between paragraph style and numbered-list style. Using elements or attributes in loext namespace would include, that the LibreOffice project makes a proposal to include these extensions in the next ODF version. But I'm not sure whether adding such extensions would be enough, because the structure of the default outline is different from the structure of the user outline in the way LibreOffice writes it to file now.

It is surely not an "UI only" problem.
Comment 6 Mike Kaganski 2016-12-13 10:37:15 UTC
(In reply to Regina Henschel from comment #5)
> ODF 1.2 has no means to store information about a 1:1 relationship between
> paragraph style and numbered-list style. Using elements or attributes in
> loext namespace would include, that the LibreOffice project makes a proposal
> to include these extensions in the next ODF version.

Such a proposal is not a problem per se, right?

> But I'm not sure
> whether adding such extensions would be enough, because the structure of the
> default outline is different from the structure of the user outline in the
> way LibreOffice writes it to file now.
> 
> It is surely not an "UI only" problem.

Let's suppose that we create everything as we do now.
Further, let's not change current Outline Numbering feature.
Now let's add two loext elements to both paragraph style (pointing to list style level) and to list style level (pointing to paragraph style). That hasn't yet changed the structure? Only added extended property.

Now let's change current UI logick: in case user wants to apply a paragraph style, we additionally check that extended property, if set -> apply not only list style, but also its associated level to generated list (the list is already generated now when a list style is associated with paragraph style, correct?). If we want to change level of a list with a list style in UI, then we look at its extended property and if set, also set the paragraph style associated with wanted level. And the same for other UI actions. But the end result of each action is usual ODF structure.
Comment 7 RGB 2016-12-13 11:27:21 UTC
AFAIT, Calligra Words (it also use ODT as default file format) does not have a dedicated "outline numbering tool", with numbering of headings being managed directly from the paragraph style.
Comment 8 Regina Henschel 2017-04-05 19:58:17 UTC
I have looked deeper in the specification, and now think, LibreOffice can do some binding of paragraph style and list level via attribute style:list-level. Read my comment in bug 62032.

I think, this bug is duplicate to bug 62032.
Comment 9 Mike Kaganski 2017-04-05 20:52:53 UTC

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