Note: I am using OOo 2.0 Beta on Windows and Linux.
Some interfaces accept an array as the argument. In two of these interfaces, for example XDatabaseMetaData.getTables(), it is specified that the argument should be NULL in some cases.
http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XDatabaseMetaData.html#getTables
Hi Andrew,
This is a severe error in the specification of XDatabaseMetaData; thanks for spotting it.
<http://udk.openoffice.org/common/man/typesystem.html> should make it quite clear that at the UNO level, no types except interface types know the concept of a null value. (Specific UNO language bindings, like the C++ or Java language binding, may allow null as a value of (their mapping of) other UNO types too, but then have to treat null the same as some legal value of the (mapped) UNO type. For example, in C++, a null rtl::OUString may be equivalent to an empty rtl::OUString, or a null com::sun::star::uno::Sequence<> may be equivalent to an empty com::sun::star::uno::Sequence<>.)
I just filed <http://www.openoffice.org/issues/show_bug.cgi?id=44685> to fix XDatabaseMetaData.getTables and other cases that depend on non-existing null values of non-interface types.
Well, under windows, I simply use Dim oNull As Object oMeta.getTables(oNull, "%", "%", oNull)
And things work as expected... On Linux, however, there is an error when the target argument is an array. The error is "Can not coerce argument type during coreflection". Should I use a different method to pass a NULL, or did I find a bug that exists only on Linux.
Strange that the error only occurs on certain platforms...
I am assuming, a bug, but if this is really a problem on my end, then I should remove the case that I opened...
http://qa.openoffice.org/issues/show_bug.cgi?id=44541
I assume that you should close that issue as invalid, as the OOo BASIC UNO binding probably does not support null as a value of non-interface types (see above; Andreas should know whether this is indeed so), and so "Can not coerce argument type during coreflection" is correct. (If you want to, you could also change the bug into "why does it erroneously work on Windows?")
-Stephan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
