Bug 98642 - Calc "auto-corrects" defined names in cell formulas, and it should not
Summary: Calc "auto-corrects" defined names in cell formulas, and it should not
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:5.0....
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-03-14 11:07 UTC by Daniel Rentz
Modified: 2021-03-25 15:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test file (8.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-21 06:10 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Rentz 2016-03-14 11:07:33 UTC
1. Create a new Calc document
2. Create a new named range "name1" referring to $Sheet1.$A$1
3. Create a new named range "name2" referring to $Sheet1.$A$1 too
4. In cell A2, enter the formula =name1
5. In cell A3, enter the formula =name2

==> The formula in step 5 has been changed to =name1

This problem does not happen, if the formula expression of "name2" is different to "name1"; or if the formula in step 5 will be entered in another cell than A3.
Comment 1 Cor Nouws 2016-03-14 12:02:15 UTC
Works OK in 3.6.6.1
Not OK in 5.0.5.2
Comment 2 raal 2016-03-21 06:09:42 UTC
reproducible: Version: 4.5.0.0.alpha0+
Build ID: 57d6b92b69a31260dea0d84fcd1fc5866ada7adb
Comment 3 raal 2016-03-21 06:10:16 UTC
Created attachment 123753 [details]
test file
Comment 4 Eike Rathke 2016-03-22 15:48:56 UTC
The RPN code is identical in this case, shared formula detection at its best ;-)
Comment 5 Commit Notification 2016-03-22 16:25:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d6b32653ad34f0879ad1ada421a3a2655dd766e1

Resolves: tdf#98642 comparing RPN insufficient in shared formula detection

It will be available in 5.2.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.
Comment 6 Eike Rathke 2016-03-22 16:41:54 UTC
Pending review
https://gerrit.libreoffice.org/23436 for 5-1
https://gerrit.libreoffice.org/23437 for 5-0
Comment 7 Commit Notification 2016-03-24 10:31:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a5867a0d676981c27b36a4def9b423fabf6862e8&h=libreoffice-5-1

Resolves: tdf#98642 comparing RPN insufficient in shared formula detection

It will be available in 5.1.3.

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.
Comment 8 Commit Notification 2016-03-28 21:04:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a84d144cc8ea2cf797583d0b9b4154690c5eeee9&h=libreoffice-5-0

Resolves: tdf#98642 comparing RPN insufficient in shared formula detection

It will be available in 5.0.6.

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.
Comment 9 Commit Notification 2021-03-25 15:03:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c8c5a06eed6c22e40bda9787ace5467d551130b6

tdf#98642: sc_ucalc: Add unittest

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.