Bug 93127 - named range changed after copy, paste
Summary: named range changed after copy, paste
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.2.0 target:5.1.3
Keywords:
: 91744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-05 03:44 UTC by David Lochrin
Modified: 2016-08-19 15:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A spreadsheet which demonstrates the problem (50.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-06 02:40 UTC, David Lochrin
Details
The macro called by the button (not relevant to problem) (1.85 KB, text/plain)
2015-08-06 02:43 UTC, David Lochrin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Lochrin 2015-08-05 03:44:24 UTC
This bug is probably related to #91744 but is easily reproducible.

It occurs when a spreadsheet has columns having named ranges with scope restricted to the sheet.  If a block of data is copied and pasted within a named range, the end of that range will be modified (decremented in all the examples I have seen) when it should be unchanged.

For example, "Tasks" is defined as $Sheet1.$B$2:$B$59.

B49:B53 is then copied and the values (Text, Numbers, Date & Time) pasted to B30 and following cells.  The named range "Tasks" is now found to be $Sheet1.$B$2:$B$40 when it should be unchanged.

Regards.
David Lochrin
Comment 1 Joel Madero 2015-08-05 04:30:40 UTC
Please attach a simple document demonstrating the issue. Marking as NEEDINFO - once you attach set to UNCONFIRMED. Thanks
Comment 2 David Lochrin 2015-08-06 02:40:58 UTC
Created attachment 117689 [details]
A spreadsheet which demonstrates the problem
Comment 3 David Lochrin 2015-08-06 02:43:37 UTC
Created attachment 117690 [details]
The macro called by the button (not relevant to problem)
Comment 4 David Lochrin 2015-08-15 02:08:56 UTC
Sorry, but I hadn't noticed Joel's request to change the status when I posted the problem example.
Comment 5 raal 2015-08-20 11:36:14 UTC
Reproducible with Version: 5.1.0.0.alpha1+
Build ID: 6b7354ae66db40246a09e00aa876443057655a43
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-19_01:05:16
Comment 6 Eike Rathke 2016-03-21 15:07:21 UTC
I'm trying to stab this..
Comment 7 Commit Notification 2016-03-21 17:55:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#93127 copying cells does not modify named expressions

It will be available in 5.2.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 8 Eike Rathke 2016-03-21 18:07:50 UTC
Pending review
https://gerrit.libreoffice.org/23409 for 5-1
Comment 9 Commit Notification 2016-03-21 19:49:58 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

unit test for copying cells within named range, tdf#93127

It will be available in 5.2.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 2016-03-22 00:20:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5e655ecfe007238080941077c6dc6187005e91fa&h=libreoffice-5-1

Resolves: tdf#93127 copying cells does not modify named expressions

It will be available in 5.1.3.

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 Alex Thurgood 2016-08-19 15:00:52 UTC
*** Bug 91744 has been marked as a duplicate of this bug. ***