Java UNO Calc API: detect empty cell
Mikhail Zemlyanukha
gmixaz at gmail.com
Fri Aug 21 06:37:21 PDT 2015
Hi all,
In my LibO Calc Java extension I have a worksheet function receiving
an argument declared as 'any' type in IDL, so I can detect a missing
parameter. But I would like to detect also an empty cell, if that
parameter holds a cell reference.
Seems that I can't do that because the function receives a Double
value 0.0 for an empty cell. When I pass a cell range, I do receive a
2-dimensional array of values (of type String) with empty strings (not
null) so I can't check if a cell is empty either.
I see there's ISBLANK() builtin worksheet function, is my
understanding correct that such functionality is not available via
Java UNO API, but is available for built-in functions using some other
API (not UNO). Is it available for C/C++ extensions?
I understand this that formula engine evaluates parameters before
passing them to a function, so a cell reference to an empty cell gets
converted to a double 0.0 value (while for a range empty cells are
converted to strings, that's a bit strange, but it's another story).
Why empty cells are not converted to java null values, or Any data
type, which can hold Void value (this is the case for a missing
parameter)?
Is there any any info about Calc's function evaluation engine I can
read, only source code? ))
Thanks in advance,
Mike
More information about the LibreOffice
mailing list