index, "Evaluate up to level" (https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120211.html) has changed since LO7.6.
including OF7.5, "Evaluate up to level" meant to show that amount of levels. so, if i had an index, in which i wanted to show a specific heading and only that, i created the index from "additional styles" and have set "Evaluate up to level"=1. that has worked fine until OF7.6. now i have to set it to a higher number (in my case =3, because the style i create the index from has "outline"=3, i guess)
Steps to Reproduce:
1. create index from "additional styles", click only a style with outline=N
2. set "Evaluate up to level"=1, because we want to have only 1 level in the index
index shows nothing. only after setting "Evaluate up to level" to >=N, the styles (headings) are shown.
up to LO7.5, "Evaluate up to level" meant having that many levels shown in the index, irrelevant to what outline the styles have been set.
User Profile Reset: Yes
Version: 188.8.131.52 (X86_64) / LibreOffice Community
Build ID: 776eaf34564cbf3f034a0ba1fd1d5c32ff9ccf1c
CPU threads: 4; OS: Linux 6.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-CH (en_US.UTF-8); UI: en-US
so, either "Evaluate up to level" means now something without meaning or it's a bug.
Created attachment 188398 [details]
some headings and indexes to play with
(In reply to email@example.com from comment #0)
> "Evaluate up to level" has changed since LO7.6.
afaik nothing has changed in the UI, the underlying functionality or the help pages in relation to "Evaluate up to level" for "Index".
The attachment here does not include an index, and your steps to reproduce are underspecified (because it is necessary to know which headings are in the document).
As noted in bug 153710, comment 4, if your use of outline levels is "typical" (e.g., start with 1, and no "jumps" greater than 1 between levels), then it will work as expected. But "unusual" or "pathological" cases, such as in bug 153710, can show surprising behavior.
Can you prepare a document with actual headings and actual index (as simple as possible) that behaves differently between 7.5 and 7.6 -- where you explain what is expected in both cases and what you actually observe?
Alternatively, your comment
> that has worked fine until OF7.6. now i have to set it to a higher number
> (in my case =3, because the style i create the index from has
> "outline"=3, i guess)
seems to indicate that you might not understand fully how this command option works -- in which case -- maybe https://ask.libreoffice.org is a better place to start with your question. There are knowledgeable people there, who often can evaluate whether a genuine bug has been encountered.
Setting status to NEEDINFO, because the problem needs better specification.
When you upload your example, then change status back to UNCONFIRMED.
Created attachment 188504 [details]
screenshot proving index exists
eh, now i'm confused. sure does my attached document include indexes (-> screenshot). ans which headings are included can be seen there.
different behavior: (always press ctrl-u to see the indexes being updated)
under 7.5, you'll see content in both indexes
under 7.6 you'll see only index1 with content and index 2 empty.
>seems to indicate that you might not understand fully how this command option >works -- in which case -- maybe https://ask.libreoffice.org is a better place >to start with your question. There are knowledgeable people there, who often >can evaluate whether a genuine bug has been encountered.
this might well be. nevertheless, including LO7.5 this had worked differently.
Repro the second index in attachment 188398 [details] not updating (Linux and Windows). Tried to bibisect with 7.6 repo, but get way too many crashes, both on Linux and Windows. The while loop trick didn't help much, because the crash recovery window popped up and with --norestore I got a KDE crash handler intercepting it and slowing things down https://wiki.documentfoundation.org/QA/Bibisect#Unable_to_start_soffice
Someone else with better luck could try.
Created attachment 189773 [details]
I bibisected using this document. It's a level 1 index, comparing to original document.
Steps to reproduce:
- Open the document I provided
- Edit Index and just press OK.
If it's bad the index content it's gone, if it's good the index content stays.
b299b00273feb0effb4042e6a0c458e72dfe29ae is the first bad commit
Author: Jenkins Build User <firstname.lastname@example.org>
Date: Wed Mar 15 13:56:28 2023 +0100
instdir/program/libswlo.so | Bin 23405832 -> 23405832 bytes
instdir/program/setuprc | 2 +-
instdir/program/versionrc | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
Andreas, please, can you take a look?
Imho the documententation is wrong, because the implementation has a lot of pTextNd->GetAttrOutlineLevel()) <= GetLevel() calls which checks the height of the levels and not the number of levels.
Created attachment 189804 [details]
Outlines of the bug document
sect 1 is outline 4 and the index has the settings up to outline 3, so imho not a bug. Opinions?
User said: 2. set "Evaluate up to level"=1, because we want to have only 1 level in the index.
The he wants index 1, but in the new bad versions the index 1 doesn't appear, like in my bibisect.
In order to bibisect, I took the document he provided and change it like he wanted to use it, with index=1. So, after this commit, the index=1 doesn't appear anymore.
Doesn't this contradict bug 40142?
(In reply to email@example.com from comment #0)
> index, "Evaluate up to level"
> (https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120211.html) has
> changed since LO7.6.
> including OF7.5, "Evaluate up to level" meant to show that amount of levels.
This is not what it means. At least in other code points in the source. It states "Evaluate up to that specific outline level" and not show that NUMBER of levels.
> so, if i had an index, in which i wanted to show a specific heading and only
> that, i created the index from "additional styles" and have set "Evaluate
> up to level"=1. that has worked fine until OF7.6. now i have to set it to a
> higher number (in my case =3, because the style i create the index from has
> "outline"=3, i guess)
That is correct.
> Steps to Reproduce:
> 1. create index from "additional styles", click only a style with outline=N
> 2. set "Evaluate up to level"=1, because we want to have only 1 level in the
Evaluate up to that level not the number of levels.
do i understand the conclusion properly:
- until OF7.6 this has been a bug and we (I) misused it.
- only in OF7.6 it has been "fixed" and now OF behaves correctly and according to the doc.
if this is the case, then i'm fine with it. (even though the behavior up to OF7.5 made more sense ... but that is a philosophical question).
Unfortunately, yes. Implementing the other way round would lead to a restriction of various scenarios.
(In reply to Andreas Heinisch from comment #7)
> Imho the documententation is wrong.
Because of the patch made for bug 40142?
I am willing to make appropriate corrections in the help page , but what do you think is wrong there?
 (I guess): https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120211.html
"Evaluate up to level
Enter the number of outline levels to include in the index."
It should be: "... up to that outline level ..."
The levels in the attached document are set to 4 and will be evaluated until level 3. So they don't get displayed.
(In reply to Andreas Heinisch from comment #15)
> "Evaluate up to level
In the UI for ToC Index, maybe "Evaluate" -> "Include" would give more precise indication of expected behavior? If you agree, then I can change the UI.
Current help says:
> Enter the number of outline levels to include in the index."
Here is a PROPOSAL for changing the help for "Evaluate up to level".
Specify the maximum outline level for a paragraph style specified in ”Create from” to be included in the index.
Happy to receive comments, alternative suggestions, etc.
1. I believe the "Create from" entry in help already mentions the correct idea, quoted here:
"Any paragraph with an outline level less than or equal to the outline level specified in Evaluate up to level is included in the index."
The idea of mentioning "Create from" in the proposed help entry for "up to level" is to direct attention to this explanation as well.
2. But this information about "less than or equal to" is not mentioned for Additional Styles. I think something like the following sentence needs to be added there.
"If the assigned paragraph style has an outline level, then it is included only when its outline level is less than or equal to the value specified in ”Evaluate up to level”.
Imho, that is the correct description of the functionality.
(In reply to Andreas Heinisch from comment #17)
> Imho, that is the correct description of the functionality.
Thanks for confirmation. Post facto I realised that perhaps I should file a separate ticket to propose the label change (now bug 157908), and I can include the help changes there.