That’s the macro getting called as a UDF from a fresh spreadsheet (ODF).
Function examplefun(your_array as variant) As Variant
GlobalScope.BasicLibraries.loadLibrary("ScriptForge")
dim my_array() as variant
for each item in your_array()
my_array = SF_Array.Append(my_array, item)
next item
examplefun = my_array
End Function
The Basic IDE pops up here but with no possibility to interact (it’s in the ScriptForge library):
Public Function Item(Optional ByVal Key As Variant) As Variant
''' Return the value of the item related to Key
''' Args:
''' Key: the key value (string)
''' Returns:
''' Empty if not found, otherwise the found value
''' Example:
''' myDict.Item("ThisKey")
''' NB: defined as a function to not disrupt the Basic IDE debugger
Item = _PropertyGet("Item", Key)
End Function ' ScriptForge.SF_Dictionary.Item
After the first failure, everything works and recalc does its job in the spreadsheet until LibreOffice is closed. Closing the spreadsheet alone does not trigger the issue.
EDIT:
examplefun.ods (11.2 KB)