Bug 146017 - HYPERLINK() entry dies once it attempts to link to #N/A result and undo is applied
Summary: HYPERLINK() entry dies once it attempts to link to #N/A result and undo is ap...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo Calc-Function
  Show dependency treegraph
 
Reported: 2021-12-03 02:49 UTC by Joshua Coppersmith
Modified: 2023-10-22 08:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Simple demonstration following steps to reproduce (9.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-12-03 02:51 UTC, Joshua Coppersmith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Coppersmith 2021-12-03 02:49:21 UTC
Description:
When the HYPERLINK function calculates (has some nested function(s)) a hyperlink to another cell and that calculation results in #N/A the hyperlink breaks completely even if the calculation changes to a valid link due to changes external to the HYPERLINK() cell. Recovery requires re-edit of cell (F2,Space,Enter) or reload of the document. Recalculate/Hard recalculate do not avert the issue [nor does adding a recalculation trigger such as &T(RAND()*0)].

Steps to Reproduce:
1. Insert into A1: =HYPERLINK(ADDRESS(B1,C1))
2. Insert into B1: 1
3. Insert into B2: 2
4. Recalculate (F9) as needed since using indirect reference.
5. Hyperlink works as expected, to B1
6. Now insert into B2: =MATCH(-1,{1},1) //Or other throw of #N/A
7. Hyperlink shows #N/A

Actual Results:
8. Ctrl-click on hyperlink acts as 'normal' Ctrl-click multi-select instead of hyperlink
9. Hyperlink is unusable
10. Other hyperlinks in document continue to work
11. Reverting B2 to original (Ctrl-z) value will not reactivate hyperlink, nor will any valid value

Expected Results:
Expectation would be for the HYPERLINK() function to recover from the #N/A once B2 was reverted back to a valid argument for ADDRESS().


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Thanks to Villeroy for double-checking and creating the original spreadsheet that pointed out this oddity.
Comment 1 Joshua Coppersmith 2021-12-03 02:51:35 UTC
Created attachment 176661 [details]
Simple demonstration following steps to reproduce
Comment 2 Joshua Coppersmith 2021-12-03 02:54:44 UTC
Correction: Read C1 for B2 in steps to reproduce. Sorry.
Comment 3 Buovjaga 2022-11-24 13:03:51 UTC
I can repro the hyperlink getting broken. Already in 3.3.0 on Win and also 6.3 on Linux.

Arch Linux 64-bit
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8b442d7fae17660b3665da2c1f7a084341987693
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 24 November 2022