Bug 147916 - When copying a cell to a newly inserted sheet, absolute sheet name reference is not reserved thus the pasted formula is broken
Summary: When copying a cell to a newly inserted sheet, absolute sheet name reference ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2022-03-11 02:47 UTC by Kevin Suo
Modified: 2024-12-20 03:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sheet_name_ref_test.ods (10.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-11 02:47 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2022-03-11 02:47:36 UTC
Created attachment 178795 [details]
sheet_name_ref_test.ods

Steps to Reproduce:
1. Open the attached ods file.
2. Select A1:B2 in sheet1, ctrl+c to copy.
3. Insert a new sheet between sheet1 and sheet2 (it's named as "Sheet 5").
4. Select a cell in "Sheet 5", ctrl+v to paste.

Current Result:
In cell B2 of "Sheet 5", the pasted formula is =VLOOKUP(A2,$sheet3.A:B,2,0) thus the result is #N/A.
It seems that the absolute reference $ is ignored during copy paste of the formula.

Expected Result:
In cell B2 of "Sheet 5", the pasted formula should be =VLOOKUP(A2,$sheet4.A:B,2,0) thus the result should be 100, because the source formula uses absolute reference and it should be retained during copy paste.

Reproducible on
Version: 7.3.2.0.0+ / LibreOffice Community
Build ID: 789fbf732ad6db002fd83b307385940c392cc457
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Calc: threaded

and also on current master

Also in Version: 6.1.7.0.0+
Build ID: 5b3765f4d881e7ddefd0c4aad6886a46f000b4fc
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group threaded
Comment 1 Kevin Suo 2022-03-11 02:50:18 UTC
It is noted that when copy pasting to an existing sheet (e.g. sheet2 or sheet3), the pasted result is correct.
Comment 2 m_a_riosv 2022-03-11 15:51:13 UTC
If you first insert the new sheet and then copy and paste it works fine.
But if you first copy, then in paste it retains the position of the reference sheet when copy it's done, reference to sheet3. Maybe at copying the sheet number it's used instead of the sheet name.
Comment 3 Buovjaga 2022-12-20 11:18:03 UTC
Repro already in 5.2.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f6b4c3fb68f9b36e1e64fc4a4c680ab1bb7fb013
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 20 December 2022
Comment 4 QA Administrators 2024-12-20 03:12:19 UTC
Dear Kevin Suo,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug