Bug 88179 - Can't create reference for (link to) another spreadsheet's named cell / range
Summary: Can't create reference for (link to) another spreadsheet's named cell / range
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: x86-64 (AMD64) All
: highest major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:5.1.0
Keywords: bibisected, bisected, regression
: 91262 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-07 20:23 UTC by l
Modified: 2016-10-25 19:20 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
the result of test steps (26.77 KB, application/zip)
2015-01-07 20:23 UTC, l
Details

Note You need to log in before you can comment on or make changes to this bug.
Description l 2015-01-07 20:23:27 UTC
Created attachment 111929 [details]
the result of test steps

I create a cell reference an other spreadsheet:
"='file:///C:/toReference.ods'#$namedCell.C7"
If I change the tab and cell reference to its name, like this:
"='file:///C:/toReference.ods'#toReference"
the cell display #NAME? error, and the cell formula change to:
"='file:///C:/toReference.ods'#file:///C:/toReference.ods"

Steps to reproduce:
1. Create a new spreadseet
2. Rename the first tab to "namedCell"
3. Enter "referenced data" string into C7 cell on namedCell tab
4. Add "toReferenceCell" name to C7 cell
5. Save the spreadseet as "toReference.ods"
6. Create an other spreadseet
7. Rename the first tab to "referencig"
8. Type "=" into B3 cell on referencig tab then click to C7 cell on namedCell tab in toReference.ods spreadseet.
9. Press Enter
10. The value of B3 cell will be: "='file:///C:/toReference.ods'#$namedCell.C7"
11. edit the value of B3 cell: chage the "$namedCell.C7" to "toReferenceCell"
12. Press Enter 


Current behavior:
B3 cell display "#NAME?" error and the formula change to: "='file:///C:/toReference.ods'#file:///C:/toReference.ods"

Expected behavior:
B3 cell display "toReferenceCell" string and the formula remain: "='file:///C:/toReference.ods'#toReferenceCell"
Comment 1 raal 2015-01-07 23:34:35 UTC
I can confirm with Version: 4.5.0.0.alpha0+
Build ID: 7f476fea47f06a7f8cc961dd4f6595a524346fa5
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-27_23:36:28

Unable to reproduce with LO 3.5 -> regression
Comment 2 Michael Weghorn 2015-02-07 01:24:54 UTC
bibisect result:
 9b756b4ce6f27d53092578c4b64a944139b3c9ed is the first bad commit
commit 9b756b4ce6f27d53092578c4b64a944139b3c9ed
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Nov 27 10:15:12 2013 +0000

    source-hash-aaee12a8a84df2568b2262ee991a61ab926ae6c6
    
    commit aaee12a8a84df2568b2262ee991a61ab926ae6c6
    Author:     Lionel Elie Mamane <lionel@mamane.lu>
    AuthorDate: Thu Nov 7 19:15:38 2013 +0100
    Commit:     Lionel Elie Mamane <lionel@mamane.lu>
    CommitDate: Thu Nov 7 19:17:24 2013 +0100
    
        fdo#65108 inter-module includes <>
    
        Change-Id: Ie7e08f25741772f657a71369483917d989a05537


$ git bisect log
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect good 1d4980621741d3050a5fe61b247c157d769988f2
# skip: [89110ca258fa7a15dfc546acfb39e76fc3eb2a44] source-hash-e450a2c506ac7cd4433b0f93fc750a89919bc03c
git bisect skip 89110ca258fa7a15dfc546acfb39e76fc3eb2a44
# good: [1cca92a409385d9288c28a54d5e3008e56728bc0] source-hash-7be7824bbbdeee6fa998b950e6046ab37fe690cb
git bisect good 1cca92a409385d9288c28a54d5e3008e56728bc0
# skip: [5fa28ce2931a35ae64ae08d3904cfb76d24459d8] source-hash-2304beaca33c63b94df99cb827716f00ce259f9a
git bisect skip 5fa28ce2931a35ae64ae08d3904cfb76d24459d8
# good: [2a9ff869c5638dc5c3aa387d0fe55c3291c86288] source-hash-01b7e04172889cbc9e4ac404b105e18ddc062d6f
git bisect good 2a9ff869c5638dc5c3aa387d0fe55c3291c86288
# good: [387dd1052972d27a3065a249b357e50e0a29829b] source-hash-35836f350861b33a0c28307a413eff76d0433d1e
git bisect good 387dd1052972d27a3065a249b357e50e0a29829b
# good: [387dd1052972d27a3065a249b357e50e0a29829b] source-hash-35836f350861b33a0c28307a413eff76d0433d1e
git bisect good 387dd1052972d27a3065a249b357e50e0a29829b
# good: [09fe6d4400fefeaa099d0deb9b77c77992ab897b] source-hash-56364430108893afbcf5d2b51c5aaa37e393e7cc
git bisect good 09fe6d4400fefeaa099d0deb9b77c77992ab897b
# good: [09fe6d4400fefeaa099d0deb9b77c77992ab897b] source-hash-56364430108893afbcf5d2b51c5aaa37e393e7cc
git bisect good 09fe6d4400fefeaa099d0deb9b77c77992ab897b
# good: [09fe6d4400fefeaa099d0deb9b77c77992ab897b] source-hash-56364430108893afbcf5d2b51c5aaa37e393e7cc
git bisect good 09fe6d4400fefeaa099d0deb9b77c77992ab897b
# good: [09fe6d4400fefeaa099d0deb9b77c77992ab897b] source-hash-56364430108893afbcf5d2b51c5aaa37e393e7cc
git bisect good 09fe6d4400fefeaa099d0deb9b77c77992ab897b
# good: [8aabf2aee6514311020b855a95a6e44bab3a5b0d] source-hash-0aa9ced531b8d85ad067c1d156a9708eea628d78
git bisect good 8aabf2aee6514311020b855a95a6e44bab3a5b0d
# good: [8aabf2aee6514311020b855a95a6e44bab3a5b0d] source-hash-0aa9ced531b8d85ad067c1d156a9708eea628d78
git bisect good 8aabf2aee6514311020b855a95a6e44bab3a5b0d
# bad: [9b756b4ce6f27d53092578c4b64a944139b3c9ed] source-hash-aaee12a8a84df2568b2262ee991a61ab926ae6c6
git bisect bad 9b756b4ce6f27d53092578c4b64a944139b3c9ed
# bad: [9b756b4ce6f27d53092578c4b64a944139b3c9ed] source-hash-aaee12a8a84df2568b2262ee991a61ab926ae6c6
git bisect bad 9b756b4ce6f27d53092578c4b64a944139b3c9ed
# good: [a1bd890a0802bd142798b7b601f370ca9c21426b] source-hash-04532617c7d264411563db24dc359326cc18eda7
git bisect good a1bd890a0802bd142798b7b601f370ca9c21426b
# first bad commit: [9b756b4ce6f27d53092578c4b64a944139b3c9ed] source-hash-aaee12a8a84df2568b2262ee991a61ab926ae6c6
Comment 3 Jürgen Mähnß 2015-02-07 10:32:54 UTC
Comment on attachment 111929 [details]
the result of test steps

Confirmed partly:
One file that is bound to reference.ods is not in the zip.
I stored files in c:\temp so therefore path's have to be reset.
I open reference and do not refresh binding. Values are not changed for the first time. Now path's are correct and next time refreshing bindings works nice with b3. 
I tried to insert the following in b6: 
='file:///C:/temp/toReference.ods'#$namedCell.toReferenceCell
The cell name is automatically changed to lower case. Binding doesn't work.
Comment 4 Jürgen Mähnß 2015-02-07 10:38:39 UTC
I think your step 11 contains a mistake:
change the "$namedCell.C7" to "toReferenceCell" 
misses the table. up to my opinion you must cange it to
"$namedCell.toReferenceCell"
but as noted in Comment 3 this doesn't work ether.
Comment 5 m_a_riosv 2015-05-15 08:55:10 UTC
*** Bug 91262 has been marked as a duplicate of this bug. ***
Comment 6 Cor Nouws 2015-06-02 22:08:25 UTC
@lionel - can you pls have a look?
Comment 7 Lionel Elie Mamane 2015-06-03 05:22:37 UTC
(In reply to Cor Nouws from comment #6)
> @lionel - can you pls have a look?

I very much doubt that my commit is the culprit. Ter herinnering, bibisect gives you a *range* where the error appears, and not a single commit (except with the "max" series). You need to take from the log:

1) last good commit (source hash): LG
2) the last bad one (source hash): LB

and then look at the range LG..LB

In this case, the range is 04532617c7d264411563db24dc359326cc18eda7..aaee12a8a84df2568b2262ee991a61ab926ae6c6
Comment 8 Lionel Elie Mamane 2015-06-03 05:29:23 UTC
Stephan, Markus, Kohei: the range of commits given by bibisect includes commits by you in sc/

In particular, a few touch "external reference manager" or "external document name" stuff, which looks relevant, all by Kohei.

commit db65fff2aa0e98622932c0372212b4a68f65b72e
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Wed Nov 6 18:51:34 2013 -0500

    Perform formula cell compilations in multiple threads during xlsx import.

commit 35a5999247bbb120dc677515d199b7da3c39146f
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Nov 5 19:06:15 2013 -0500

    Guard cache access with mutex & a new method just to check for range name.


commit 719c3fb46bb38c69daea617ea9aaafc72505684d
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Nov 5 17:10:24 2013 -0500

    Add mutex for external source document meta-data container.

commit 7d2619c9ad084237238b54a0e1c7a449fd7441be
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Nov 5 16:49:55 2013 -0500

    Set mutex for external ref cache content.

commit 9611851a5349f564ba97bacd9619eb8b329ae283
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Nov 5 11:55:57 2013 -0500

    Avoid using an extra buffer when the name doesn't contain double-quotes.
Comment 9 Matthew Francis 2015-09-06 03:55:12 UTC
This seems to have been introduced by the below commit:
(opening two spreadsheets in nearby builds generally causes Calc to crash, but this can be reproduced in a single sheet by using an ='file://....' reference inside the same sheet)

commit 35a5999247bbb120dc677515d199b7da3c39146f
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Nov 5 19:06:15 2013 -0500

    Guard cache access with mutex & a new method just to check for range name.
Comment 10 Commit Notification 2015-10-15 18:11:25 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

add test for tdf#88179

It will be available in 5.1.0.

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.
Comment 11 Robinson Tryon (qubit) 2015-12-17 08:43:28 UTC Comment hidden (obsolete)