Bug 163383 - Internal link in drawing object needs only single click but Tooltip says Ctrl+Click
Summary: Internal link in drawing object needs only single click but Tooltip says Ctrl...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.3 release
Hardware: All All
: medium minor
Assignee: Buovjaga
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2024-10-11 00:04 UTC by Alistair Saywell
Modified: 2024-11-15 15:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Rectangle shape linked to Sheet2 operates with single click (14.59 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-10-11 00:04 UTC, Alistair Saywell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alistair Saywell 2024-10-11 00:04:47 UTC
Created attachment 197004 [details]
Rectangle shape linked to Sheet2 operates with single click

Clicking on an internal link in a shape acts differently to clicking other links in Calc.

1. In  two sheet document I draw a rectangle in Calc and press Ctrl+K to add a hyperlink.
2. I select Document, then "Target in Document", I select Sheet2. OK

Result
A single click takes me to the target although the tooltip says it needs Ctrl+Click

* If I select text in a cell and insert a link the same way it requires Ctrl+click
* If I insert an internet link in the shape it requires Ctrl+click
* In LibreOffice 6.4.7.2, the internal link in the shape requires Ctrl+click to follow the link, just like other links. 
* Version 7.3.1.3 just needs single click.

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded
Comment 1 Aryeh 2024-11-07 23:06:13 UTC
I was able to reproduce the bug. Status changed to new. Thank you.

Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: dd1870369618b2f1fcc7faa9c8e217e556e56c1a
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 2 Buovjaga 2024-11-14 15:52:23 UTC
For reference, the clicking behaviour changed in commit 1b7fc505bdd6c3c44986221c6bbe33af1a0e3ac6
> sc: don't require ctrl-click when clicking on internal links of shapes

> Excel doesn't require such additional actions, and Writer doesn't
> require ctrl-click for internal links (e.g. cross-references), either.

> Also suppress the tooltip hinting ctrl-click in this case.

Then, the suppression stopped in commit 3d75afe9cc89d4c00d224f08331ceaea21214e95
> Use SdrObject::set/getHyperlink

The logic to suppress the tooltip in case of internal links happens in sc/source/ui/view/gridwin5.cxx

Somehow the getHyperlink() function is giving us wrong information about the link.
Comment 3 Commit Notification 2024-11-15 15:42:38 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

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

tdf#163383 Skip adding a tooltip to internal links in all cases

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