Bug 159418 - Missing Navigation Arrows for Editing Index Entry
Summary: Missing Navigation Arrows for Editing Index Entry
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Armin Le Grand (allotropia)
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2024-01-28 20:00 UTC by Robert Großkopf
Modified: 2024-03-29 10:40 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of dialog for eding index on LO 24.2.0.2 and LO 7.6.4.1 (48.69 KB, application/pdf)
2024-01-28 20:00 UTC, Robert Großkopf
Details
Edit Index Entry Menu - Missing Arrow Buttons in LO 24.2.0 (23.00 KB, image/png)
2024-02-27 04:42 UTC, Tex2002ans
Details
Little example with 2 entries and a description how to get the buggy behavior. (15.26 KB, application/vnd.oasis.opendocument.text)
2024-03-18 11:23 UTC, Robert Großkopf
Details
4.Index.Entries.ODT (11.76 KB, application/vnd.oasis.opendocument.text)
2024-03-19 00:43 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-01-28 20:00:06 UTC
Created attachment 192209 [details]
Screenshot of dialog for eding index on LO 24.2.0.2 and LO 7.6.4.1

Open the attached file with 2 screenshots: Says all.

When editing index entries there were arrows to move to the next index. Help describes this arrows. This arrows have been on different positions in the past, but with LO 24.2.0.2 the arrows have gone completely.
Comment 1 Harald Berger 2024-01-30 11:25:21 UTC
I can confirm Robert's description of the problem.

---
Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 2 raal 2024-02-02 12:46:34 UTC
No repro with Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b39c6082aa975ed8e5696c3dc24c3025ed07bbb6
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 3 Robert Großkopf 2024-02-02 15:18:43 UTC
Right, couldn't repro with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3fc0eb2bc8b439bda286e0c87a9814d90cc9d9d5
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Will see if it has gone in the next releases of LO 24.2.
Comment 4 Robert Großkopf 2024-02-02 15:38:15 UTC
Bug is still there in
Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 5 Tex2002ans 2024-02-24 15:00:02 UTC
A user on the LibreOffice subreddit just came across this "missing arrow buttons" bug too:

- https://www.reddit.com/r/libreoffice/comments/1aytsyo/indexes_cannot_be_stepped_through_in_24203/

They were using:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 12; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.utf8); UI: en-US
Flatpak
Calc: threaded

and I verified on my end too:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - - -

I verified this by:

1. Insert > Table of Contents and Index > Index Entry

Expect:

- Little Left/Right arrow buttons towards bottom of "Insert Index Entry" popup.
   - These step you through (or jump you) to each of the entries in your document.

Actual:

- No Left/Right arrow buttons.
Comment 6 Tex2002ans 2024-02-27 04:37:43 UTC
I think I was able to bibisect it to:

- https://cgit.freedesktop.org/libreoffice/core/commit/?id=ab7c81f55621d7b0d1468c63305163016dd78837

Both in win64-24.2 branch + linux-64-24.2.

(Hopefully I did it correct, it's only my 3rd bibisect ever.)

- - - - - - - - -

author	Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>	2023-10-04 15:42:27 +0200
committer	Armin Le Grand <Armin.Le.Grand@me.com>	2023-11-07 18:07:13 +0100
commit ab7c81f55621d7b0d1468c63305163016dd78837 (patch)
tree 4fb039902ced911bb96660edd343ee5705e5688b
parent 89780c208837973e21ddbf098d77f4369018ee9e (diff)
ITEM: Get away from classic 'poolable' Item flag

- - - - - - - - -

And whoops, my instructions in comment 5 were wrong.

Here's better instructions:

1. Insert > Table of Contents and Index > Index Entry
2. In "Entry" box:
   - Type "Test".
3. Press "Insert" button twice.
3. Back in document, on gray highlights:
   - Right-Click > "Edit Index Entry"

The "Edit Index Entry" menu should have up to 4 arrow buttons (2 sets of 2) in UI.

2 left/right arrows:

- Previous entry (same name)
- Next entry (same name)

2 left/right arrows:

- Previous entry
- Next entry
Comment 7 Tex2002ans 2024-02-27 04:42:38 UTC
Created attachment 192812 [details]
Edit Index Entry Menu - Missing Arrow Buttons in LO 24.2.0

I attached a PNG showing before/after (correct/wrong).

You can see a 2x2 grid of left/right (previous/next) arrows showing in UI.
Comment 8 Armin Le Grand (allotropia) 2024-03-18 10:13:10 UTC
Thanks for bibisecting and having a look already. Screenshots are clear, will try to reproduce using descriptions.
Taking a look (no idea about that dialog, never used it, but hope to find it in SW?)...
Comment 9 Armin Le Grand (allotropia) 2024-03-18 10:23:31 UTC
1st try: New SW (empty), following comment 6:
At 2nd step '3' (should be 4?) (Back in document) I have no 'gray hilights' -> cannot "Edit Index Entry"

2nd try: Added some text (dt + F3) selected 2nd word 'heard', step (1), step (3). Then after close DLG I can call "Edit Index Entry" on word 'heard' and get the DLG -> but DLG *has* all buttons then.

So using that I could not reproduce here. I am sure I am reproducing wrong, so could I ask for a description to get the error for someone who does not use that DLG/does not know it..?
Comment 10 Armin Le Grand (allotropia) 2024-03-18 10:29:34 UTC
3rd try:
- new SW
- insert/Table..Contents/Index Entry...
- type 'test1' in 'Entry' -> press 'insert'
- type 'test2' in 'Entry' -> press 'insert'
- close DLG
-> no 'gray markers'* in SW, but still 'Edit Index Entry...' in contextMenu
-> open it
-> Indeed DLG *without* arrows

(Once got DLG with right/left arrow after using CTRL+A first in SW, so maybe even 'instable' to reproduce...)
Comment 11 Armin Le Grand (allotropia) 2024-03-18 10:41:52 UTC
Really stange -> now getting *all four* arrows using 'Test' and 'insert' twice (context menu & using 'Edit...' seems already to do an implicit 'CTRL+A').

I get now three cases:
(A) When inserting single entry 'Test' -> No arrows
(B) When inserting 'Test' twice -> All four Arrows
(C) When adding 'Test1' and 'Test2' -> Right/Left Arrows only

I do not use or know that DLG, so can someone please tell me
- define what is wanted behaviour
- define what is different to before
Thanks in advance
Comment 12 Armin Le Grand (allotropia) 2024-03-18 11:09:50 UTC
Compared with LO release version 7.4.1.2 -> A,B,C are the same (?) so where is the error..?
Comment 13 Armin Le Grand (allotropia) 2024-03-18 11:20:25 UTC
Checked the code (sw/source/ui/index/swuiidxmrk.cxx) and buttons m_xPrevSameBT/m_xNextSameBT/m_xPrevBT/m_xNextBT visibility is dependent of areSfxPoolItemPtrsEqual, so may be related to mentioned bibisected change. But there is/was also already tdf#158783 where I adapted/changed this, so this may already be fixed by that? In that case, pls give update of status of this task.
Comment 14 Armin Le Grand (allotropia) 2024-03-18 11:21:41 UTC
NOTE: tdf#158783 was fixed around 2024-01-20
Comment 15 Robert Großkopf 2024-03-18 11:23:12 UTC
Created attachment 193178 [details]
Little example with 2 entries and a description how to get the buggy behavior.
Comment 16 Robert Großkopf 2024-03-18 11:45:40 UTC
Tested again with
Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Bug is still there.
Comment 17 Tex2002ans 2024-03-19 00:43:51 UTC
Created attachment 193185 [details]
4.Index.Entries.ODT

Hey Armin,

Thanks for checking it.

- - - - - - - - -

Attached is a sample ODT with 4 Index entries between 2 arrows:

> There are 4 Index Entries here ---> <----

- 3 unique entries
   - This gets you 1 set of left/right arrows.
- 1 "same" entry
   - This gets you a 2nd set of left/right "same name" arrows.

- - - - - - - - -

All you'll have to do is:

1. Right-Click > "Edit Index Entry" between the arrows
    - (Right-Click on the gray highlight.)

In the "Edit Index Entry" menu, you should then see:

- If it fully works:
   - The 2x2 left/right arrows like left-side of my comment 7 screenshot.
- If it doesn't work:
   - NO left/right arrows like the right-side of screenshot.
   - OR 1 set of left/right arrows.

Pressing the left/right arrow buttons should then cycle you through those 4 entries (if everything was working properly, like pre-24.2.0!). :)
Comment 18 Armin Le Grand (allotropia) 2024-03-19 09:46:09 UTC
Thanks, will have another look
Comment 19 Armin Le Grand (allotropia) 2024-03-19 10:57:24 UTC
Thanks to both of you, checked and found, comparing current master (A) with LO7.4.1.2 (B) (on my installed distro):
----
Comment15/16:

in A: right-click&edit on 'text' or 'entries' in the text (NOT in the index below, right?) gives me the dlg with right/left arrows, I can travel between both, the selection in the EditView gets changed/hilighted to show that

in B: SAME

ONLY difference I see here is that 'text' and 'entries' is *not* grayed in (A) so I have to 'guess'/know that these are index entries at all -> that might be an error (?)
-----
Comment17:

in A: get the dlg with right/left arrows and can travel forth/back

in B: SAME

also ONLY diff again is that I see no grayed entries in (A).
So I do *not* get the 2x2 buttons, not in (a) and not in (B)
----

It seems I do not know enough about this and cannot decide what *should* happen, so I think it's too dangerous if I try to fix that.
Added mst to cc

@mst: Is there an error and if what is the error? I guess you are much more qualified here to fix this (?) It definitely has to do with sw/source/ui/index/swuiidxmrk.cxx and usage of areSfxPoolItemPtrsEqual with SwTOXMark*, as we changed due to tdf#158783 (remember?)
Comment 20 Armin Le Grand (allotropia) 2024-03-19 13:39:45 UTC
Ah, seems like d22a86089edfcadbef5231525a2947b954f4784e which fixes this is in 24.8 (master) but not in 24.2 - that's why I do not see the error - thanks to MST!
Will try to cherry-pick for 24.2...
Comment 21 Armin Le Grand (allotropia) 2024-03-19 13:40:58 UTC
See https://gerrit.libreoffice.org/c/core/+/164996
Comment 22 Armin Le Grand (allotropia) 2024-03-19 13:42:55 UTC
And for the grayed shading of the fields: It needs to be switched on in view/Field_Shadings (also thanks to MST!)
Comment 23 Armin Le Grand (allotropia) 2024-03-19 18:11:46 UTC
Does anyone know - when https://gerrit.libreoffice.org/c/core/+/164996 is done - if I can just commit that to 24.2 and if thai is enough?

@Xisco: Adding you - that fix was missing in 24.2. I am not that involved in that branch, can I just add it then and will it find it's way to the later branches - and how...?
Comment 24 Armin Le Grand (allotropia) 2024-03-20 09:32:25 UTC
Okay, https://gerrit.libreoffice.org/c/core/+/164996 is in - thanks!. I do not know if more needs to be done...
Comment 25 Commit Notification 2024-03-21 07:52:59 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159418: sw: Add UItest

It will be available in 24.8.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.