Calc Add-in Java extension: assign function to a new category

Mikhail Zemlyanukha gmixaz at gmail.com
Thu Aug 6 05:36:08 PDT 2015


> Now I am facing another issue that _is_ critical - I need to return
> arrays from a worksheet function (for array formula as described here
> https://help.libreoffice.org/3.3/Calc/Array_Functions). I see that
> there's 'sequence' keyword in UNO IDL language to define arrays
> (http://www.openoffice.org/udk/java/man/map_idl_to_java.html#Mapping
> of sequence) so I tried to define a function returning a
> single-dimensional array of doubles:
>

Please disregard this issue - it was some fault on my side. I
re-tested following IDL definition for array function:

sequence < sequence < any > > MyFunc(
     [in] com::sun::star::beans::XPropertySet xOptions
);

With Java implementation

        public Object[][] MyFunc(
                com.sun.star.beans.XPropertySet xOptions
        ) {
            return new Object[][] { {1.1, 2.5}, {3.6, 7.8} };
        }

and it works OK.

Regards,
Mike


More information about the LibreOffice mailing list