Bug 48482 - [EDITING] An absolute self-reference is not respected when copying with some functions. It behaves like a relative reference.
Summary: [EDITING] An absolute self-reference is not respected when copying with some ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: Other Windows (All)
: medium major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:3.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 13:58 UTC by m.a.riosv
Modified: 2012-05-12 19:13 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 m.a.riosv 2012-04-09 13:58:40 UTC
Introduce in A1:
=COLUMN($A$1)
copy to A2
the copied formula in A2 is:
=COLUMN($A$2)

Other function with the error is CELL("address";$A$1)

For example: ROW() function seems works well.


Maybe a regression, works well in 3.4.5 with both functions.
Comment 1 m.a.riosv 2012-04-20 15:00:48 UTC
Remains in 3.5.3rc1
Comment 2 Nino 2012-04-22 13:08:17 UTC
Confirmed with Linux/32. 

Effect seems to be restricted to manual copy&paste (i.e. Ctrl+C, Ctrl+V). Autofilling (click on small rectangle down right of cell cursor) seems to work ok. 

Maybe it's a difference if referenced cell is not equal copied cell, but I haven't examined enough yet, so needs further narrowing. 

Looks as if under certain circumstances the reference is not recognized as absolute and therefore treated as relative.

MAB candidate?
Comment 3 Nino 2012-04-22 13:12:17 UTC
sorry, forgot to mention my Version: 3.5.3.1 and  master~2012-04-17_13.43.52_LibO-Dev_3.6.0alpha0_Linux_x86_install-rpm_en-US
Comment 4 Markus Mohrhard 2012-04-22 14:25:52 UTC
This should happen for all formulas that support self reference.

There is a problem in my copy/paste adjust formula algorithm for self references.
Comment 5 Not Assigned 2012-04-22 16:26:30 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

only update absolute refs when copying between docs, fdo#48482
Comment 6 Markus Mohrhard 2012-04-22 16:32:05 UTC
This copy&paste formula adjusting code is becoming too complex. Before I'll add that patch into 3-5 I'll need to write some automatic tests to make sure that I have not introduced another bug.
Therefore it will not make it into 3-5-3.
Comment 7 Not Assigned 2012-04-22 17:26:32 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

add test case for copy/paste formulas, related fdo#48482
Comment 8 m.a.riosv 2012-04-23 04:26:55 UTC
Thanks Markus.

I hope, I can download the master and do a test in a couple of days.
Comment 9 m.a.riosv 2012-04-24 16:52:57 UTC
Seems solved in 3.6.0alpha0+  (Build ID: f3d7d6e)
Copied in all directions, with absolute and mixed relative/absolute references, in a large and complex spreadsheet with external links, arrays, and many types of functions.
Win7x64 Ultimate