Bug 156315 - "Evaluate up to level" changed meaning?
Summary: "Evaluate up to level" changed meaning?
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 beta1+
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2023-07-16 19:13 UTC by goodguy00@zoho.com
Modified: 2023-10-24 10:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
some headings and indexes to play with (38.88 KB, application/vnd.oasis.opendocument.text)
2023-07-16 19:16 UTC, goodguy00@zoho.com
Details
screenshot proving index exists (71.48 KB, image/jpeg)
2023-07-21 09:44 UTC, goodguy00@zoho.com
Details
bibisecting document (40.86 KB, application/vnd.oasis.opendocument.text)
2023-09-23 14:23 UTC, BogdanB
Details
Outlines of the bug document (23.73 KB, image/png)
2023-09-25 06:44 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goodguy00@zoho.com 2023-07-16 19:13:57 UTC
Description:
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

Actual Results:
index shows nothing. only after setting "Evaluate up to level" to >=N, the styles (headings) are shown.

Expected Results:
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.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.1 (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
Calc: threaded

so, either "Evaluate up to level" means now something without meaning or it's a bug.
Comment 1 goodguy00@zoho.com 2023-07-16 19:16:03 UTC
Created attachment 188398 [details]
some headings and indexes to play with
Comment 2 sdc.blanco 2023-07-17 11:03:03 UTC
(In reply to goodguy00@zoho.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.
Comment 3 goodguy00@zoho.com 2023-07-21 09:44:10 UTC
Created attachment 188504 [details]
screenshot proving index exists
Comment 4 goodguy00@zoho.com 2023-07-21 09:49:39 UTC
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.
Comment 5 Buovjaga 2023-09-05 16:17:52 UTC
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.
Comment 6 BogdanB 2023-09-23 14:23:28 UTC
Created attachment 189773 [details]
bibisecting document

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
commit b299b00273feb0effb4042e6a0c458e72dfe29ae
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Mar 15 13:56:28 2023 +0100

    source 5c04c4474236cc50009aea6d89f7c443c861af19
    
    source 5c04c4474236cc50009aea6d89f7c443c861af19

 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?
Comment 7 Andreas Heinisch 2023-09-23 17:00:42 UTC
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.
Comment 8 Andreas Heinisch 2023-09-25 06:44:21 UTC
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?
Comment 9 BogdanB 2023-09-25 07:12:06 UTC
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.
Comment 10 Andreas Heinisch 2023-09-25 07:29:27 UTC
Doesn't this contradict bug 40142?
Comment 11 Andreas Heinisch 2023-09-25 07:58:15 UTC
(In reply to goodguy00@zoho.com from comment #0)
> Description:
> 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
> index
Evaluate up to that level not the number of levels.
Comment 12 goodguy00@zoho.com 2023-10-01 21:05:17 UTC
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).
Comment 13 Andreas Heinisch 2023-10-02 07:07:07 UTC
Unfortunately, yes. Implementing the other way round would lead to a restriction of various scenarios.
Comment 14 sdc.blanco 2023-10-11 07:33:05 UTC
(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 [1], but what do you think is wrong there?

[1] (I guess): https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120211.html
Comment 15 Andreas Heinisch 2023-10-11 07:37:26 UTC
It states:

"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.
Comment 16 sdc.blanco 2023-10-23 12:07:12 UTC
(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.

Additional issues:

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”.
Comment 17 Andreas Heinisch 2023-10-24 09:44:05 UTC
Imho, that is the correct description of the functionality.
Comment 18 sdc.blanco 2023-10-24 10:13:16 UTC
(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.