Bug 45532 - If not updated, external links to cells with no value show #REF!, if no linked cell to that sheet has a value
Summary: If not updated, external links to cells with no value show #REF!, if no linke...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 RC2
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 03:13 UTC by devseppala
Modified: 2016-01-16 15:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Cacl document to show the refecence error problem (14.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-02-02 03:13 UTC, devseppala
Details
Link target file for the first LinkFile.ods document (8.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-02-02 03:14 UTC, devseppala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devseppala 2012-02-02 03:13:07 UTC
Created attachment 56505 [details]
Cacl document to show the refecence error problem

If not updated, external links to cells with no value show reference error (#REF!), if no linked shell on that sheet has a value. If there is even one link to cell on the sheet that has a value, all the other links show correctly, even if there is no value in the linked cell.

This bug is really annoying and was really hard to track down because of the special condition required to trigger it. I have tested that this bug exists on both 3.4.5 and and 3.5.0 (RC1+RC2) version. I think it was introduced when the handling of external links was massively re-worked in the LO 3.4 version. 

To clarify the problem I will attach two files: LinkFile.ods and TargetFile.ods, please save them both to same folder.

1.
Open the LinkFile.ods, but DO NOT UPDATE LINKS to see the #REF error in cell B8 on sheet1.
2.
Then close and open the document again, but this time update the links. 
The #REF! error should be replaced by value "0" .
3.
Then save, close and open the document again, but do not update links. 
The #REF! error should be mysteriously back again.
4.
Then close and open the document again, but this time update the links. 
The #REF! error should be once again replaced by value "0" .
Then insert a link from this sheets cell B11 to a TargetFile.ods sheet2 cell B11, 
then save and close the document.
5. 
Open the document once again without updating the links.
Now there should be no #REF! error, even when not updating the links.
Comment 1 devseppala 2012-02-02 03:14:42 UTC
Created attachment 56506 [details]
Link target file for the first LinkFile.ods document
Comment 2 devseppala 2012-02-02 05:17:38 UTC
Furthermore, OpenOffice 3.2.1 does not correct the reference errors(#REF!) even when updating the document. Only when you manually delete on character from the end of the link and insert it back (and press enter), OpenOffice corrects the link.
Comment 3 ign_christian 2013-05-23 02:30:49 UTC
reproducible on LO 4.0.3.3 (Win7 32bit)

> 5. 
> Open the document once again without updating the links.
> Now there should be no #REF! error, even when not updating the links.

Seems that it must be triggered with inputting another link, or doing Comment 2 also works.
Comment 4 devseppala 2013-09-12 13:19:36 UTC
This bug has been apparently fixed with some seemingly unrelated change between LO 4.0.x and 4.1 beta1. I tried to look at these changes, but I could not determine what could have been the change that fixed this bug.

http://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-4-1&qt=grep&q=link
http://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-4-1 

Anyway, nice to see this issue got resolved. I hope it does not come haunting back at some later time ;)

Can someone else also confirm this issue fixed?
Comment 5 Owen Genat (retired) 2014-07-22 11:16:45 UTC
(In reply to comment #4)
> Can someone else also confirm this issue fixed?

Confirmed as working under MacOS 10.6.8 using v4.3.0.3 (x86) and GNU/Linux x86_64 using v4.2.5.2 and v4.4.0.0alpha+ (2014-07-19). Status set to RESOLVED as WORKSFORME (because I can't find a related fix).