[Libreoffice-bugs] [Bug 133910] UNO: `callFunction`does not accept one-dimensional Array parameter
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 10 12:10:59 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=133910
Eike Rathke <erack at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS|Windows (All) |All
Summary|UNO: `callFunction`does not |UNO: `callFunction`does not
|accept optional Array |accept one-dimensional
|parameter |Array parameter
Hardware|x86-64 (AMD64) |All
Severity|normal |enhancement
Version|7.0.0.0.beta1+ |Inherited From OOo
--- Comment #12 from Eike Rathke <erack at redhat.com> ---
Note that this
oFA.callFunction( "WORKDAY", Array( "2020-06-08", 1, "2020-06-09",
"2020-06-10"))
can not work as it passes 4 arguments to WORKDAY that expects only 3.
This
oFA.callFunction( "WORKDAY", Array( "2020-06-08", 1, holidays))
could work if holidays was declared as a two-dimensional array (array of
arrays) as the definition of XFunctionAccess::callFunction() states, see
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1sheet_1_1XFunctionAccess.html#aaed56cc122754b1cfaf2edf7fcca91a8
So either for a column vector of rows
dim holidays(1,0)
holidays(0,0) = "2020-06-09"
holidays(1,0) = "2020-06-10"
or for a row vector of columns
holidays = Array(Array("2020-06-09", "2020-06-10"))
However, WORKDAY() for Excel legacy compatibility is an Add-In function (hence
the code pointers of comment 7 are unrelated) that does not parse dates, all
date values MUST be passed as date serial numbers, so this specific call
wouldn't work anyway.
Summarized, this is actually a request for enhancement (RFE) to accept
one-dimensional arrays as well, which I'm reluctant to implement because it
would be an incompatibility and such newer macro code would not run with an
older LibreOffice release.
--
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/20210810/61061adb/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list