Calc AddIn - check for empty cell in parameter list (4.4.3.2)
Stephan Bergmann
sbergman at redhat.com
Mon Jun 29 00:12:15 PDT 2015
On 06/27/2015 11:32 PM, Lars Callenbach wrote:
> In an addin function of calc I would like to test whether a parameter is
> provided - and not empty. Uno::Any seems to be the appropriate data type
> (hasValue function is provided). Unfortunately the following code always
> returns 1 (str.hasValue()==TRUE) even if the cell is empty. How can I
> check for empty cells (in order to provide default values)?
Do not confuse arguments to calc add-in functions with spreadsheet cell
contents. My understanding is that:
* if you leave out an actual argument for a parameter of an add-in
function call, the Any's value will be void (hasValue() returns false);
* if you instead pass a reference to an empty spreadsheet cell, the
Any's value will be an empty OUString.
More information about the LibreOffice
mailing list