Bug 159428

Summary: Navigator: Bookmark gets highlighted instead of heading
Product: LibreOffice Reporter: Samuel Mehrbrodt (allotropia) <samuel.mehrbrodt>
Component: WriterAssignee: Samuel Mehrbrodt (allotropia) <samuel.mehrbrodt>
Status: RESOLVED FIXED    
Severity: normal CC: samuel.mehrbrodt
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Attachments: Bugdoc

Description Samuel Mehrbrodt (allotropia) 2024-01-29 15:03:02 UTC
Created attachment 192236 [details]
Bugdoc

1. Open bugdoc.
2. Open the Navigator.
3. Put the cursor before "Heading 1" on page two.

Expected: "1 Heading 1" gets highlighted in the Navigator
Actual: "_Toc..." gets highlighted in the Navigator.

When a bookmark is in a heading, highlighting the heading is more important than highlighting the bookmark. Highlight the heading in this case.
Comment 1 Commit Notification 2024-02-05 06:50:42 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/070b4ddda4983773e8a989a116924bee0f651f25

tdf#159428 Prefer heading over bookmarks in Navigator

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.