Hello,
I would like to write a function which takes in four arguments. Each of the argument is a two dimensional range of cells. But they are optional. My question is what should my idl and xcu file look like. And the function prototype. I am developing a C++ add in.
Thanks,
Saleem
Optional Arguments
Optional Arguments
OpenOffice 3.4.0
Mac OS X 10.5.8
Mac OS X 10.5.8
- Charlie Young
- Volunteer
- Posts: 1559
- Joined: Fri May 14, 2010 1:07 am
Re: Optional Arguments
Optional arguments are specified as any in the idl file, and require no special consideration in the CalcAddin.xcu.saleem145 wrote:Hello,
I would like to write a function which takes in four arguments. Each of the argument is a two dimensional range of cells. But they are optional. My question is what should my idl and xcu file look like. And the function prototype. I am developing a C++ add in.
Thanks,
Saleem
Here's the idl for one I happen to have.
Code: Select all
string cDraw( [in] sequence< sequence< any > > dims, [in] string ShapeName, [in] any FillSpecs, [in] any ShapeText, [in] ::com::sun::star::beans::XPropertySet docProps);
Code: Select all
if(FillSpecs.getValueTypeName() == OUString(RTL_CONSTASCII_USTRINGPARAM("[][]any"))) {
---- do array stuff
) else (FillSpecs.getValueTypeName() == OUString(RTL_CONSTASCII_USTRINGPARAM("double"))) {
... do single value stuff
}
The ValueTypeName for an omitted optional argument is "void."
Apache OpenOffice 4.1.1
Windows XP
Windows XP