Description: If a calc spreadsheet references a cell in an xlsx source file, when that reference is cut and pasted to a new location in the same spreadsheet, the xlsx source cell it refers to changes. Steps to Reproduce: 1. Create an xlsx file with some numbers in it and save (source.xlsx). 2. Create a new spreadsheet and at A1, reference (=) one of the cells filled in the xlsx source, e.g., ='file:///home/user/Documents/source.xlsx'#$Sheet1.A1 3. Cut this cell and paste to a different location say, B1 4. The formula that is pasted is relative not absolute, e.g., ='file:///home/user/Documents/source.xlsx'#$Sheet1.B1 Actual Results: The reference that has been cut and pasted has changed the source cell it links to. In the reproducible example, cutting a reference from A1 and pasting to B1 changes the formula from pointing to A1 in the source sheet to B1 in the source sheet. Expected Results: Cut and Paste has always previously been absolute, not relative. Copy and paste is expected to be relative not cut and paste. Reproducible: Always User Profile Reset: No Additional Info: Using ubuntu 16.04 on an hp2540p. Don't think that matters though. User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Created attachment 128827 [details] test case This is the xlsx source that shows the problem when linked to it.
Created attachment 128828 [details] test case This is the file linking to source.xlsx that illustrates the problem
Created attachment 128829 [details] test case This is an ods source that shows the same problem regardless of whether source is xlsx or ods.
Confirmed.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4665be3af48587505bb7f49a53e8422945ec49eb Resolves: tdf#103994 AdjustReferenceOnMove: handle external references It will be available in 5.3.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.
Pending review https://gerrit.libreoffice.org/30941 for 5-2
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5e397250c0ab2c092091c6dfe30d906a17fdca9e&h=libreoffice-5-2 Resolves: tdf#103994 AdjustReferenceOnMove: handle external references It will be available in 5.2.4. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a83dc2cebb60ec27a0d2606a9b7c196e581766fd tdf#103994: sc_uicalc: Add unittest It will be available in 7.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.