Bug 77944 - Loses formula reference after cut, paste and undo
Summary: Loses formula reference after cut, paste and undo
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords:
: 77950 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-25 19:50 UTC by Carlos Menandro
Modified: 2014-06-25 16:42 UTC (History)
1 user (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 Carlos Menandro 2014-04-25 19:50:03 UTC
Loses the Reference Formula after Ctrl X + Ctrl V + Ctrl Z + Ctrl Z

Example Values:
A1 = B1
B1 = 1

Actions:
Ctrl X on B1
Ctrl V on C1

Values:
A1 = C1 (Ctrl V updated formula)
B1 = blank
C1 = 1

More Actions:
Ctrl Z
Ctrl Z

Result Wrong:
A1 = C1 (Ctrl Z don't updated formula)
B1 = 1
C1 = blank

The formula of A1 don't undo with Ctrl Z
Comment 1 m_a_riosv 2014-04-25 23:15:40 UTC
Hi Carlos, thanks for reporting.

Reproducible:
Win7x64Ultimate
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Version: 4.2.4.1 Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515

Last working:
Version: 4.1.6.1 Build ID: a59ce81388f477fc89db57f0c27f222f31884eb

With:
Version: 4.3.0.0.alpha1+ Build ID: 702f9c5176eebb95c5a1bfd31c1f256b79301b19
  Tinderh Box: Win-x86@39, Branch:master, Time: 2014-04-23_22:51:26
there is a different bug Cut & Paste doesn't change the reference in A, I`ll report a new bug.
Comment 2 Kohei Yoshida 2014-05-05 21:52:54 UTC
Great bug report, very short and to the point!
Comment 3 Kohei Yoshida 2014-05-05 21:54:58 UTC
I'll take a look.
Comment 4 Kohei Yoshida 2014-05-06 15:08:22 UTC
It's actually easy to fix this one, but writing a test will be a bit of a challenge.
Comment 5 Kohei Yoshida 2014-05-06 16:21:36 UTC
One line fix, with 47 lines of unit test that goes with it.
Comment 6 Commit Notification 2014-05-06 16:24:11 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77944: 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 7 Commit Notification 2014-05-06 16:24:31 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77944: Put updated formula cells into undo document.



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 8 Kohei Yoshida 2014-05-06 16:27:01 UTC
4.2 backport: https://gerrit.libreoffice.org/9260
Comment 9 Commit Notification 2014-05-06 22:10:46 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=f7f1816938e252dcbd342d30c9189b5344c4960b&h=libreoffice-4-2

fdo#77944: Put updated formula cells into undo document.


It will be available in LibreOffice 4.2.5.

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 Kohei Yoshida 2014-05-06 22:18:11 UTC
fixed.
Comment 11 Commit Notification 2014-05-07 04:40:08 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77944: No need to store updated formulas in undo document when moving.



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 12 Commit Notification 2014-05-07 18:08:09 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=c369a60b60dfeaa12a688d2182c78bc8d4efb38e&h=libreoffice-4-2

fdo#77944: No need to store updated formulas in undo document when moving.


It will be available in LibreOffice 4.2.5.

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 13 m_a_riosv 2014-05-08 01:15:31 UTC
*** Bug 77950 has been marked as a duplicate of this bug. ***
Comment 14 m_a_riosv 2014-05-08 01:18:32 UTC
Thanks Kohei,
verified:
Win7x64Ultimate
Version: 4.2.5.0.0+ Build ID: bc74773e8c5d62f4fe932366f1fae5bebbd19f65
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-07_03:55:27
Version: 4.3.0.0.alpha1+ Build ID: 081a0854635f4bc9f6f743ef4e2675c208405f74
   TinderBox: Win-x86@39, Branch:master, Time: 2014-05-06_23:32:18