Bug Hunting Session
Bug 120270 - No update to refs to sum cell after undoing change in sum range
Summary: No update to refs to sum cell after undoing change in sum range
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Dennis Francis
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords: bibisected, needUITest, regression
Depends on:
Blocks: Calculate
  Show dependency treegraph
 
Reported: 2018-10-02 13:21 UTC by Basel Shishani
Modified: 2019-04-27 20:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot showing unchanged state after undo (16.25 KB, image/png)
2018-10-02 13:21 UTC, Basel Shishani
Details
test case (8.53 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-10-03 08:06 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Basel Shishani 2018-10-02 13:21:19 UTC
Created attachment 145323 [details]
screenshot showing unchanged state after undo

In some cell B, enter a range sum over cells A1 to An, then enter a reference to cell B in another cell C. Now enter a value in the summation range say in Ax, the change will be reflected in the summation cell B and it's reference cell C. Select cell Ax and move it to another cell outside the sum range, the change again is reflected in B and C. Now undo the change using the undo menu option or the Ctrl-Z key binding, the Ax cell gets it's value back, the summation cell B gets changed to reflect the change in it's range, *but* the reference cell C does not change to reflect the change!
Comment 1 Oliver Brinzing 2018-10-03 08:06:05 UTC
Created attachment 145341 [details]
test case

i can reproduce with attached spreadsheet:

- open spreadsheet
- drag cell C2 out of the sum range, for example to D2
- C6/C8 will show: 13
- undo: Ctrl + Z
- C6 shows 35, but C8 is 13

a hard recalc Ctrl + Shift + F9 is needed.

notice: no problem using cut & paste

Version: 6.1.2.1 (x64)
Build-ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: 

Version: 6.2.0.0.alpha0+ (x64)
Build ID: bc32f789bb3c079eba9c07275866a7b13f76dbcc
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: threaded
Comment 2 Oliver Brinzing 2018-10-03 08:11:10 UTC
already reproducible with:

Version: 5.4.7.2
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.2; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: single
Comment 3 Oliver Brinzing 2018-11-21 18:01:29 UTC
already reproducible with

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE
Comment 4 Oliver Brinzing 2018-11-21 18:03:02 UTC
but *not* reproducible with

AOO415m1(Build:9789)  -  Rev. 1817496
2017-12-11 17:25
Comment 5 Oliver Brinzing 2018-12-09 13:44:14 UTC
*not* reproducible with

Version 3.6.7.2 (Build ID: e183d5b)
Comment 6 b. 2019-02-27 16:24:08 UTC
reproducible with:

Version: 5.4.7.2

(already known from Oliver Brinzing)

besides crtl-shift-F9 will produce correct results also 'F9' while in the cell will recalculate, 

only undo's of moves out of the range with ctrl-Z are affected, moving the cells back with the mouse works fine, ctrl-Z after changing, deleting or inserting values in the range works fine,
Comment 7 Oliver Brinzing 2019-03-03 17:39:14 UTC
>- open attached spreadsheet
>- drag cell C2 out of the sum range, for example to D2
>- C6/C8 will show: 13
>- undo: Ctrl + Z
>- C6 shows 35, but C8 is 13

seems to have started with:

$ git bisect good
3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9 is the first bad commit
commit 3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9
Author: buildslave <buildslave@tb51.libreoffice.org>
Date:   Mon Feb 8 21:33:48 2016 +0100
    source-hash-68969cc61adecac481ae9656978ef952f435b310
    commit 68969cc61adecac481ae9656978ef952f435b310
    Author:     Stephan Bergmann <sbergman@redhat.com>
    AuthorDate: Thu Jul 31 15:57:12 2014 +0200
    Commit:     Stephan Bergmann <sbergman@redhat.com>
    CommitDate: Thu Jul 31 15:57:12 2014 +0200
        Consistency around SdrMetricItem ...where some instances of
        SDRATTR_TEXT_MINFRAMEHEIGHT etc. where SdrMetricItem
        while others where of trivial derived classes SdrTextMinFrameHeightItem
        etc., that appear to only existed for better-named constructors.
        Change-Id: If0af79fbb803275ed09fc7b950868c5de7d61615

:100644 100644 fd041f40cd8bcddfb78a2d9342c1c5312d236031 e6dd30671c9401272cb2fc4fc23f704504d5c9ce M      commitmsg
:040000 040000 8227ef6a77481017673d268915e0ae0ee246b203 44887445d0d9a357119165167576640fc9463dd9 M      instdir
:100644 100644 5c4e25a44e4d23bf24af6e126fec87d0a57dddc9 1b7d9a3da29db450e3e35e30d8b3030f2426e903 M      make.log

/cygdrive/d/sources/bibisect/bibisect-win32-4.4
$ git bisect log
# bad: [489ffd1df414698b6cea9ab03bf6f663b8b5af7e] source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2
# good: [8aa9fc9a0c92172593d6cd97662116a965db229d] source-hash-dea4a3b9d7182700abeb4dc756a24a9e8dea8474
git bisect start 'master' 'oldest'
# bad: [897913acd244cb6a5d2f4c2da1d625d9b978edb6] source-hash-ac57362b23859591c088e36b7218f4a606dcf3bb
git bisect bad 897913acd244cb6a5d2f4c2da1d625d9b978edb6
# bad: [897913acd244cb6a5d2f4c2da1d625d9b978edb6] source-hash-ac57362b23859591c088e36b7218f4a606dcf3bb
git bisect bad 897913acd244cb6a5d2f4c2da1d625d9b978edb6
# good: [dc97f44745f96315fb6c5480705bb5d595d39c6c] source-hash-01c8962f281887db59e581906b89d027a994b52a
git bisect good dc97f44745f96315fb6c5480705bb5d595d39c6c
# good: [dc97f44745f96315fb6c5480705bb5d595d39c6c] source-hash-01c8962f281887db59e581906b89d027a994b52a
git bisect good dc97f44745f96315fb6c5480705bb5d595d39c6c
# bad: [0f9d4de0b2616aa5646b545363585487f563e77e] source-hash-de024170a51b993109f27469ae869fc67548fc63
git bisect bad 0f9d4de0b2616aa5646b545363585487f563e77e
# bad: [0f9d4de0b2616aa5646b545363585487f563e77e] source-hash-de024170a51b993109f27469ae869fc67548fc63
git bisect bad 0f9d4de0b2616aa5646b545363585487f563e77e
# good: [05df9d63e3e26f21cca48e5ae10ea36657b51f17] source-hash-b0cdd038ee192dcc0d83182a33fc8c0242ceb1dd
git bisect good 05df9d63e3e26f21cca48e5ae10ea36657b51f17
# good: [05df9d63e3e26f21cca48e5ae10ea36657b51f17] source-hash-b0cdd038ee192dcc0d83182a33fc8c0242ceb1dd
git bisect good 05df9d63e3e26f21cca48e5ae10ea36657b51f17
# good: [804e63c56e352caca5dcbd41b8fff9a3c9fc39c5] source-hash-3df44c3c53b845c1d2d0082b51b590d5953141c6
git bisect good 804e63c56e352caca5dcbd41b8fff9a3c9fc39c5
# good: [6def83ebcafc916bd9ae97f3cd766365228a9966] source-hash-14a5f2f6fa3feabc8ef71843063b52364cbc4560
git bisect good 6def83ebcafc916bd9ae97f3cd766365228a9966
# good: [23ae8f9ec87f781b52f08f069a62be3d6162cd05] source-hash-b9b9fea12ed1d87d34f84f51574c10e2345d9ac7
git bisect good 23ae8f9ec87f781b52f08f069a62be3d6162cd05
# good: [23ae8f9ec87f781b52f08f069a62be3d6162cd05] source-hash-b9b9fea12ed1d87d34f84f51574c10e2345d9ac7
git bisect good 23ae8f9ec87f781b52f08f069a62be3d6162cd05
# good: [23ae8f9ec87f781b52f08f069a62be3d6162cd05] source-hash-b9b9fea12ed1d87d34f84f51574c10e2345d9ac7
git bisect good 23ae8f9ec87f781b52f08f069a62be3d6162cd05
# bad: [57079a9fe9822647614f77729c140a42dbc7c092] source-hash-ebe8792a37c21637cd9b5dc1522185b49ad7ac1c
git bisect bad 57079a9fe9822647614f77729c140a42dbc7c092
# bad: [3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9] source-hash-68969cc61adecac481ae9656978ef952f435b310
git bisect bad 3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9
# good: [93e412e72f376cb62b2a9cbb076b2c00cfab5e04] source-hash-dd418d8ca230da09a15de10db66970bb50db0172
git bisect good 93e412e72f376cb62b2a9cbb076b2c00cfab5e04
# first bad commit: [3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9] source-hash-68969cc61adecac481ae9656978ef952f435b310
Comment 8 Oliver Brinzing 2019-03-04 17:46:21 UTC
seems to be a chunk commit:

/cygdrive/d/sources/bibisect/bibisect-win32-4.4
$ git log 3d7479545fb2a3b6e260c9afb94bca6a7eb7b2b9 --oneline
3d74795 source-hash-68969cc61adecac481ae9656978ef952f435b310
93e412e source-hash-dd418d8ca230da09a15de10db66970bb50db0172
23ae8f9 source-hash-b9b9fea12ed1d87d34f84f51574c10e2345d9ac7
c72f15d source-hash-75dd06b2d70f796bcb0fc3d2b736e9801cea2379
659bed2 source-hash-8828dbfa0870cb834efda035bc5e041a1434166b
9b5c57e source-hash-20d08026218cf4257693c706c97030b8d518aa68
cc6322b source-hash-56bd29136ceb32250c0acdce798be47c8f7e7b12
4bb5f57 source-hash-dd032c3f3b6d6d3142b86860b02efd47c27504cc
6f41943 source-hash-4a1efd50e28ed9a38820ff8e21a21475a9096ecc
b9fc6c5 source-hash-5f47e319428a703ea53ce49d166e7628aaa60789
6def83e source-hash-14a5f2f6fa3feabc8ef71843063b52364cbc4560
f0ae101 source-hash-73f961ecf7439913fcd2233555187ff18eab1704
bb32227 source-hash-26b33fc2f2164481f5c423463f653012e4f4995d
6973e20 source-hash-9d140ccdb3b029b3d87ee23e87789f8a67ce8d5b
7830b64 source-hash-a97457db2c570b18c3c0e4717eb09210c1287ce8
77a3896 source-hash-1b30426c818a7a45a3cb429b8b3c45b634ad2ab9
8b43cdd source-hash-c1d9fe079a32a0515683236f91892c98ee837f8b
3e4d003 source-hash-e221c954ea0b7c3846bd6971a06b6a28672a28c7
e842038 source-hash-0f89f655c0b08dbeba90c587078e803c0db6c4f9
f57c887 source-hash-274b628a2b523eb45e297352a85f0177c6e747f0
e98e274 source-hash-ae1fb2e9219c071a0d61e6c5c00d965c33bdd9be
ba27b5c source-hash-70599252873c3dbe03e36083ad093aedfdb8b923
e034307 source-hash-c8bb0b241674f6eb834711e8ac18cd5fb6bc5c7f
ede1937 source-hash-66f4347aff8210c209d54320e3cdef3bcc55f2b1
df5eab8 source-hash-e5dd2e8826433566e223d0572ed73f21d0b992f1
e244b8a source-hash-62391d51788eb5a9b72b26e25cbb42fa21b0c091
804e63c source-hash-3df44c3c53b845c1d2d0082b51b590d5953141c6
3a10cb1 source-hash-36e52cbb3043ed6482d9f518af709b96604290cb
6a41803 source-hash-4f2b97d4c763b711992968f86b4cbf36342681f7
be67a95 source-hash-0915d82bec64fbf597a3778bcc314392e00a4cca
a73cee7 source-hash-a120f1da67083a5d95b304833996b06c1a737f13
0e39678 source-hash-0198b3a9451700d875c1b389d30e1a0cc9ab4b47
247cbff source-hash-87266b182913372b06eb107674e49f665f6f4342
e643de0 source-hash-0b0b7721fccad22cd09c2d761404ed5dfb8d0810
9676880 source-hash-744a0dca6f91b7ccf9d8c5fac816c52833e0a306
1f22cc9 source-hash-219eb78e3a04d859fa107c5b0c5ff40f4524c4d2
4b4f870 source-hash-f1c75c6d49c4e263657670da1e5b44d9a382f7ac
9f8aaa6 source-hash-3e33b00ce7f39348de2dc7af7b94b1012ce95aff
5fcae51 source-hash-32162d327bc4356bc69ee4c8e82f0dbc3c8e3076

https://gerrit.libreoffice.org/plugins/gitiles/core/+log/32162d327bc4356bc69ee4c8e82f0dbc3c8e3076..68969cc61adecac481ae9656978ef952f435b310
Comment 9 Oliver Brinzing 2019-03-15 19:31:07 UTC
this issue is still reproducible with:

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 3140194a85fe4a6ac69c8cddc4d3b019430cd6e8
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 10 Commit Notification 2019-04-03 07:43:37 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/86ba9cdc69976d9cdb7d6ec1a527012647abf10d%5E%21

tdf#120270 : ScUndoDragDrop - Notifying listeners of the area...

It will be available in 6.3.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.
Comment 11 Dennis Francis 2019-04-03 08:06:15 UTC
Patch for 6.2 @ https://gerrit.libreoffice.org/70179 for review
Comment 12 Commit Notification 2019-04-03 10:16:19 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/01f5cc7c6a1467ec3a788ffb0fb29a6a64963578%5E%21

tdf#120270 : ScUndoDragDrop - Notifying listeners of the area...

It will be available in 6.2.4.

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.
Comment 13 Xisco Faulí 2019-04-04 09:56:41 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: c8c0292c2152df8c353aeff32896f0cfa8a53a64
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Dennis Francis, thanks for fixing this issue!!
Comment 14 Commit Notification 2019-04-27 20:19:03 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/511737f7e9de5d4d32bc6cfcf481655f5a9ed3f2%5E%21

unit-test for tdf#120270

It will be available in 6.3.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.