Bug 138832 - FILESAVE XLSX Updating external link used in formula does not save the updated link
Summary: FILESAVE XLSX Updating external link used in formula does not save the update...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Attila Szűcs
URL:
Whiteboard: target:7.2.0 target:7.1.1
Keywords: filter:xlsx
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2020-12-11 20:02 UTC by NISZ LibreOffice Team
Modified: 2021-02-08 11:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Calc (14.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-12-11 20:02 UTC, NISZ LibreOffice Team
Details
Example file saved by Calc after changing the target file name (5.88 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-12-11 20:02 UTC, NISZ LibreOffice Team
Details
Example file used as cell reference target (9.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-12-11 20:03 UTC, NISZ LibreOffice Team
Details
The modified file before reloading (93.21 KB, image/png)
2020-12-11 20:03 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Calc (84.09 KB, image/png)
2020-12-11 20:03 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-12-11 20:02:18 UTC
Created attachment 168077 [details]
Example file from Calc

Attached file contains a simple cell reference to another file.
If this is changed to point to another file and saved to XLSX then upon reload the target file name incorrectly appears as [2].

Steps to reproduce:
    1. Open attached file
    2. Change the D2 cells target file name from  tdf132105_external.ods to 87973_externalSource.ods
    3. Save the file as XLSX, reopen

Actual results:
D2 cells target becomes =[2]sheet1!b3
Edit – Links to external files shows two entries: the correct link to the new target file and “[2]”.

Expected results:
D2 cells target is the 87973_externalSource.ods

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 61d07657caab5e0fb8ec4446f67a7044e14dae4b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-12-11 20:02:40 UTC
Created attachment 168078 [details]
Example file saved by Calc after changing the target file name
Comment 2 NISZ LibreOffice Team 2020-12-11 20:03:12 UTC
Created attachment 168079 [details]
Example file used as cell reference target
Comment 3 NISZ LibreOffice Team 2020-12-11 20:03:26 UTC
Created attachment 168080 [details]
The modified file before reloading
Comment 4 NISZ LibreOffice Team 2020-12-11 20:03:42 UTC
Created attachment 168081 [details]
Screenshot of the problem in Calc
Comment 5 m_a_riosv 2020-12-12 11:02:25 UTC
Sorry it's not the same issue as in https://bugs.documentfoundation.org/show_bug.cgi?id=76047
Comment 6 Attila Szűcs 2020-12-17 15:45:22 UTC
it is the single-reference version of tdf87973. (because that was with double-reference)
Comment 7 Commit Notification 2021-01-15 12:28:52 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c3041a25fb3d3c3c15c12fecdac23f7935aeffa

tdf#138832 XLSX export: fix lost file names in modified links

It will be available in 7.2.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 8 Commit Notification 2021-01-19 10:40:56 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/3b481336018d274384b7ade7c2c5e858f24f0e8c

tdf#138832 XLSX export: fix lost file names in modified links

It will be available in 7.1.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 9 NISZ LibreOffice Team 2021-02-08 11:40:09 UTC
Verified in
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 44b914b1e2616ca8f70e896e653a46ca93610234
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded