Issue 8869 - Basic Function =XSheetName(x) fails on load of the spreadsheet document ...
Summary: Basic Function =XSheetName(x) fails on load of the spreadsheet document ...
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: joerg.skottke
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-31 14:22 UTC by Oliver Brinzing
Modified: 2003-09-25 11:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Function XSheetName (6.06 KB, application/octet-stream)
2002-10-31 14:27 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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