Bug 55169 - Name definitions
Summary: Name definitions
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 23:37 UTC by Ken
Modified: 2013-12-25 00:32 UTC (History)
4 users (show)

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 Ken 2012-09-20 23:37:13 UTC
On A 5 sheet spreadsheet, 
Defined names locations are scrambled upon save and reload.

Steps to reproduce:
1. Define a name.  Sheet2.$A20:G30
   Define another  Sheet3.$A10:G15
2. Save file 
3. Close and reload
4. Manage Names. Defines now have other numbers or undefined refs.

Current behavior:  Random changes.

Expected behavior:  Same Values as defined.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1
Comment 1 Markus Mohrhard 2012-09-30 21:17:50 UTC
Which base cell did you chose? This is an important information when defining relative references.
Comment 2 Ken 2012-09-30 21:48:35 UTC
Typical link name would look like $Funds.$A4:E31
where Funds is the name of the sheet.
Some Name definitions are changed some are not.
Changes include sometimes changing the letter after the colon to J or G
And either or both numbers to something large or to #REF!



On 9/30/2012 5:17 PM, bugzilla-daemon@freedesktop.org wrote:
>
> *Comment # 1 <https://bugs.freedesktop.org/show_bug.cgi?id=55169#c1> 
> on bug 55169 <https://bugs.freedesktop.org/show_bug.cgi?id=55169> from 
> Markus Mohrhard <mailto:markus.mohrhard@googlemail.com> *
> Which base cell did you chose? This is an important information when defining
> relative references.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 3 Markus Mohrhard 2012-09-30 21:53:07 UTC
You know that you are using relative references? So they are expected to change if you are not in the same cell.

That is why I asked for the base cell. The base cell of a range name is the cursor cell when you define the range name. When you now move the cursor and reopen the manage names dialog the shown formula/range will change.

If you don't want relative references prefix each part of the formula with a $.

So the absolute reference version of your first range looks like: $Sheet2.$A$20:$G$30.
Comment 4 Ken 2012-09-30 22:16:26 UTC
I am not moving anything.
I define the name in the Name dialog.
I then define the link on another sheet to that name.
The links work until the file is saved and reloaded.
The some of them are garbage.


On 9/30/2012 5:53 PM, bugzilla-daemon@freedesktop.org wrote:
>
> *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=55169#c3> 
> on bug 55169 <https://bugs.freedesktop.org/show_bug.cgi?id=55169> from 
> Markus Mohrhard <mailto:markus.mohrhard@googlemail.com> *
> You know that you are using relative references? So they are expected to change
> if you are not in the same cell.
>
> That is why I asked for the base cell. The base cell of a range name is the
> cursor cell when you define the range name. When you now move the cursor and
> reopen the manage names dialog the shown formula/range will change.
>
> If you don't want relative references prefix each part of the formula with a $.
>
> So the absolute reference version of your first range looks like:
> $Sheet2.$A$20:$G$30.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 5 Markus Mohrhard 2012-09-30 22:23:34 UTC
Can you please describe in all details what you are doing. Including which cell is selected when you are defining the range names and in which cell you are using the range name.
The more details you add to your description the more likely it is that I can reproduce it and fix it if it is a bug.
Comment 6 Ken 2012-09-30 23:06:52 UTC
Insert->Names->Define.
Fill in a name and a range.  Example $Funds.$A#:E#
Do this for a number of regions on the Funds sheet.
They are always A#:E#

Or trying to fix some definitions.
Insert->Names->Manage
Select a definition and retype the range to the proper values.

This part
On the other sheet.
Select a cell A# with a right click and dismiss menu popup.
This is because the cell may already have a link that I do not want to take.
Insert->Hyperlink.
In the dialog Target field type a name previously defined.
In the Text field type the name again.
Apply and Close.

Do this in the column for each of the names defined.
The links work fine.
I did not check if inserting a line in one of the defined ranges adjusts 
properly.
It should since there are no $ in front of the numbers.
But there is no correlation with the outlandish results gotten from a 
save and reload.
I am not sure but I think auto save also scrambles some of the name 
definitions.
The names closer to the top of sheet seem less likely to be affected.
Usually the first one is correct and the farther down the Funds sheet 
the worse the result.


On 9/30/2012 6:23 PM, bugzilla-daemon@freedesktop.org wrote:
>
> *Comment # 5 <https://bugs.freedesktop.org/show_bug.cgi?id=55169#c5> 
> on bug 55169 <https://bugs.freedesktop.org/show_bug.cgi?id=55169> from 
> Markus Mohrhard <mailto:markus.mohrhard@googlemail.com> *
> Can you please describe in all details what you are doing. Including which cell
> is selected when you are defining the range names and in which cell you are
> using the range name.
> The more details you add to your description the more likely it is that I can
> reproduce it and fix it if it is a bug.
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 7 bfoman (inactive) 2013-03-15 11:48:04 UTC
@Markus Mohrhard:
Did you get all needed informations from the reporter?
Comment 8 franky.chambers 2013-09-28 21:59:34 UTC
I have already file this bug that was not corrected in LibreOffice 3.4.

With LibreOffice 4.0 I check to see if the bug has been corrected, but same behaviour :
- random #Name error when you reload the spreadsheet.

There was the same behaviour with ApacheOpenOffice.

I've file this bug to ApacheOpenOffice : BUG #122840, and it has been VERIFIED and FIXED.
Comment 9 bfoman (inactive) 2013-09-28 22:10:01 UTC
(In reply to comment #8)
> With LibreOffice 4.0 I check to see if the bug has been corrected, but same
> behaviour :
> - random #Name error when you reload the spreadsheet.

Thanks, but could you please recheck with latest stable LibreOffice version (4.1.1 as of today)?
Comment 10 tommy27 2013-09-29 06:11:59 UTC
(In reply to comment #8)
>
> There was the same behaviour with ApacheOpenOffice.
> 
> I've file this bug to ApacheOpenOffice : BUG #122840, and it has been
> VERIFIED and FIXED.

maybe our devs could use the same patch that AOO used to fix this in 4.0.1
Comment 11 Markus Mohrhard 2013-09-29 07:09:36 UTC
The AOO patch has nothing to do with our problem. They produced crap when they added sheet local range names and have to fix that stuff now.
Comment 12 Robinson Tryon (qubit) 2013-12-24 20:54:41 UTC
(In reply to comment #7)
> @Markus Mohrhard:
> Did you get all needed informations from the reporter?

Moggi - Status?

Ken - Can you still repro this problem against recent builds of LibreOffice?
https://www.libreoffice.org/download/pre-releases/

Thanks!
Comment 13 Robinson Tryon (qubit) 2013-12-24 20:54:55 UTC
Status -> NEEDINFO
Comment 14 Ken 2013-12-24 21:46:46 UTC
Yes, defined Names and Ranges now seem to retain their values and work 
properly as intra document links.

On 12/24/2013 3:54 PM, bugzilla-daemon@freedesktop.org wrote:
> Qubit <mailto:qubit@runcibility.com> changed bug 55169 
> <https://bugs.freedesktop.org/show_bug.cgi?id=55169>
> What 	Removed 	Added
> CC 		qubit@runcibility.com
>
> *Comment # 12 <https://bugs.freedesktop.org/show_bug.cgi?id=55169#c12> 
> on bug 55169 <https://bugs.freedesktop.org/show_bug.cgi?id=55169> from 
> Qubit <mailto:qubit@runcibility.com> *
> (In reply tocomment #7  <show_bug.cgi?id=55169#c7>)
> > @Markus Mohrhard:
> > Did you get all needed informations from the reporter?
>
> Moggi - Status?
>
> Ken - Can you still repro this problem against recent builds of LibreOffice?
> https://www.libreoffice.org/download/pre-releases/
>
> Thanks!
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 15 Robinson Tryon (qubit) 2013-12-25 00:32:19 UTC
(In reply to comment #14)
> Yes, defined Names and Ranges now seem to retain their values and work 
> properly as intra document links.

Excellent! Resolving as WORKSFORME.
:-)