GSoC Weekly Update: LUA UNO Language binding in LibreOffice
Venetia R Furtado
venetiarosita at gmail.com
Sat Jul 6 01:08:10 UTC 2024
Hello,
Last week I had worked on adding support for TypeClass_SEQUENCE but with
some hard-coded elements to handle the struct within the Sequence in the
function constructAny. contructAny is used to build the input parameter
data structures that are passed to the UNO invoke call.
As a continuation of that work, this week, I added support for
TypeClass_STRUCT and other types (TypeClass_ENUM and TypeClass_ANY) and
recursively call constructAny to build the structures within the sequence.
With Stephan's help, for converting a UNO struct from LUA to C++
generically, I used the css.reflection.CoreReflection UNO service and used
its forName to get a css.reflection.XIdlClass to represent the relevant UNO
struct type. I used the XIdlClass's createObject to create an instance of
the struct type, and used its getFields to get access to all its fields and
then used 'set' to fill its value with whatever LUA value was recursively
translated using constructAny.
My next step is to figure out how to find the type of an arbitrary struct.
Regards,
Venetia Furtado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240705/73663f4f/attachment.htm>
More information about the LibreOffice
mailing list