Bug 137358 - Cursor positioned before first heading shows incorrect outline position tracking in Navigator
Summary: Cursor positioned before first heading shows incorrect outline position track...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2020-10-09 05:18 UTC by Jim Raykowski
Modified: 2021-01-17 04:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
file to demonstrate outline position bug (24.14 KB, application/vnd.oasis.opendocument.text)
2020-10-09 05:18 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2020-10-09 05:18:30 UTC
Created attachment 166214 [details]
file to demonstrate outline position bug

This happens when there is a heading in a frame, header or footer and content before the first heading in the document. In this case the Navigator should not have a heading highlighted when the cursor is positioned before the first heading.

Steps to repro:

1) Open attached file outlineposbug.odt
Cursor is at beginning of document before the word "Title"
2) Open Navigator Menu->View->Navigator (F5) or Menu->View->Sidebar (Ctrl+F5) and select Navigator tab in the tab bar

Results:
"Chapter 6" is selected in the Navigator content view Headings content section.

Expected results: 
No selection in the Navigator content view.
Comment 1 Roman Kuznetsov 2020-12-29 17:38:51 UTC
confirm in

Version: 7.2.0.0.alpha0+ (x64)
Build ID: ad9e04321df25824d2288a2ef1f4275f070f1cf7
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL

but there is a strange thing: when I press F5 and it showed me a Navigator floating window with selected Headings item, but after docking the Navigator to its place I saw that Chapter 6 item became selected itself >_<
Comment 2 Jim Raykowski 2020-12-29 21:30:44 UTC
Nice observation of the floating Navigator not tracking the cursor position when initially shown! In certain situations this can also be repro'd using Ctrl+F5 to open the Navigator in the sidebar. The reason for this happening is that the document edit window needs to have focus for Navigator tracking to update. I will include a fix to update tracking on Navigator showing with the fix for this bug report.
Comment 3 Jim Raykowski 2020-12-30 00:26:53 UTC
Here is a patch for both issues:

https://gerrit.libreoffice.org/c/core/+/108492
Comment 4 Commit Notification 2021-01-16 22:32:08 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/602a044014b55a5a1b1a5f0e96af603590ee899f

tdf#137358 Fix incorrect outline position returned

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