Bug 105908 - COUNTIF reference error does not correct with Undo Ctrl-Z
Summary: COUNTIF reference error does not correct with Undo Ctrl-Z
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Kohei Yoshida
QA Contact:
URL:
Whiteboard: target:5.4.0 target:5.2.7 target:5.3.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-02-10 03:05 UTC by Mike
Modified: 2017-04-06 13:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc file with error (8.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-10 03:05 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2017-02-10 03:05:48 UTC
Created attachment 131062 [details]
Calc file with error

When COUNTIF contains an absolute reference and the reference is deleted(causing #REF! error as expected) undoing the deletion that caused the eerror with either Ctrl-Z or the undo arrow does not fix the #REF! error.  However, relative references behave as expected.

Attached sample. Delete Column A and then undo deletion to replicate.  Row 1 contains relative reference as a comparison
Comment 1 m.a.riosv 2017-02-10 11:59:56 UTC
Confirmed.
Version: 5.2.5.1 (x64)
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: es-ES (es_ES); Calc: group
Version: 5.4.0.0.alpha0+
Build ID: 0e0fef10002b46965edad02b3f460a502d9f6595
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-02-08_23:11:53
Locale: es-ES (es_ES); Calc: CL
Comment 2 Xisco Faulí 2017-02-10 12:20:53 UTC
Regression introduced by:

author	Kohei Yoshida <kohei.yoshida@gmail.com>	2013-08-06 23:03:47 (GMT)
committer	Kohei Yoshida <kohei.yoshida@gmail.com>	2013-08-12 23:46:25 (GMT)
commit	027f8cd9442aec9c432bfcfc69f7d6e81b760eb5 (patch)
tree	f6e5ed97b1f9e74f33219d5310b844e768fff55b
parent	417d1c2b13cbd70300d2921b5667dfadc7e25895 (diff)
Handle shared token array correctly when adjusting formula grouping.

Adding Cc: to Kohei Yoshida
Comment 3 Kohei Yoshida 2017-03-22 02:02:29 UTC
I'm looking into this.
Comment 4 Commit Notification 2017-03-24 12:22:57 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105908: restore previously deleted range references upon undo.

It will be available in 5.4.0.

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 5 Commit Notification 2017-03-24 12:23:03 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105908: add test for this.

It will be available in 5.4.0.

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 Kohei Yoshida 2017-03-24 22:30:56 UTC
Backport on the way:

5.2: https://gerrit.libreoffice.org/#/c/35673/
5.3: https://gerrit.libreoffice.org/#/c/35672/
Comment 7 m.a.riosv 2017-03-26 23:01:05 UTC
Verified Ok.
Version: 5.4.0.0.alpha0+
Build ID: a4034d56813b6716ae93d455204079cdd2ff9f6f
CPU threads: 4; OS: Windows 6.2; UI render: GL; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-03-26_04:30:46
Locale: es-ES (es_ES); Calc: CL
Comment 8 Kohei Yoshida 2017-03-27 22:10:52 UTC
Thanks for the verification.  I'll mark this resolved.
Comment 9 Commit Notification 2017-04-06 13:54:25 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

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

tdf#105908: restore previously deleted range references upon undo.

It will be available in 5.2.7.

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 2017-04-06 13:54:35 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=97ce2a4eb0b2b479d48afe28299ad0ff1d3a264d&h=libreoffice-5-3

tdf#105908: restore previously deleted range references upon undo.

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