Steps to reproduce:
enter 1 into cell A2
enter =A2 into cell B2 (will show 1)
sort (A1 will be 1 and A2 will be empty afterwards)
Current behavior: Formula in B2 still is =A2, but shown result still is 1
Expected behavior: Formula in B2 still is =A2, and result is 0
F9 does not help.
Shift+Ctrl+F9 does fix the error.
The underlying problem is probably similar to Bug https://www.libreoffice.org/bugzilla/show_bug.cgi?id=55059
First version that shows it (that I have) is 126.96.36.199 beta1
I had the change to test it in a master build:
works fine there.
Could you pls check that too?
Maybe you know off the top of your head what commit(s) to master could have fixed that?
(In reply to comment #3)
> Maybe you know off the top of your head what commit(s) to master could have
> fixed that?
I would assume some of Kohei's rework. But I did not touch calc core mouch since the end of June.
Fix pending review at https://gerrit.libreoffice.org/6516
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":
resolved fdo#70815 broadcast emptied cell in ScColumn::SwapRow()
It will be available in LibreOffice 4.1.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:
Affected users are encouraged to test the fix and report feedback.
Does not work in 188.8.131.52.0+ : after sort B2 contains =A1 and shows the value 1
Works in 184.108.40.206 : after sort B2 contains =A2 and shows the value 0
Works in 4.4.0 alpha if the configuration option "Update references when sorting range of cells" is not checked.
If the configuration option is checked, same behavior as 220.127.116.11.0+
See bug 81309 and bug 81633.
Best regards. JBF
Now, works as expected (as explained in the bug description) in version 18.104.22.168.0+ with the default configuration option (UpdateReferenceOnSort = false) added for bug 81633 (see: https://bugs.freedesktop.org/show_bug.cgi?id=81633#c50).
Current behavior in 22.214.171.124.0+ and 126.96.36.199.alpha1+ :
UpdateReferenceOnSort = true => after sort B2 contains the formula =A1 and show the value 1 ; correct because A1 contains the value 1.
UpdateReferenceOnSort = false => after sort B2 contains the formula =A2 and show the value 0 ; correct because A0 contains nothing.
Both behaviors are consistent and the choice between them is arbitrary, the test file does not give any insight of which should be chosen in this case.
Best regards. JBF