xutuan Zhang wrote:
I am writting some Add-in code for Calc to call my DLL/.so written in
C..I have a few questions below:

1. For "short" type parameters in my C code, if I use "short" in IDL
file, sal_Int16 in the cpp code, then the function will not be able to
show in Calc's function list...i.e., the registration fails (only for
this perticular function which has type "short"). If I change it to
long/sal_Int32, the function will show in the list.

Only the types mentioned in the description for service "AddIn" are allowed (see http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/AddIn.html).

2. How can I set an input parameter as [optional]? i.e., by default, I
want all the input parameter to be 0. Currently all params are shown as
"required", i.e., if even one input parameter is missing, then the
function would return "Err:504".

You can use the type "any" for a single optional parameter, or "sequence<any>" for an unknown number of parameters. Note that Calc allows missing parameters only at the end, so a formula like "=MYFUNC(;1)" isn't possible (there are plans to change this for a later version).

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to