Bug 151462 - sub-indexes do not update
Summary: sub-indexes do not update
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.5.0 target:7.4.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2022-10-10 22:28 UTC by goodguy00@zoho.com
Modified: 2022-11-02 09:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
chapters with indexes (13.47 KB, application/vnd.oasis.opendocument.text)
2022-10-10 22:30 UTC, goodguy00@zoho.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goodguy00@zoho.com 2022-10-10 22:28:19 UTC
Description:
in a document with chapters and sub-chapters, having an index at the beginning of each chapter for those subchapters, the indexes do not update but the first one.
that has been working in previous versions (7.3.2.2)

Steps to Reproduce:
1. create chapters (heading1), and under each some sub-chapters (heading2)
2. create an index (in my case in a frame, so that i can easily copy it) for heading2
3. place one index directly under each heading1

Actual Results:
only first chapter-index gets updated. all other chapter-indexes show only the first sub-chapter

Expected Results:
all indexes are filled with the appropriate sub-indexes


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.4.2.2 / LibreOffice Community
Build ID: 1726efbecd001a1fe871cba3e00e71283688f34d
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-CH (en_US.UTF-8); UI: en-US
Comment 1 goodguy00@zoho.com 2022-10-10 22:30:12 UTC
Created attachment 182958 [details]
chapters with indexes
Comment 2 Rafael Lima 2022-10-11 14:48:01 UTC
Indeed this seems to work in

Version: 7.3.6.2 / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL

But it does not work in

Version: 7.4.1.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.4.1~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

So it's a regression.

Up until LO 7.3.6 if you right click the second index and select "Update Index", all entries are shown. In LO 7.4.1 this no longer works.
Comment 3 raal 2022-10-13 16:54:17 UTC
This seems to have begun at the below commit.
Adding Cc: to Andreas Heinisch ; Could you possibly take a look at this one?
Thanks
 62dd4022f1631dc0a2d8b8d3959b21b50ed0a979 is the first bad commit
commit 62dd4022f1631dc0a2d8b8d3959b21b50ed0a979
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Apr 4 12:51:26 2022 +0200

    source 1cac7d18ab8561f129a30d6c93c0f9f1d7868e01

https://git.libreoffice.org/core/+/1cac7d18ab8561f129a30d6c93c0f9f1d7868e01
Comment 4 Andreas Heinisch 2022-10-13 18:15:41 UTC
The problem lies within the anchor of the frame. Currently, the algorithm returns the chapter below the anchor and hence my implementation searches for all subchapters of "sub one" and "another sub one" resulting in just a single index entry "another sub one". Even if you update the first frame it results just in "sub one".

If you drag the frame ABOVE a Heading 1, then the index entries show all the expected entries.
Comment 5 Commit Notification 2022-10-18 06:16:53 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

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

tdf#151462 - Search for outline node containing the current node

It will be available in 7.5.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.
Comment 6 Commit Notification 2022-10-27 10:21:05 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/483afea3a99b928d0e1cb1df0415a06269067559

tdf#151462 - Search for outline node containing the current node

It will be available in 7.5.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.
Comment 7 Commit Notification 2022-11-01 20:55:46 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#151462 - Search for outline node containing the current node

It will be available in 7.4.3.

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.
Comment 8 Commit Notification 2022-11-02 09:21:41 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#151462 - Search for outline node containing the current node

It will be available in 7.4.3.

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.