Bug 126928 - FILEOPEN: Multiple external link chain with several calc documents doesn't work properly any more
Summary: FILEOPEN: Multiple external link chain with several calc documents doesn't wo...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.6.1 rc
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0 target:6.3.1 target:6.3....
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-14 16:22 UTC by Torge Riedel
Modified: 2020-10-16 17:50 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Files to reproduce both scenarios (14.73 KB, application/gzip)
2019-08-14 16:23 UTC, Torge Riedel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torge Riedel 2019-08-14 16:22:15 UTC
Description:
As a regression to 6.2.x stable releases cells with function INDIRECT() and manual activation of external content is set in the options an error code 540 is shown in the cell, instead of the last correct fetched value.
In addition if you have a chain of such links with at least 3 documents involved the cell keeps showing the error code, although external content was activated.

Steps to Reproduce:
Scenario 1:
1. Make sure that in the calc options you have "Update of external links" set to "On request" (I have calc in german, hopefully it is correct translated)
2. Open attached Test_02.ods
3. Click in the bar on "Activate content"

Scenario 2:
1. Make sure that in the calc options you have "Update of external links" set to "On request" (I have calc in german, hopefully it is correct translated)
2. Open attached Test_03.ods
3. Click in the bar on "Activate content"


Actual Results:
Scenario 1:
1. In current 6.3.0.4 release it shows in cell B2 "ErrorCode:540"
2. Only after manual activation of content the correct value is shown

Scenario 2:
1. In current 6.3.0.4 release it shows in cell B2 "ErrorCode:540"
2. Event if you activate the content it is still show the error code


Expected Results:
Both scenarios are regressions from previous stable version 6.2.x

- In 6.2.x in both scenarios after opening the document no error code is shown, but instead the last value from the external link is shown. Even without the need to activate the content.
- In 6.2.x in the second scenario after opening the document and activating the content, the current value from the linked document is shown


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 6.3.0.4
Build-ID: 1:6.3.0-0ubuntu0.18.04.1~lo2
CPU-Threads: 6; BS: Linux 4.15; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded
Comment 1 Torge Riedel 2019-08-14 16:23:38 UTC
Created attachment 153391 [details]
Files to reproduce both scenarios
Comment 2 Eike Rathke 2019-08-15 13:09:34 UTC
Confirmed. The problem here is with added security measurements to not have INDIRECT() access arbitrary files or URIs until confirmed, the "indirection of INDIRECT()" via an intermediate file apparently prevents the update of the intermediate file.
Comment 3 Commit Notification 2019-08-16 19:01:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/54bf84746a2a9a2e2aaf0df9e429b0cfd538f640%5E%21

Resolves: tdf#126928 allow link updates in an intermediate linked document

It will be available in 6.4.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.
Comment 4 Eike Rathke 2019-08-16 20:00:10 UTC
Note this works only if the intermediate document resides in a trusted location.
It works with both, the "Always (from trusted locations)" and the "On request" settings under Tools -> Options -> Calc -> General. It can't work with documents residing in a non-trusted location as there is no way to allow updates on demand for a such loaded document (hidden via formulas).

Pending review
https://gerrit.libreoffice.org/77604 for 6-3
https://gerrit.libreoffice.org/77605 for 6-3-1
https://gerrit.libreoffice.org/77613 for 6-2
Comment 5 Commit Notification 2019-08-28 16:56:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3-1":

https://git.libreoffice.org/core/+/c5fd457cc08c8b036378b63a049e750d8b20f265%5E%21

Resolves: tdf#126928 allow link updates in an intermediate linked document

It will be available in 6.3.1.

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.
Comment 6 Commit Notification 2019-08-28 17:03:25 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/14825a8b7f00ee4c148f2583856e5102312cabbd%5E%21

Resolves: tdf#126928 allow link updates in an intermediate linked document

It will be available in 6.3.2.

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.
Comment 7 Commit Notification 2019-09-04 10:03:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/3d59261bfa6f02a36b20cd117ed25422c59fbe4f%5E%21

Resolves: tdf#126928 allow link updates in an intermediate linked document

It will be available in 6.2.8.

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.