Bug Hunting Session
Bug 38380 - Calc: Named range on sheet level not updated in Move or Cut+Paste
Summary: Calc: Named range on sheet level not updated in Move or Cut+Paste
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.0 release
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:3.5 target:3.4.2
Keywords:
: 38227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-16 12:01 UTC by Andreas Säger
Modified: 2011-12-23 14:19 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2011-06-16 12:01:46 UTC
Create a new sheet level name, say $Sheet1.$A$1:$B$5 refers to some name but only on Sheet1. 
Fill some values in it.
Create some reference, say =INDEX(MyName;1;1)
Select the named range and move it (cut|drag).
Symptom #1: The reference does not update unless you do a hard recalculation [Ctrl+Shift+F9]
The reference is still valid. The formula points to the same value.
Call the names dialog again.
Symptom #2: According to the dialog the named reference still points to the $Sheet1.$A$1:$B$5 which is obviously not true.
Symptom #3: After save, close, reload the name refers to the first position.

Problem: It is impossible to move a named reference on sheet level without manual adjustment in the dialog.
Comment 1 Markus Mohrhard 2011-06-16 12:21:19 UTC
*** Bug 38227 has been marked as a duplicate of this bug. ***
Comment 2 LeMoyne Castle 2011-06-18 13:58:59 UTC
See also i#115506: Reports Go-OO failure to update named range 
Go-oo:  OpenOffice.org 3.2.1  OOO320m19 (Build:9505)  ooo-build 2010-07-18
and reports issue fixed in OOo3.3rc.
Comment 3 Markus Mohrhard 2011-06-20 23:08:51 UTC
LeMoyne Castle, this is a totally different issue. 

We have here the problem that we don't update the reference for sheet local range names. OO doesn't have those and the update reference for global range names are already implemented.

I'll have alook at it, I'm aware of the problem in the source code.
Comment 4 Markus Mohrhard 2011-06-21 01:56:25 UTC
Ok sent an initial patch for review into 3-4.

There are still some issues not mentioned in this bug report:
-moving sheets
-inserting sheets
-deleting sheets
-copying sheets

I will have to deal with them when I fixed a problem that prevents the work on it.
Comment 5 Andreas Säger 2011-06-21 09:21:31 UTC
While we're in it: 
The bastards do not show up in the navigator nor name box.
Comment 6 Markus Mohrhard 2011-06-21 09:41:09 UTC
(In reply to comment #5)
> While we're in it: 
> The bastards do not show up in the navigator nor name box.

 What do you mean with this? Do you mean the Names->Insert Dialog? this is fixed in master for 3.5 but will not get into the 3-4 branch.

Otherwise please give a detail description how to reproduce it.
Comment 7 Andreas Säger 2011-06-22 04:44:14 UTC
The navigator is the docking window which shows all the names, database ranges, objects, scenarios and other sheets when you hit F5.
The name box is the combo box left of the formula bar. It accepts valid range addresses, data range names and unambiguous named expressions, i.e. named expressions referring to a completely absolute range address (single range $Sheet.$A$1 or $Sheet.$A$1:$X$99 with 3 or 5 dollar signs respectively). 
When you type something into that box which is neither an existing data range name, named expression nor a valid address string, a new, completely absolute range name will be created. If the entered expression points to some range unambiguously, the range gets selected.
Comment 8 Markus Mohrhard 2011-06-22 05:00:58 UTC
please add all future enhancements around local range names at:
https://bugs.freedesktop.org/show_bug.cgi?id=38565

I'll use this bug only for all update problems
Comment 9 Andreas Säger 2011-06-22 09:09:38 UTC
And while we are in the matter of this completely flawed implementation:
Create a name on sheet level, say XName refers to Sheet1.A1
Create a reference, say B1 =XName and enter something in XName
Select another cell, say A2 and enter something.
Now type XName into the name box which will create another XName on document level making all references point to this one.
Comment 10 Markus Mohrhard 2011-06-22 10:01:37 UTC
please don't add any further bugs here but in https://bugs.freedesktop.org/show_bug.cgi?id=38565

I'll close this bug as soon as I fixed all update problems. The other bug is for all outstanding work on local range names. Thanks.
Comment 11 Markus Mohrhard 2011-06-29 20:46:25 UTC
pushed to master and asked for sign-off for 3-4

all other enhancements or comments if not related to these update problems please in fdo#38565