Bug 123275 - Cell Function performed before calc document fully loaded on initial load(FILEOPEN)
Summary: Cell Function performed before calc document fully loaded on initial load(FIL...
Status: RESOLVED DUPLICATE of bug 123005
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-08 19:31 UTC by Jon A. Miller
Modified: 2019-02-08 19:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
case test file (9.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-08 19:32 UTC, Jon A. Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon A. Miller 2019-02-08 19:31:05 UTC
Description:
"BASIC runtime error. Object variable not set." thrown on second line of following Basic Function on initial file load:
"Function getSheetNme()
  cntlr       = ThisComponent.getCurrentController()
  getSheetNme = cntlr.getActiveSheet().getname()
End Function"

Steps to Reproduce:
1.create macro function as listed in description
2.enter call to function in cell A1
3.save and reload

Actual Results:
"BASIC runtime error. Object variable not set."

Expected Results:
"sheet1" or name of sheet where function called


Reproducible: Always


User Profile Reset: Yes



Additional Info:
-will attempt to attach a case test file(test.ods)
testing:
1) loaded file under safe mode...same error result
2) no errors with 6.1.3.2 or before
3) error occur with 6.1.4.2, 6.1.5.2, 6.2.0.3
4) Confirmed: cell function is performed before "open" event is thrown
5) Excerpts from ask forum titled:  "getActiveSheet error on initial file load"
**********************************************************************
"....You are correct in getting the error on initial load. While:

  cntlr = ThisComponent.getCurrentController()
creates no problem, the other statements using cntlr do generate 
the error on document load in v6.1.4 but not v6.1.3. Must be a new bug."

User: Ratslinger ( Dec 20 '18 )
***********************************************************************
"@jaM Have now used MRI to try & isolate the problem further. 
ThisComponent is available but nothing after that until the sheet is 
completely loaded but it is confusing as to how it is seeing the cell 
function if it isn't completely loaded. Again this only in v6.1.4."

User: Ratslinger ( Dec 20 '18 )
**********************************************************************
Env: Win10-64 Home ver1809 Build 17763 12GB Memory
     AMD A12-9700P RADEON R7, 10 COMPUTE CORES 4C+6G, 2500 Mhz, 4 Core(s)
Comment 1 Jon A. Miller 2019-02-08 19:32:35 UTC
Created attachment 149030 [details]
case test file
Comment 2 Oliver Brinzing 2019-02-08 19:55:09 UTC
i think this is a duplicate of issue:

FILEOPEN: Error on creating getCurrentController().getActiveSheet() 
for basic script from location=document ?
https://bugs.documentfoundation.org/show_bug.cgi?id=123005

*** This bug has been marked as a duplicate of bug 123005 ***