Bug 138824 - FILESAVE XLSX Link to external file loses parent directory part if it points to file in parent directory
Summary: FILESAVE XLSX Link to external file loses parent directory part if it points ...
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 14:55 UTC by NISZ LibreOffice Team
Modified: 2021-01-18 09:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file from Calc (11.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-12-11 14:55 UTC, NISZ LibreOffice Team
Details
The original file saved by Calc (5.93 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-12-11 14:56 UTC, NISZ LibreOffice Team
Details
Screenshot of the original file in Calc (33.01 KB, image/png)
2020-12-11 14:56 UTC, NISZ LibreOffice Team
Details
Screenshot of the xlsx file in Calc (32.42 KB, image/png)
2020-12-11 14:57 UTC, NISZ LibreOffice Team
Details
Screenshot of the original file in Calc and the xlsx version in Excel side by side (145.47 KB, image/png)
2020-12-11 14:57 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 14:55:54 UTC
Created attachment 168060 [details]
Example file from Calc

When a formula targets a cell range in a file that is in the parent directory of the files storing directory and the file is saved as XLSX, the parent directory is lost and both Calc and Excel would start to find the target file in the same directory.

Steps to reproduce:
    1. Open attached file
    2. Save as XLSX
    3. Reopen in Calc or Excel
    4. Observe the second parameter of VLOOKUP in cell D2 (or in Edit – Links to external files / Data ribbon – Connections - Links)

Actual results:
Target files path changes from parent directory of current file to the directory of current file.

Expected results:
Target files path unchanged.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 61d07657caab5e0fb8ec4446f67a7044e14dae4b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-12-11 14:56:17 UTC
Created attachment 168061 [details]
The original file saved by Calc
Comment 2 NISZ LibreOffice Team 2020-12-11 14:56:38 UTC
Created attachment 168062 [details]
Screenshot of the original file in Calc
Comment 3 NISZ LibreOffice Team 2020-12-11 14:57:04 UTC
Created attachment 168063 [details]
Screenshot of the xlsx file in Calc
Comment 4 NISZ LibreOffice Team 2020-12-11 14:57:36 UTC
Created attachment 168064 [details]
Screenshot of the original file in Calc and the xlsx version in Excel side by side
Comment 5 Commit Notification 2020-12-21 09:34:52 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/107a20ee079ae852b3b33412f234aab2dc35168f

tdf#138824 tdf#137937 XLSX export: fix parent directory path

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 6 NISZ LibreOffice Team 2021-01-11 13:05:39 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 96bafa464ebdbce3ef04bec9beae5e745bb37794
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
Comment 7 Commit Notification 2021-01-18 09:39:57 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/ad3b51b5b383dc9c7302b6d1d2e7f6daad5d4d5b

tdf#138824 tdf#137937 XLSX export: fix parent directory path

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.