Issue 8869

Summary: Basic Function =XSheetName(x) fails on load of the spreadsheet document ...
Product: Calc Reporter: Oliver Brinzing <oliver.brinzing>
Component: codeAssignee: joerg.skottke
Status: CLOSED NOT_AN_OOO_ISSUE QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Function XSheetName none

Description Oliver Brinzing 2002-10-31 14:22:13 UTC
When I'm using the following Formula in a spreadsheet, I get the Name of the
sheet as String: 

e.g. in Cell A1:  =XSheetName(1) returns "MySheet"

When I save the spreadsheet document with the oo 1.0.1 file format .sxc, the
Function fails on Load (Object is Null ?). 
When I save the document as SO 5.2 .sdc, it works on load ...

any hints ?

regards

Oliver
--
Function XSheetName(ByVal nIndex as Long) as String
   XSheetName = StarDesktop.CurrentComponent.Sheets.getByIndex(nIndex-1).Name
End Function
Comment 1 Oliver Brinzing 2002-10-31 14:27:34 UTC
Created attachment 3442 [details]
Function XSheetName
Comment 2 Oliver Brinzing 2002-10-31 14:36:36 UTC
I have to be more precise:

When I start OO 1.0.1 and then use File->Open to open the spreadsheet
document, it works ...
But when I double click on the file to open (and to start oo),
it fails, is it a initalization problem ?

Oliver
Comment 3 Oliver Brinzing 2003-05-09 10:16:08 UTC
Hi,

I you disable the feature "AutoCalculate", it works, seems, that at
the time the sheet is calculated, the oDocument Object isn't avaiable ...

best regards

Oliver
Comment 4 frank 2003-08-08 11:34:33 UTC
Hi Skotty,

please have a look.

Frank
Comment 5 joerg.skottke 2003-09-15 09:04:47 UTC
Hi Oliver,

using ...CurrentComponent... at loadtime is not a good idea, the
object might not exist at that point. 

Try to use "thisComponent" instead.

I invalidate this issue. If you still have problems, please report back,
thank you.

Joerg
Comment 6 joerg.skottke 2003-09-25 11:55:39 UTC
close