Download it now!
Bug 70815 - EDITING: cell is not updated when referenced cell becomes empty due to sort
Summary: EDITING: cell is not updated when referenced cell becomes empty due to sort
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.0.beta1
Hardware: All All
: medium major
Assignee: Eike Rathke
URL:
Whiteboard: target:4.1.4
Keywords: regression
Depends on:
Blocks: mab4.1 85490
  Show dependency treegraph
 
Reported: 2013-10-23 21:28 UTC by mat.schult
Modified: 2014-12-04 16:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mat.schult 2013-10-23 21:28:59 UTC
Steps to reproduce:

enter 1 into cell A2
enter =A2 into cell B2 (will show 1)
mark A1:A2
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
Comment 1 Cor Nouws 2013-10-23 22:04:27 UTC
thanks mat!

First version that shows it (that I have) is 4.1.0.0 beta1
Comment 2 Cor Nouws 2013-10-25 16:24:41 UTC
Hi Mat,

I had the change to test it in a master build:
  http://dev-builds.libreoffice.org/daily/master/
works fine there.
Could you pls check that too?

thanks,
Cor
Comment 3 Eike Rathke 2013-10-29 16:20:59 UTC
@Moggi:
Maybe you know off the top of your head what commit(s) to master could have fixed that?
Comment 4 Markus Mohrhard 2013-10-29 16:34:49 UTC
(In reply to comment #3)
> @Moggi:
> 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.
Comment 5 Eike Rathke 2013-10-31 14:38:31 UTC
Fix pending review at https://gerrit.libreoffice.org/6516
Comment 6 Commit Notification 2013-11-01 00:18:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e271ea0dceca3f8ac664246ef2f9d65b2fa360a8&h=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:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Jean-Baptiste Faure 2014-10-12 16:17:16 UTC
Does not work in 4.3.4.0.0+ : after sort B2 contains =A1 and shows the value 1
Works in 4.2.6.3 : 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 4.3.4.0.0+

See bug 81309 and bug 81633.

Best regards. JBF
Comment 8 Jean-Baptiste Faure 2014-10-21 15:03:36 UTC
Now, works as expected (as explained in the bug description) in version 4.3.4.0.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 4.3.4.0.0+ and 4.4.0.0.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