XRowLocate::findColumn API definition ambiguities
Lionel Elie Mamane
lionel at mamane.lu
Wed Sep 11 02:20:57 PDT 2013
On Tue, Sep 10, 2013 at 09:56:50PM +0100, Andrzej Hunt wrote:
> The definition of XRowLocate::findColumn, and its implementations, all
> seem to be slightly confused.
> XRowLocate doesn't specify what should happen what happens if
> findColumn is called for an invalid column name.
You mean XColumnLocate, not XRowLocate.
> In the case of JDBC drivers: the JDBC specification states that an
> SQLException should be thrown in this case. (...)
> Is it OK if I rewrite the specification of findColumn to mirror that
> of the JDBC specification,
Yes. SDB(C)(X) is (from my understanding) a C++-ized copy of (an older
version of) JDBC anyway, so just align.
> perhaps with a note that some drivers may still return invalid
> values instead?
Version of the specification before LibreOffice 4.2 left unspecified
what happened when passed an invalid column name. As a result, some
drivers written against older specification may return a special
invalid numeric value, such as a negative value, zero or a number
greater than the number of columns.
> (Of course I'd also upgrade all the drivers to reflect the new
Great, thanks. If you could also review what callers of findColumn
within LibreOffice do, that would be even greater.
> -- so this note would only apply to any external drivers -- are
> there any?)
I don't know of any truly external; in some way, the MySQL one counts
as "external" since people take binaries and try to use them with
multiple OpenOffice.org, Apache OpenOffice and LibreOffice versions.
More information about the LibreOffice