Bug 88963 - EDITING. Copy, paste with labels erroneously assumes absolute referencing WRT labels.
Summary: EDITING. Copy, paste with labels erroneously assumes absolute referencing WRT...
Status: RESOLVED DUPLICATE of bug 93894
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta1
Hardware: x86 (IA32) All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-01-31 00:14 UTC by dwyoung
Modified: 2016-10-05 08:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Simple demonstration of bug per Description (16.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-01-31 00:14 UTC, dwyoung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dwyoung 2015-01-31 00:14:53 UTC
Created attachment 112975 [details]
Simple demonstration of bug per Description

When a copy and paste is done of a cell with a formula that contains a label, the label is treated as an absolute reference rather than relative reference.

Attached file, CopyPasteWithLabels.ods can be used to demonstrate the problem by the following steps.

1. Copy and paste cell c2 to cell c3. Trace precedents on cell c3 and see that the answer is wrong because in cell c3, the references 'label1' and 'label2' are to row 2 and they should be to row 3.
2. Rather than copying and pasting c2 to c3, type in exact contents of c2 into c3 and the c3 evaluation of the formula gives the correct answer, 43.5.
3. Click the "undo" button and the result in c3 doesn't change back to the incorrect answer, 39, but remains the same, 43.5.

LO 3.6.5.2 works properly and LO 4.2.8.2 exhibits the bug.
Comment 1 m.a.riosv 2015-01-31 02:11:03 UTC
Hi @dwyoung, thanks for reporting.

Reproducible.
Win7x64
Versión: 4.2.0.0.beta1 Build ID: f4ca7b35f580827ad2c69ea6d29f7c9b48ebbac7
Version: 4.2.8.0.0+ Build ID: 1fc1d0d7d38bb16832d0d78d78682ed2d5f8716f
  TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2015-01-08_03:10:08

Last working for me:
Version: 4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a

Only happens copying from top to down not from bottom to up.

Remains only while working with the file after copy.

Hard recalc doesn't help.

The issue disappears saving and reopening.
Comment 2 Matthew Francis 2015-04-11 15:17:07 UTC
Both parts of this seem to have begun at the below commit - the changed calculation and the changed precedents

commit bbb2d8c660b515c98624a41a39ffe94d3a7ecc00
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Fri Aug 9 16:41:22 2013 -0400

    If the formula cell is grouped, update reference only on the top cell.
    
    Change-Id: I5e2e9db621a61deba39a46962e0ca877235d7c90
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:12:21 UTC Comment hidden (obsolete)
Comment 4 Xisco Faulí 2016-10-03 09:24:34 UTC
Adding Cc: to Kohei Yoshida
Comment 5 Kohei Yoshida 2016-10-04 22:14:33 UTC
The fix for Bug 93894 seems to fix this issue as well.
Comment 6 Michael Meeks 2016-10-05 08:14:36 UTC
Testing of Kohei's fix so we can back-port it much appreciated; thanks ! =)

*** This bug has been marked as a duplicate of bug 93894 ***