After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750171 - Cut and Paste does not update the formulas as expected when moving from one sheet to another
Cut and Paste does not update the formulas as expected when moving from one s...
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-05-31 10:59 UTC by boulshet
Modified: 2018-05-22 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gnumeric (39.30 KB, image/png)
2015-06-01 17:24 UTC, boulshet
Details
Libreoffice (38.41 KB, image/png)
2015-06-01 17:24 UTC, boulshet
Details

Description boulshet 2015-05-31 10:59:03 UTC
type in sheet 1:
  1 in A1
  2 in A2
  A1+A2 in A3
then cut and paste A3 to Sheet2!A3

The formula in Sheet2!A3 is A1+A2. I expected it to be Sheet1!A1+Sheet1!A2

Is it a bug ? imo yes.

Thanks
Comment 1 Andreas J. Guelzow 2015-05-31 22:10:35 UTC
A1 and A2 are relative addresses, relative to the cell they appear in. SO the behaviour you see is exactly the desired behaviour.

If you had pasted to Sheet2!A4 you would still get the result of adding the two numbers just above that cell.
Comment 2 Andreas J. Guelzow 2015-05-31 22:13:31 UTC
Note: if your formula had been =Sheet1!$A$!+Sheet1!$A$2 then it would stay the same wherever you pasted it.

If the formula had been =Sheet1!A!+Sheet1!A2, then the sheet name would remain fixed but the cells on that Sheet would be relative to the location it is asted to.
Comment 3 boulshet 2015-06-01 11:41:24 UTC
Well, from a user point of view, the behaviour is at least not consistant with what you get with a cut and paste within the same sheet: the formula still uses the old cells (Sheet1!A1 and Sheet1!A2) with a cut and paste whithin the same sheet. This is not true with another sheet. 
I reopened the bug just in order to make sure you are see my answer, of course feel free to close
Comment 4 Morten Welinder 2015-06-01 12:20:20 UTC
It's a borderline case with decades of historical baggage.

For copy-and-paste, it's clear that the addresses should be treated as
referring to the unspecified sheet whereever they get copied to.

For cut-and-paste, it's less clear.  This is really the spreadsheet
equivalent of moving a cell.  Both XL and LO treat the cell references
as belonging to Sheet1.
Comment 5 boulshet 2015-06-01 17:22:33 UTC
(In reply to Morten Welinder from comment #4)
> For cut-and-paste, [...]  Both XL and LO treat the cell references
> as belonging to Sheet1.

And gnumeric does not.
I append snapshots for gnumeric and libreoffice.
Both contains in sheet 1 A1=1, A2=2 and A3=A1+A2 before being moved to sheet2

Regards
Comment 6 boulshet 2015-06-01 17:24:06 UTC
Created attachment 304370 [details]
Gnumeric
Comment 7 boulshet 2015-06-01 17:24:48 UTC
Created attachment 304372 [details]
Libreoffice
Comment 8 GNOME Infrastructure Team 2018-05-22 14:19:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/285.