office-gobmx/offapi
Stephan Bergmann 1c81f63e91 Embind: Consistently represent empty interface references as JS null
The existing code had two issues:  For one, e.g. calling a function that
returned a null interface reference mapped that to JS null, while querying an
object for a non-supported interface via `new css.uno.X...(y)` mapped that to
an "empty" JS object instead.  (So checking for a non-null reference needed to
be done as either `x !=== null` or as `x.is()`, depending on context.)  And for
another, while calling $is() on a non-"empty" object worked fine, it failed on
such an "empty" object (as the Embind internals of that object lacked the $$
property).

So change the querying mechanism from the `new css.uno.X...(y)` constructor to a
`css.uno.X....query(y)` function call syntax, which now returns JS null when
querying for a non-supported interface.  (And drop the broken $is method.)

Change-Id: I8fa488ab2892423f2a461d9b72db47e1d4df3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166255
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:20:59 +02:00
..
com/sun/star tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type 2024-04-11 10:20:41 +02:00
org Embind: Consistently represent empty interface references as JS null 2024-04-19 21:20:59 +02:00
type_reference Update the reference rdbs to libreoffice-24.2.0.3 2024-03-01 07:47:26 +01:00
Makefile
Module_offapi.mk Get rid of UnoApiMerge_types 2013-04-24 09:17:05 +02:00
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00
UnoApi_offapi.mk Move org.libreoffice.embindtest from udkapi to offapi 2024-04-11 15:22:40 +02:00

LibreOffice API IDL Files Except UDK API

Contains all of the IDL files except those in udkapi.

i.e. the interfaces that are specific to the LibreOffice application. An artificial (?) separation.

The reference offapi/type_reference/offapi.idl and udkapi/type_reference/udkapi.idl (formerly combined into a single offapi/type_reference/types.rdb) are used to detect inadvertent incompatible changes. They are plain-text .idl files (not strictly lexicographically sorted, though, so they satisfy the .idl file requirements for no forward dependencies), so in cases where we deliberately /do/ become incompatible they can be modified manually.

Old such cases of deliberately becoming incompatible are listed in offapi/type_reference/typelibrary_history.txt, newer such cases are recorded in the git logs of (now superseded) offapi/type_reference/types.rdb, offapi/type_reference/offapi.rdb, and udkapi/type_reference/udkapi.rdb, new such cases are recorded in the git logs of offapi/type_reference/offapi.idl and udkapi/type_reference/udkapi.idl.