Bug 75386 - cell reference recalculation is wrong
Summary: cell reference recalculation is wrong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.3
Keywords: regression
: 76443 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-22 22:27 UTC by Andras Timar
Modified: 2014-03-22 12:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bugdoc (21.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-22 22:27 UTC, Andras Timar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2014-02-22 22:27:07 UTC
Created attachment 94588 [details]
bugdoc

A1:A16 contains values, B1:B16 is referencing values from A1:A16. Select A1:A16 and drag the range to an empty cell range in the worksheet. The references are updated in B1:B16, but the values are wrong. 

For example, when I drag A1:A16 to C1:C16, B1 will be 1, all other cells in column B contain 0. 

Interestingly, when I drag the range back to A1:A16, the values in column B are good again.
Comment 1 m_a_riosv 2014-02-23 15:05:49 UTC
Hi Andras,

Reproducible with:
Win7x64Ultimate
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b
Version: 4.2.3.0.0+ Build ID: 5fd90cdd1fdb20ab7f6a2b67c384f0994f09a86b
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-02-21_22:38:15
Version: 4.3.0.0.alpha0+ Build ID: d84ccb39b744457cd47125beb4291c84223d5219
   TinderBox: Win-x86@39, Branch:master, Time: 2014-02-22_10:05:06

Last working:
Version: 4.1.6.0.0+ Build ID: 1c33633ef18274bf384c74c492195519be83c05

A hard recalculation gives the correct values.

But I have found that undo doesn't restore the cell references in B1:B16 they remain C1:C16.

Maybe a MAB by the undo issue.
Comment 2 Kohei Yoshida 2014-02-25 02:37:08 UTC
I'll take this.  This is endless...
Comment 3 m_a_riosv 2014-02-25 03:08:20 UTC
It never rained that it has not stopped :)
Comment 4 Kohei Yoshida 2014-02-25 21:24:26 UTC
The fix for this will be large, just to give you a prior warning.
Comment 5 Commit Notification 2014-02-26 03:49:18 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75386: Add unit test for this.



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 Commit Notification 2014-02-26 03:49:35 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75386: Totally fix reference update during range move.



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 7 Kohei Yoshida 2014-02-26 03:53:13 UTC
4.2 backport request: https://gerrit.libreoffice.org/8352

This is rather large change to get backported, but all of this is unfortunately necessary to get this thing working again.
Comment 8 Commit Notification 2014-02-26 09:55:34 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=df9206c4ad9227029f85caa84df358e66ecafe9d&h=libreoffice-4-2

fdo#75386: Totally fix reference update during range move.


It will be available in LibreOffice 4.2.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 9 m_a_riosv 2014-03-22 12:42:53 UTC
*** Bug 76443 has been marked as a duplicate of this bug. ***