[Libreoffice-bugs] [Bug 128218] New: FunctionAccess.callFunction returns object type where 'Double' result is expected.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Oct 17 16:56:20 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=128218
Bug ID: 128218
Summary: FunctionAccess.callFunction returns object type where
'Double' result is expected.
Product: LibreOffice
Version: 6.4.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: jag at psilosoph.de
The actual version was not listed in the box.
The bug is concerning the API. "Component" might better be "sdk". (Donno)
Example is in BASIC
Version: 6.3.3.1 (x64)
Build ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win;
Locale: en-GB (de_DE); UI-Language: en-GB
Calc: CL
Create a new document and a new module in its BASIC standard library.
Paste
Sub demo()
fa = createUnoService("com.sun.star.sheet.FunctionAccess")
r = fa.callFunction("RAND",Array())
Print TypeName(r)
REM r is "Object(0 To 0)" now with r(0)(0) containing the result.
Dim q As Double
q = fa.callFunction("RAND",Array())
REM Above statement throws an error "Object variable not set".
End Sub
into that module.
Execute the Sub stepwise and verify the behaviour described by the REM lines.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191017/16b95c47/attachment.html>
More information about the Libreoffice-bugs
mailing list