Bug 85304 - Reference of cell name modified after deletion of cell range
Summary: Reference of cell name modified after deletion of cell range
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: high normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.5.0 target:4.4.0.0.beta3 ta...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-10-21 20:53 UTC by Laurent Balland
Modified: 2015-01-08 14:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Cell name reference is in B1, moved to A1 if delete A2:A4 with shift left (7.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-21 20:53 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2014-10-21 20:53:55 UTC
Created attachment 108213 [details]
Cell name reference is in B1, moved to A1 if delete A2:A4 with shift left

Description: when deleting zone and shifting left (not deleting entire column), references to cell names are modified even if they should not shift.

Steps to reproduce:
1. Create a new spreadsheet
2. In B1, Insert > Names > Define
3. Enter a name and validate with Add (see attachment)
4. Select A2:A4, right click > Delete... > Shift cells left
5. Ctrl+F3 to manage names

Expected behavior:
Reference to name should be unchanged in B1, because shifting left concerns only row 2 to 4 and not row 1 where name is referenced.

Observed behavior:
Reference to name is now A1.


Reproduce with:
- Version: 4.2.0.4
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
- Version: 4.3.3.1
Build ID: 7d55112667c8fcddb67bc3803796b46c93aa56b0
- Version: 4.4.0.0.alpha1+
Build ID: a8c24b25fd9fb21097a08a22797bf61b59099ea1
TinderBox: Win-x86@42, Branch:master, Time: 2014-10-21_06:31:17

NOT reproduce with:
- Version: 4.1.6.2
Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
Comment 1 ign_christian 2014-10-22 02:46:41 UTC
Hi Laurent, I can confirm with 4.2.7.2 - Ubuntu 12.04 x86. 

But..maybe it's been fixed in latest daily because of Bug 82047 fixing? Sorry..I can't check it yet..
Comment 2 pierre-yves samyn 2014-10-22 06:23:34 UTC
Hi

Reproduced on Windows XP & Version: 4.3.1.2
Build ID: 958349dc3b25111dbca392fbc281a05559ef6848

Regards
Pierre-Yves
Comment 3 Laurent Balland 2014-10-22 08:33:02 UTC
Hi Christian,

Thanks for the link to bug 82047 (that I did not find previously). Unfortunately, fixing of this bug does not fix this one: I can reproduce with Version: 4.4.0.0.alpha1+
Build ID: 9ecac3874d179b1d7aa6b45337001b1def06a9dd
TinderBox: Win-x86@42, Branch:master, Time: 2014-10-22_06:31:01
Comment 4 ign_christian 2014-10-23 02:17:19 UTC
So lets add the bug to See Also. Perhaps Kohei interested with this one since both cases are similar.
Comment 5 Laurent Balland 2014-11-06 20:37:58 UTC
Confirmed with:
- Version: 4.2.0.0.beta1
Build ID: f4ca7b35f580827ad2c69ea6d29f7c9b48ebbac7
- Version: 4.2.0.0.alpha0+
Build ID: 4a8f7ddc290d1ea3131de6611b6833b77ac7ab1f (2013-08-28)

Unable to test with (no reference appears with Ctrl+F3):
- Version: 4.2.0.0.alpha0+
Build ID: 4ba92ec1d565848c86c5e802b30f17862ad6505f (2013-06-27)
- Version: 4.2.0.0.alpha0+
Build ID: 2f6cbe13e61c44d4bab8192a4708b698d3d9da33
TinderBox: Win-x86@6-debug, Branch:master, Time: 2013-07-25_00:00:21

Update version accordingly
Comment 6 Laurent Balland 2014-11-06 21:02:16 UTC
Confirmed with recent master:
Version: 4.4.0.0.alpha1+
Build ID: 8b21b5cbe78945b27525b4ce78ae3d981f90590f
TinderBox: Win-x86@42, Branch:master, Time: 2014-11-06_03:55:54
Comment 7 Laurent Balland 2014-12-03 20:32:38 UTC
Reproduced with Version: 4.5.0.0.alpha0+
Build ID: 975a054cc2eeb04516f1f1ef3c9064b2f3cd9456
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-02_22:25:27
Comment 8 Commit Notification 2014-12-08 07:31:41 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

don't update range name if ref not in update range, fdo#85304

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-12-08 07:31:44 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

add test for fdo#85304

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2014-12-08 07:33:03 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b02b1317d41705eb77fbdf53f644199996ee4d0d&h=libreoffice-4-4

don't update range name if ref not in update range, fdo#85304

It will be available in 4.4.0.0.beta3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Laurent Balland 2014-12-09 10:07:31 UTC
Verified with Version: 4.5.0.0.alpha0+
Build ID: 5757af8008cb6881e9a40ec2b4e28330bc4fef7f
TinderBox: Win-x86@42, Branch:master, Time: 2014-12-09_03:38:06
Locale: fr_FR

Thanks Markus :)
Comment 12 Commit Notification 2015-01-08 14:15:37 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba874864eb57e38b6368256ccadcb8274eec4f2c&h=libreoffice-4-3

don't update range name if ref not in update range, fdo#85304

It will be available in 4.3.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.