office-gobmx/codemaker
Stephan Bergmann c08e5db055 Make check for complete type more explicit
When 485c9d4f0e "Clarify the use of
untools::WeakReference" introduced cppu::detail::isUnoInterfaceType and its use
in the requires-clause of unotools::WeakReference::get, its commit message
argued that while isUnoInterfaceType only works if the given type is complete,
that would already be taken care of via the use of std::is_convertible_v in the
implementation of unotools::WeakReference::get.  But while std::is_convertible_v
nominally requires its argument types to be complete (unless they are void, or
arrays of unknown bound), typical implementations like recent libc++ or
libstdc++ do not seem to enforce that (and just return false in such a case).

So better make isUnoInterfaceType explicitly require that the given type is
complete.  Which turned up one case where it isn't at the point where
unotools::WeakReference<SdrTextObj>::get is called.  (And while the resulting
call to dynamic_cast<SdrTextObj*>(...) in the implementation of that function
would cause an error when SdrTextObj is not complete, compilers happened to
instantiate that template specialization only at the end of the TU, by which
time SdrTextObj happened to be a complete type in the TUs including that
sd/source/ui/inc/futext.hxx.  So all happened to work out OK.)

Change-Id: I704b8b437fa836e290245d1727e4d356128ef63c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143667
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-05 21:59:45 +00:00
..
source Make check for complete type more explicit 2022-12-05 21:59:45 +00:00
test/javamaker Drop obsolete preprocessor directives from UNOIDL files 2022-06-13 16:27:45 +02:00
Executable_cppumaker.mk fix fuzzer build 2021-02-12 21:21:09 +01:00
Executable_javamaker.mk fix fuzzer build 2021-02-12 21:21:09 +01:00
Makefile
Module_codemaker.mk
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00
StaticLibrary_codemaker.mk
StaticLibrary_codemaker_cpp.mk
StaticLibrary_codemaker_java.mk

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
  • the codemaker for .NET is in module cli_ure

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.