Bug 58149 - FILEOPEN: HYPERLINK formula functions set wrong URL upon loading
Summary: FILEOPEN: HYPERLINK formula functions set wrong URL upon loading
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.0.beta1
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.1.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-12-11 16:58 UTC by Kohei Yoshida
Modified: 2012-12-11 21:00 UTC (History)
0 users

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 Kohei Yoshida 2012-12-11 16:58:58 UTC
Since we now cache formula results in 4.0 and later, formula cells with HYPERLINK function don't work properly unless the cells get re-calculated.

To reproduce, set in a cell
=HYPERLINK("http://google.com", "Google!")

This shows "Google!" in that cell, and when you click on it, the browser gets launched and you go to Google website.

Now, save that file and reload, and click that cell again.  Now, you get an error dialog indicating that "Google!" is not a valid URL etc.

This is due to the fact that HYPERLINK relies on the formula cell to contain formula tokens, which it doesn't right after load, because we cache the result.

Operating System: All
Last worked in: 3.6.4.3 release
Comment 1 Kohei Yoshida 2012-12-11 16:59:46 UTC
self-confirming...
Comment 2 Kohei Yoshida 2012-12-11 20:46:12 UTC
Taking this.
Comment 3 Kohei Yoshida 2012-12-11 20:57:17 UTC
Fixed.  The auto commit message will follow.
Comment 4 Kohei Yoshida 2012-12-11 20:59:59 UTC
(In reply to comment #0)

> This is due to the fact that HYPERLINK relies on the formula cell to contain
> formula tokens, which it doesn't right after load, because we cache the
> result.

Actually, that's a lie.  The real reason is in the commit message that should follow soon.
Comment 5 Not Assigned 2012-12-11 21:00:18 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a67906259a748b658daa6ee33f23a04755e21b66

fdo#58149: Recalculate HYPERLINK formula cells on load.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.