Bug description: headings are interpreted as lists, so, list style applied, and list markers (numbers by default) appear.
After some investigation I've found a style:num-format property of text:outline-level-style. It's used for analyzing, which symbol should be used for numbered list: decimal number, Rome number, alphabet, etc. If style:num-format = "" (this is normal), then Calligra leaves formatSpecification's default value -- it is Numeric, which leads to behavior, seen on a screenshot.
Details
- Reviewers
pvuorela boemann danders - Group Reviewers
Calligra: 3.0
Diff Detail
- Repository
- R8 Calligra
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I think this will break those headings that actually should have numbering, so i think further investigation is needed with such cases
list->add(block, level); is called everytime, no matter if option "is-list-header" exists, or not. So, all headings are supposed to be lists? Then, how should we distinguish numbered from nonnumbered one?
All I'm saying is removing it completely is probably just as wrong as leaving it in. Maybe you could come up with some if case
Interesting: saving document with numbered, and then unnumbered headings explicitly sets text:is-list-header to "true".
This looks scarily generic
What happens when the user via gui adds a numbered lists, and what is the impact in the other applications
You are definitely on to something with formatSpecification, but maybe not setting is for all but only when loading headers without numbers.
But there is a simple statement in loadOdf function: if "num-format" is empty, then formatSpecification has a default value -- Numeric style. Isn't it strange, assuming all list styles numerical?
Not strange for a normal list - but yes for headings it sounds wrong - and I think this is where you need to make the changes.
So if in load odf you are loading a heading and it doesn't specify numbering set it formatspecification to empty.
But please make sure that "it doesn't specify numbering" is checked in parent styles etc. Also if the code is shared with presenter then presenter probably should react differently. the fix is probably not simple at all, but keep digging and check the odf standard specification
According to this is it correct to set formatSpecification to Empty if "num-format" value is empty in all lists, not only in headings?
OK, let's set formatSpecification explicitly to Empty if "num-format" value is empty. OASIS 1.2 says, in cases "an empty string" or "no value" is given, then no number sequence is displayed.
Actually seems to now revert that one line as it was before commit fc7b878f206fb / https://bugs.kde.org/show_bug.cgi?id=306141
But the rationale sounds good to me, fixes the issue and not able to immediately reproduce the old bug.
Camilla, ok for you?