Bug 75053 - CTRL+Z undo of a column deletion does not correctly restore all cell formulas
Summary: CTRL+Z undo of a column deletion does not correctly restore all cell formulas
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: highest critical
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.3
Keywords: regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-02-16 13:42 UTC by Laurent Balland
Modified: 2021-02-22 10:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file to delete column B, and check formula in column C (15.26 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-16 13:42 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2014-02-16 13:42:36 UTC
Created attachment 94160 [details]
Test file to delete column B, and check formula in column C

Problem description:
When deleting column referenced in other formula, formula are modified but do not content #REF! as they should, even if they display #REF!.
When undo deletion, formula are wrongly restored, and display #REF!, even after Ctrl+Shift+F9

Steps to reproduce:
1. Create new file (or open attached document) with values in column A, column B=2*A, column C=B+A
2. Delete column B
=> Column C display #REF! which is normal
3. Click on a formula in column C

Current behavior:
Formula is "=A2+A2"

Expected behavior:
Formula should be "=#REF!2+A2"

Second steps:
4. Hit Ctrl+Z to undo

Current behavior:
Column B is restored (OK).
In column C, only the first formula in C2 is correctly restored: other cells display #REF! and formula is "=A3+A3"

Expected behavior:
Column B and C should be restored. Formula in C3, C4,... should be "=B3+A3"

Confirmed on Win7, Version: 4.2.0.0.alpha0+
Build ID: 4a8f7ddc290d1ea3131de6611b6833b77ac7ab1f
Time: 2013-08-28_11:14

Regression against Version: 4.2.0.0.alpha0+
Build ID: 2f6cbe13e61c44d4bab8192a4708b698d3d9da33
TinderBox: Win-x86@6-debug, Branch:master, Time: 2013-07-25_00:00:21
Comment 1 Laurent Balland 2014-02-16 13:45:57 UTC
Confirmed with LibO 4.2.1 RC1
Comment 2 Laurent Balland 2014-02-16 13:55:09 UTC
Oups! Please correct references in the description above: after step 2, replace column C by column B of course.

Steps to reproduce:
1. Create new file (or open attached document) with values in column A, column B=2*A, column C=B+A
2. Delete column B
=> Column *B* display #REF! which is normal
3. Click on a formula in column *B*

Current behavior:
Formula is "=A2+A2"

Expected behavior:
Formula should be "=#REF!2+A2"

Second steps:
4. Hit Ctrl+Z to undo

Current behavior:
Column B is restored (OK).
In column C, only the first formula in C2 is correctly restored: other cells display #REF! and formula is "=A3+A3"

Expected behavior:
Column B and C should be restored. Formula in C3, C4,... should be "=B3+A3"
Comment 3 pierre-yves samyn 2014-02-16 14:07:05 UTC
Hello

Reproduced on windows 7/64 with Version: 4.2.1.1
Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b

Regards
Pierre-ves
Comment 4 pierre-yves samyn 2014-02-16 14:08:58 UTC
Also reproduced on windows 7/64 with Version: 4.3.0.0.alpha0+
Build ID: e076b5290e706b8a69abd397a9f255eba6a0cd1a
TinderBox: Win-x86@39, Branch:master, Time: 2014-02-13_23:23:34

Regards
Pierre-Yves
Comment 5 m_a_riosv 2014-02-28 02:53:56 UTC
Also in:
Win7x64Ultimate
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Version: 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
Version: 4.2.3.0.0+ Build ID: 4274001144adeb0b0a1e7da05d52c1bedbe899e5
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-02-27_08:31:36

Last working:
Version: 4.1.6.0.0+ Build ID: d86ecb8512d19d8dcf073ceb1fd9813554397bd

I think clearly MAB, broken formulas deleting column and after undo.
Comment 6 V Stuart Foote 2014-02-28 06:06:50 UTC
Kohei, *,

yet another...

On Windows 7 sp1, 64-bit with same loss of formula reference with <Ctrl>+Z undo
Version: 4.3.0.0.alpha0+
Build ID: f839b5dd16c05c0eda21345ec36ec0cb024eb732
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-02-23_09:54:38
Comment 7 V Stuart Foote 2014-02-28 06:33:59 UTC
no improvement with work on bug 75386 -- so still issue with today's
Version: 4.3.0.0.alpha0+
Build ID: 95b401558466954453d490456be01beb6d747806
TinderBox: Win-x86@39, Branch:master, Time: 2014-02-27_23:09:22 build on Windows.

Adjusting title to reflect the incorrect cell formulas following <Ctrl>+Z 'undo' of a column deletion.
Comment 8 Kohei Yoshida 2014-02-28 14:36:45 UTC
I hope all these bug fixing craze will end one day.
Comment 9 Commit Notification 2014-03-01 02:31:34 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75053: Write 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 10 Commit Notification 2014-03-01 02:31:49 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75053: Adjust reference update on shift for formula groups.



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 11 Kohei Yoshida 2014-03-01 02:37:33 UTC
4.2 backport request: https://gerrit.libreoffice.org/8403
Comment 12 V Stuart Foote 2014-03-01 21:04:29 UTC
Issue is resolved fixed on Windows 7 sp1, 64-bit with
Version: 4.3.0.0.alpha0+
Build ID: c3c6d7f886088b57869b6978309e7a39cba32bbb
TinderBox: Win-x86@39, Branch:master, Time: 2014-03-01_09:52:43
Comment 13 V Stuart Foote 2014-03-01 21:07:23 UTC
Should have added that backport for 4.2.x (https://gerrit.libreoffice.org/#/c/8403/ ) remains to be finalized.
Comment 14 Commit Notification 2014-03-03 14:01:00 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=cb83b334e489a4ec1cc067145c3f64b129475e7f&h=libreoffice-4-2

fdo#75053: Adjust reference update on shift for formula groups.


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 15 pierre-yves samyn 2014-03-17 09:49:05 UTC
Hello

WORKSFORME on windows 7/64 with Version: 4.2.3.1
Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13

Thank you :)

Regards
Pierre-Yves
Comment 16 m_a_riosv 2014-03-18 22:53:59 UTC
Thanks Kohei.
Verified Win7x64:
Version: 4.2.3.1 Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
Version: 4.2.4.0.0+ Build ID: e1823627f35e4419880769fdd05acddbd0a9c25c
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-18_14:25:19
Version: 4.3.0.0.alpha0+ Build ID: 12ae7672f285da1d4c730315e8db23b3396b71cc
   TinderBox: Win-x86@39, Branch:master, Time: 2014-03-14_00:18:00