Download it now!
Bug 61119 - EDITING: Copying sheet btw documents messes up named ranges
Summary: EDITING: Copying sheet btw documents messes up named ranges
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: high normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:5.0.6
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 14:18 UTC by cstingl
Modified: 2016-10-25 19:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document 1 (8.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-21 08:21 UTC, cstingl
Details
Test document 2 (8.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-21 08:21 UTC, cstingl
Details
Test document 2 (8.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-21 08:22 UTC, cstingl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cstingl 2013-02-19 14:18:41 UTC
1. Create new spreadsheet document "spreadsheet1.ods"
2. Create a new named range "namedrange1" pointing to a single cell with value 42.
3. In a different cell, enter "=namedrange1" to confirm that the named range is correctly defined. Result: 42

4. Create another spreadsheet document "spreadsheet2.ods"
5. Create a new named range "anothernamedrange" pointing to a single cell with value 3.14
6. In a different cell, enter "=anothernamedrange" to confirm that the named range is correctly defined in the second document. Result: 3.14

7. In "spreadsheet2.ods", right-click Sheet1 and select "Move-Copy Sheet". Location/To Document: select "spreadsheet1". New Name: "sheet1_fromspreadsheet2".
8. Go to "spreadsheet1.ods". Press Ctrl-F3 to check that both named ranges are now defined here.
9. In an empty cell, enter "=namedrange1".

EXPECTED RESULT: 42, the value pointed to by "namedrange1"
RESULT: 3.14, the value pointed to by "anothernamedrange". In the cell edited in step 9, the formula is changed to "=anothernamedrange".

No attachment, as not reproducible after saving and reopening.
Comment 1 Markus Mohrhard 2013-02-20 22:07:05 UTC
Please attach a test document.
Comment 2 cstingl 2013-02-21 08:21:03 UTC
Created attachment 75235 [details]
Test document 1
Comment 3 cstingl 2013-02-21 08:21:23 UTC
Created attachment 75236 [details]
Test document 2
Comment 4 cstingl 2013-02-21 08:22:00 UTC
Created attachment 75237 [details]
Test document 2
Comment 5 cstingl 2013-02-21 08:23:02 UTC
Two test documents attached. To reproduce: Open both documents and proceed from step 7.
Comment 6 Jorendc 2013-08-06 20:20:17 UTC
(In reply to comment #0)
> 1. Create new spreadsheet document "spreadsheet1.ods"
> 2. Create a new named range "namedrange1" pointing to a single cell with
> value 42.
> 3. In a different cell, enter "=namedrange1" to confirm that the named range
> is correctly defined. Result: 42
> 
> 4. Create another spreadsheet document "spreadsheet2.ods"
> 5. Create a new named range "anothernamedrange" pointing to a single cell
> with value 3.14
> 6. In a different cell, enter "=anothernamedrange" to confirm that the named
> range is correctly defined in the second document. Result: 3.14
> 
> 7. In "spreadsheet2.ods", right-click Sheet1 and select "Move-Copy Sheet".
> Location/To Document: select "spreadsheet1". New Name:
> "sheet1_fromspreadsheet2".
> 8. Go to "spreadsheet1.ods". Press Ctrl-F3 to check that both named ranges
> are now defined here.

Ctrl+F3 window looks empty here. Maybe another bug? (tested version see below)

> 9. In an empty cell, enter "=namedrange1".
> 
> EXPECTED RESULT: 42, the value pointed to by "namedrange1"
> RESULT: 3.14, the value pointed to by "anothernamedrange". In the cell
> edited in step 9, the formula is changed to "=anothernamedrange".

I can confirm this behavior. When I type =namedrange2 it'll have value 42 instead of value 3.14

Tested using Windows 8 with LibreOffice Version: 4.2.0.0.alpha0+
Build ID: 087a610fcd5c0c354a9ed6bfccd3451b667d62a3
TinderBox: Win-x86@6-debug, Branch:master, Time: 2013-08-04_21:41:24

Kind regards,
Joren
Comment 7 QA Administrators 2015-04-19 03:20:18 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2015-06-15 11:14:21 UTC
Reproduced with test documents.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 01a189abcd9a4ca472a74b3b2c000c9338fc2c91
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-14_07:46:28
Locale: fi-FI (fi_FI)
Comment 9 Eike Rathke 2016-03-22 17:23:27 UTC
Fixed with commit 336d816176650726f6d14539464d9fd28ddd032d in master and https://gerrit.libreoffice.org/23323 for 5-1 (5.1.3) and https://gerrit.libreoffice.org/23324 for 5-0 (5.0.6)

Pending review https://gerrit.libreoffice.org/23439 for 5-1-2