Bug 154521 - selecting bookmarks in Navigator triggers selectionChanged event before the selection
Summary: selecting bookmarks in Navigator triggers selectionChanged event before the s...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.3 target:24.2...
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2023-03-31 16:56 UTC by László Németh
Modified: 2023-09-16 19:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2023-03-31 16:56:09 UTC
Description:
In Navigator, double click or enter on a bookmark name selects the bookmark in the text, but the triggered selectionChanged event doesn't give access to the selection.

Steps to Reproduce:
1. create a document with bookmarks
1. add a XSelectionChangeListener to the document
2. double click on a bookmark name


Actual Results:
getSelection() contains empty TextRange (start of the previous selection) in selectionChanged()

Expected Results:
getSelection() returns with a non-empty TextRange of the selected bookmark in selectionChanged()


Reproducible: Always


User Profile Reset: No

Additional Info:
See XSelectionChangeListener.idl
Comment 1 Commit Notification 2023-04-01 17:32:06 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6eb1d540a1e599aa4fe0a321eddb9cc22e0546d3

tdf#154521 sw Navigator: fix selection change event of bookmark

It will be available in 7.6.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 2 Commit Notification 2023-04-02 20:59:29 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#154521 sw Navigator: fix selection change event of bookmark

It will be available in 7.5.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 3 Commit Notification 2023-06-16 09:17:13 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#154521 sw navigator: allow to query selected bookmark via UNO

It will be available in 24.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.
Comment 4 Commit Notification 2023-06-20 12:54:55 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/8c234976c1d3536aab506a30487d8f5d26767c6a

tdf#154521 sw navigator: allow to query selected bookmark via UNO

It will be available in 7.6.0.0.beta2.

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.