Files
odfstudio/codemaker
Neil Roberts 112e72dea2 netmaker: Fix generating a service constructor with a rest argument
When a rest argument is used in an IDL, it was previously just
generating a single Any argument for the constructor and then trying to
pass that directly to createInstanceWithArgumentsAndContext. That
doesn’t compile because that method requires an array of Anys for the
arguments parameter. Instead this patch makes it generate “params Any[]
rest” which seems to be the .NET way to do variadic arguments.

I don’t think there are any LibreOffice services using constructors with
rest parameters and presumably no one is using it outside of LO with
.NET because it wouldn’t compile, so hopefully this patch has little
risk. Fixing it enables us to use rest parameters in a future unit test
for pyuno.

Change-Id: I7dbf96f945011db546374ae1d6cf904a5bd262ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-04 13:52:42 +01:00
..
2026-01-04 10:08:40 +01:00
2025-06-26 11:47:27 +02:00
…
2026-01-02 17:59:12 +01:00

Language Code Generators for UNOIDL Entities

Generators for language-binding--specific representations of UNOIDL entities:

  • cppumaker generates header (.hdl and .hpp) files for the C++ UNO language binding
  • javamaker generates class files for the JVM language binding
  • netmaker generates C# code files for the .NET language binding
  • climaker (the old codemaker for .NET Framework) is in module cli_ure
  • pythonmaker generates Python stub (pyi) files for the Python UNO language binding

Some of the code is re-used by the skeletonmakers in module unodevtools.

Note the different terminology used by cppumaker vs. gbuild for the three variants that can be generated by cppumaker for some of the inline functions:

cppumaker switch: -L;    cpputype.cxx: light;          gbuild: normal;
cppumaker switch: none;  cpputype.cxx: normal;         gbuild: bootstrap;
cppumaker switch: -C;    cpputype.cxx: comprehensive;  gbuild: comprehensive;

which can be a source of confusion.