Bug 87709 - Cell range definition incorrectly updated at re-open time
Summary: Cell range definition incorrectly updated at re-open time
Status: RESOLVED DUPLICATE of bug 92468
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) Master
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
Depends on:
Reported: 2014-12-25 15:43 UTC by Jean-Paul
Modified: 2015-12-15 11:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

attached spreadsheet is a test kit (as described above) (29.00 KB, application/vnd.ms-excel)
2014-12-25 15:43 UTC, Jean-Paul

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Paul 2014-12-25 15:43:29 UTC
Created attachment 111326 [details]
attached spreadsheet is a test kit (as described above)

Problem description: 
when a cell range is entered with the lower cell higher than the upper cell, the range definition is corrected at re-open time.
But adjacent cells are incorrectly changed too !

Steps to reproduce:

open the attached spreadsheet.
column B contains numbers.
column C is the sum of the numbers in column B down to its row.
Columns E and F are copies of columns B and C, respectively.

1. Now copy cell F4 and paste it into cell F3.
2. save; close; re-open.
3. The formulas (and thus the values) in columns F have changed in the adjacent cells below F3 (down to F6) !

Current behavior:
The formula text is changed in the cells F3 to F6. 

Expected behavior:
The formula should be changed only in cell F3.
Comment 1 m.a.riosv 2014-12-26 02:58:49 UTC
Hi @jnplg, thanks for reporting.

Reproducible saving as xls, works fine saving as default format ods.
Version: Build ID: 8fd0451cc08e6a5310bed8b7ad1c46b93c1c6889
Version: Build ID: b5ab92248e80a3ff8869a7e731ab70a948531280
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-12-20_10:31:29

Works fine with :
Version (Build ID: e183d5b)
Version: Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
With in first and last reference are changed in F4 but retaining properly absolute reference, no problem.
Comment 2 Jean-Paul 2014-12-26 15:39:51 UTC
I confirm that the problem only happens with file format xls.
It does not happen with file format ods.
It does not happen with file format xlsx.
Comment 3 Michael Weghorn 2015-02-06 23:10:17 UTC
bibisect result:

ba096f438393091574da98fe7b8e6b05182a8971 is the first bad commit
commit ba096f438393091574da98fe7b8e6b05182a8971
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Thu Oct 17 20:00:21 2013 +0000

    commit 8499e78ca03c792f4fa2650e02b519094ba0baa8
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Jul 25 16:01:13 2013 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Jul 25 16:08:01 2013 +0100
        Related: fdo#61544 convert language page from box to grid
        grid compress better than boxes if there isn't enough available space
        Change-Id: I35b433b89a29159a33fc9edb646e46b371747a57

$ git bisect log
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [c2069a369d738078124812312d51f21ea1ce2421] source-hash-f160e4935c474a5293b3d3c11b3d538efb4767a0
git bisect start 'latest' 'last41onmaster'
# bad: [33ac6698e6d90d84f99d784b9553ee87eec27d6a] source-hash-732c0f929fc0229b6da37d4ec4b6de8994fcea46
git bisect bad 33ac6698e6d90d84f99d784b9553ee87eec27d6a
# bad: [e3a648fdaa2bb87293750400b70ba590733a804a] source-hash-33526481788137d959f27ae32910127d1436c1a8
git bisect bad e3a648fdaa2bb87293750400b70ba590733a804a
# bad: [b886825d7eb2550ab40d7b4cd16de8096c57d6eb] source-hash-b46688a663b8709e0e0795f25ef8961db1f46cba
git bisect bad b886825d7eb2550ab40d7b4cd16de8096c57d6eb
# good: [502c05c771cd993b237febc2d8a20140fe589488] source-hash-462df4920ef50032c8f99a9db2ca34c9cc928657
git bisect good 502c05c771cd993b237febc2d8a20140fe589488
# good: [3bffe99b15f359bb4c6941210623dcd0763987c9] source-hash-6768d2c7f2cf75c507ec2108cbbb5a8a6cf7fae9
git bisect good 3bffe99b15f359bb4c6941210623dcd0763987c9
# good: [a8577b9049e085140768f97f7d4ff555a8a447cb] source-hash-98ded3e42011b060368899018c07cbd32e7993f1
git bisect good a8577b9049e085140768f97f7d4ff555a8a447cb
# good: [2d9baecf3ce2ea1ec8bea3e842eed595061eeef6] source-hash-ff51a2b64571a8d72ff4d8a8181d17cf98c42e69
git bisect good 2d9baecf3ce2ea1ec8bea3e842eed595061eeef6
# bad: [b39f384b5baf459aa0bd37c20d5886b040293086] source-hash-f0833d965d20594c0f2d74ffca95589a572e012c
git bisect bad b39f384b5baf459aa0bd37c20d5886b040293086
# bad: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8
git bisect bad ba096f438393091574da98fe7b8e6b05182a8971
# first bad commit: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8

In the first bad commit, the behaviour of copying cell F4 into cell F3 has also changed (and seems to be more reasonable to me than before).
The cell F4 contains "=SUM(E$4:E4)". When copying it into cell F3, that cell contains the following formula:
* "=SUM(E$3:E4)" in commit ba096f4 (first bad commmit)
* "=SUM(E3:E$4)" in commit 2d9baec (last good commit)
This is also mentioned in comment 1.
Comment 4 Matthew Francis 2015-09-06 04:38:19 UTC
Both changes mentioned on this bug (comment 0, comment 3) appear to have been fixed under bug 92468

*** This bug has been marked as a duplicate of bug 92468 ***
Comment 5 Robinson Tryon (qubit) 2015-12-15 11:03:05 UTC
Migrating Whiteboard tags to Keywords: (bibisected)