Bug 156111 - Drag and drop of a bookmark from the Navigator onto a text selection should use it as the hyperlink text
Summary: Drag and drop of a bookmark from the Navigator onto a text selection should u...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 inReleaseNotes:24.2
Keywords:
: 140260 (view as bug list)
Depends on:
Blocks: Navigator Bookmarks
  Show dependency treegraph
 
Reported: 2023-06-30 23:00 UTC by Stéphane Guillou (stragu)
Modified: 2023-10-21 05:22 UTC (History)
3 users (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 Stéphane Guillou (stragu) 2023-06-30 23:00:41 UTC
Steps:
1. Write some text.
2. Select a word and create a bookmark with Insert > Bookmark > Insert.
3. Select another word and drag-and-drop the bookmark from the Navigator onto the text selection.

Result: nothing happens
Expected: the bookmark is hyperlinked, using the text selection as the hyperlink text, just like would happen if done through the Hyperlink dialog.
Other hyperlinkable elements should get such enhancement too (e.g. Headings, Tables, etc.)

Wasn't possible in OOo 3.3, so inherited.
Tested in recent 24.2 master build.
Comment 1 MW 2023-07-10 15:45:17 UTC
I couldn't reproduce on current build.
Comment 2 Stéphane Guillou (stragu) 2023-07-10 15:53:38 UTC
(In reply to MW from comment #1)
> I couldn't reproduce on current build.

What do you mean?
This is an enhancement request. I'm asking to make it possible to use a text selection as the hyperlink text when drag-and-dropping a hyperlinkable object from the Navigator.

Do you mean that you manage to do that?
Comment 3 Stéphane Guillou (stragu) 2023-07-10 15:55:46 UTC
And maybe the scope can be expanded for this request:

Make this possible when drag-and-dropping any hyperlinkable object from the Navigator (e.g. images, shapes, tables, bookmarks...)

Jim, what do you think?
Comment 4 Jim Raykowski 2023-07-17 06:35:01 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> And maybe the scope can be expanded for this request:
> 
> Make this possible when drag-and-dropping any hyperlinkable object from the
> Navigator (e.g. images, shapes, tables, bookmarks...)
> 
> Jim, what do you think?
Seems like it would be a useful enhancement. Here is a link to a patch that does this for any hyperlinkable object:
https://gerrit.libreoffice.org/c/core/+/154508
Comment 5 Commit Notification 2023-07-23 04:48:48 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156111 SwNavigator hyperlink dnd enhancement

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 6 Stéphane Guillou (stragu) 2023-08-08 20:05:26 UTC
Thanks Jim, works great in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 42364fbfafaa95773c073cc080142b64ec1786fb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

In release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.2&type=revision&diff=680921&oldid=680534
Comment 7 Stéphane Guillou (stragu) 2023-10-21 05:22:41 UTC
*** Bug 140260 has been marked as a duplicate of this bug. ***