Bug 55603 - EDITING: Absolute references to cells in copied area handled as relative references
Summary: EDITING: Absolute references to cells in copied area handled as relative refe...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA (target:3.6.0)
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-04 07:20 UTC by Mariano
Modified: 2012-10-16 14:40 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
And example of formula pasted (7.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-10-04 07:20 UTC, Mariano
Details
More simple sample document (11.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-10-15 17:22 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mariano 2012-10-04 07:20:45 UTC
Created attachment 68065 [details]
And example of formula pasted

Problem description: 
When copy and paste formulas with absolute references, sometimes the pasted formula ignores the absolute reference and treats like relative references.
The problem appears when the absolute reference points to the source cell of copy & paste process.

Steps to reproduce:
1. write a formula like this (at position A1): (test with formulas in Spanish language)
   =COLUMN()-COLUMN($A1)
2. Copy cell A1
3. Paste the formula at cells B1, C1, etc..

Current behavior:
The contents of paste cells is something like
  B1 : =COLUMN()-COLUMN($B1) [results = 0]
  C1 : =COLUMN()-COLUMN($C1) [results = 0]
  etc.

Expected behavior:
The contents of paste cells must be:
  B1 : =COLUMNA()-COLUMNA($A1) [results = 1]
  C1 : =COLUMNA()-COLUMNA($A1) [results = 2]
  etc.

The problems repeats with other funtions, like ROW, for example.
Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1
LibreOffice 3.5.6.2 installed from Fedora 17 repository.
Comment 1 Rainer Bielefeld Retired 2012-10-04 08:36:28 UTC
I see the effect with "LibreOffice 3.5.7.1 German UI/Locale [Build-ID:3fa2330-e49ffd2-90d118b-705e248-051e21c] on German WIN7 Home Premium (64bit), 
and not 
with Server Installation of "LibreOffice 3.3.3  German UI/Locale [OOO330m19 (Build:301) tag libreoffice-3.3.3.1] on German WIN7 Home Premium (64bit) 

@Mariano:
Why do you think that this is a Bug and not a new Feature?
Comment 2 Mariano 2012-10-04 11:05:30 UTC
Because it's used to be the meaning of absolute reference: if you copy the cell, the absolute reference (in this case the "$A" column) must to be unchanged.
If it was a new feature it was a major change and then, how can we call this feature? Absolute references that sometimes -exactly when it refers to the original cell- are relative references? If the user write the "$" it's because it wants an absolute reference, not a relative.

Please note this: the result it's different if you change the formula. For example, if I change the B1 cell, so it contains what I want:
  B1: =COLUMN()-COLUMN($A1) [results 1]
and the copy and paste B1 cell to C1, D1, etc., now the result it's the expected:
  C1: =COLUMN()-COLUMN($A1) [results 2]
  D1: =COLUMN()-COLUMN($A1) [results 3]

It results, that the same formula "=COLUMN()-COLUMN($A1)" paste of different form if it's copy from A1 cell that it's copy from B1 cell:
. Copy from A1 and paste to C1 results "=COLUMN()-COLUMN($C1)"
. Copy from B1 and paste to C1 results "=COLUMN()-COLUMN($A1)"

It seems more a bug like a new feature.
Comment 3 Rainer Bielefeld Retired 2012-10-15 17:22:33 UTC
Created attachment 68584 [details]
More simple sample document

@Mariano 
We know here what a absolute reference means.

As you correctly pointed the problem only appears if the referenced cell is part of the range to be copied. The question was whether that might be an intended "trick" to keep such a range together because users want that because of reasons I don't know. 

I created a more simple document with more simple formula to show the complained effect. 

I do not believe that the observed behavior is intended, but "don't believe" and "don't know" are no criteria fulfilling conditions for NEW due to <https://wiki.documentfoundation.org/BugTriage#Process>  item 5

Additionally the behavior of 3.3.3 seems back, at least for the cases in your and my example a bug now would be WORKSFORME

The question is: did we loose a good no feature (I do not believe) or has the bug gone (I think so, but I don't know).
Comment 4 Rainer Bielefeld Retired 2012-10-15 19:03:00 UTC
Already [Reproducible] with "LibreOffice 3.5.1.2 German UI/Locale [Build-ID: dc9775d-05ecbee-0851ad3-1586698-727bf66] on German WIN7 Home Premium (64bit),
but not with 3.4.5.
Seems the behavior changed from 3.4 to 3.5
3.3 behavior already back since Server Installation of  "LibreOffice 3.6.0.4  German UI/Locale [Build-ID:  932b512] on German WIN7 Home Premium (64bit) (and may be more early) 

I believe that reporter really found a bug and not a new feature I mark this one as WFM.

@all:
Please feel free to open a new bug if you find out that the the 3.5 behavior was a feature.
Comment 5 Mariano 2012-10-16 14:40:41 UTC
Thank you Rainer. I have tested your sample with Spanish 32bit LibreOffice 3.6.2 WinXP and behaviour was ok, as you have said. So thank you again.