Commit Graph
912 Commits
Author SHA1 Message Date
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
Noel Grandin 5505d3bc4d loplugin:constparams
Change-Id: I33c701be5a441c1121b797f1eb5a8bda6fc3f89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-04 11:29:39 +01:00
Arnaud VERSINI 36eeec7eee rust code maker : use constexpr sets and maps
Change-Id: Iffedaf0075abda2c6b1de24dea4c28aa2dd26282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194067
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
Tested-by: Jenkins
2026-02-07 18:53:58 +01:00
Gabor Kelemen 2a9fd078ff Add some customAssumeFilenames to yaml files
After checking all modules with
bin/find-unneeded-includes --finderrors --headers --recursive

these subdirectories seemed to need custom assumes for an
error free run of IWYU

Change-Id: I8e0553355809e49e3ec3d06aa4404e6cd7b72aff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196631
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-12 11:21:38 +01:00
Andrea Gelmini 12904bdf8f Fix typo
Change-Id: I02c7a422dea067658e3cfcba6b363b32c0d197aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196449
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2026-01-04 10:08:40 +01:00
Manish Bera 02f3d7e950 Unittests for pythonmaker
This patch adds the unit and integration test suite for the pythonmaker
tool.

The test is orchestrated by a Python script and uses a "golden file"
comparison method. It runs `pythonmaker` on a comprehensive test IDL
and verifies that the generated `.pyi` output exactly matches a set of
pre-validated reference stubs.

The test is integrated into the build system and runs with 'make check'.

Change-Id: If91814767779812740c543476307600f61c8a656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188456
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-01-02 17:59:12 +01:00
Manish Bera 71b7dbfe36 change the line endings of codemaker/Executable_pythonmaker
Change-Id: I6255366e60c68a3d37a0f3528143009b93b13b03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194049
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-15 08:56:35 +01:00
Rene Engelhard 8985ebd92e fix --enable-rust-uno build after fd2e467ba3320c99d8f4856784c7ccd0912a08a7(?)
as in fd2e467ba3 for netproduce.cxx

/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx: In member function ‘rtl::OString RustProducer::resolveTypedef(std::u16string_view) const’:
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx:1421:43: error: ‘Typedef’ is not a member of ‘codemaker::UnoType::Sort’
 1421 |     if (sort == codemaker::UnoType::Sort::Typedef)
      |                                           ^~~~~~~
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx: In member function ‘bool RustProducer::isUnoInterface(std::u16string_view) const’:
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx:1713:46: error: ‘Interface’ is not a member of ‘codemaker::UnoType::Sort’
 1713 |     return sort == codemaker::UnoType::Sort::Interface;
      |                                              ^~~~~~~~~
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx: In member function ‘bool RustProducer::isUnoStruct(std::u16string_view) const’:
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx:1721:46: error: ‘PlainStruct’ is not a member of ‘codemaker::UnoType::Sort’
 1721 |     return sort == codemaker::UnoType::Sort::PlainStruct;
      |                                              ^~~~~~~~~~~
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx: In member function ‘bool RustProducer::isUnoEnum(std::u16string_view) const’:
/home/rene/LibreOffice/git/master/codemaker/source/rustmaker/rustproduce.cxx:1729:46: error: ‘Enum’ is not a member of ‘codemaker::UnoType::Sort’
 1729 |     return sort == codemaker::UnoType::Sort::Enum;
      |                                              ^~~~

Change-Id: I36c97fcfec14fb075d67aa4e1550dadba7499aa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193621
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
2025-11-08 19:31:30 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
Mike Kaganski 5ab2021005 enable-msvc-analyze: C4310: cast truncates constant value
C:/lo/core/codemaker/source/rustmaker/type_analyzer.cxx(165): warning C4310: cast truncates constant value

Change-Id: I5be672810ff5501c40d98940c328f8e181a06f39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193175
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-30 07:00:24 +01:00
Stephan Bergmann 5429ad357b Fix loplugin warnings in --enable-rust-uno code
...an assortment of loplugin:staticmethods, loplugin:stringadd, and
loplugin:stringviewparam

Change-Id: Iaa62c0162014a31de7d1f910199f241747f2feea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193167
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-10-29 22:37:20 +01:00
Mike Kaganski f706c98e50 Some dtoa removal leftovers
Omission from commit b6feccc9a2
(Replace dtoa with fast_float for faster string-to-float parsing,
2025-09-21).

Change-Id: I7d84f6e94db559d722f4e461aa1efcfd44534538
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191715
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-01 14:53:13 +02:00
Mohamed Ali 86ade63863 Rust Bindings: Use typed parameters instead of void* in UNO bindings
Replace generic void* parameters with proper types (strings, primitives, structs) for better type safety and more idiomatic Rust code.

Change-Id: Iced1c2de96564be7ec599f14bf1a685eaede2768
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191477
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-09-29 09:57:43 +02:00
Mohamed Ali 048761fb22 Rust Bindings: Refactor RustProducer and CppProducer
Change-Id: I3b40c7a7eb572d95b91d1ec8eeda17a971331f67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191476
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-09-29 09:57:35 +02:00
Mike Kaganski b6feccc9a2 Replace dtoa with fast_float for faster string-to-float parsing
fast_float implements C++17 from_chars for floating-point types, which
is still unavailable even in the latest versions of compilers e.g. for
macOS. It is maintained, unlike dtoa; it is said to be adopted as the
from_chars implementation for gcc. It is header-only, which simplifies
many things.

Change-Id: I6b597d4d35a076930e6e35f4f8cff3ca84f48ba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191248
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-09-21 08:17:39 +02:00
Andrea Gelmini 2b44a63884 Fix typo
Change-Id: I3a5ea43f88b080394504336ed864a0b771ac6f73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190875
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2025-09-13 11:22:29 +02:00
Michael Weghorn 257f798461 rustmaker: Avoid string copy (loplugin:stringview)
Address the following clang plugin error seen in an
--enable-rust-uno build:

    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:1016:41: error: rather than copy, pass with a view using subView() [loplugin:stringview]
     1016 |                             && (unoType.copy(unoType.lastIndexOf('.') + 1).startsWith("X")));
          |                                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Icec8b529abf67ca13243da21136d5f296f53b7d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190854
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-09-12 13:57:19 +02:00
Michael Weghorn 5ecb0b6f95 rustmaker: Use more string_view params, address loplugin:unnecessarygetstr
Switch some params from const std::string& to std::string_view
and drop the then unnecessery calls to OString::getStr in
callers.

This fixes the following clang plugin errors seen in an
--enable-rust-uno build:

    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:1070:88: error: unnecessary call to 'getStr' when passing to string constructor [loplugin:unnecessarygetstr]
     1070 |     generateStructSourceBasicFunctions(file, functionPrefix, handleTypeName, className.getStr());
          |                                                                              ~~~~~~~~~~^~~~~~~~
    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:1073:85: error: unnecessary call to 'getStr' when passing to string constructor [loplugin:unnecessarygetstr]
     1073 |     generateStructSourceBaseMembers(file, functionPrefix, handleTypeName, className.getStr(),
          |                                                                           ~~~~~~~~~~^~~~~~~~
    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:1077:87: error: unnecessary call to 'getStr' when passing to string constructor [loplugin:unnecessarygetstr]
     1077 |     generateStructSourceDirectMembers(file, functionPrefix, handleTypeName, className.getStr(),
          |                                                                             ~~~~~~~~~~^~~~~~~~

Change-Id: Ia0ad68dd2dfed3a9b807c284e474ae0f2e42b2b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190853
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-09-12 13:57:10 +02:00
Michael Weghorn 292f5fe5d5 rustmaker: Use string_view params (loplugin:stringviewparam)
Fix clang plugin errors like the following seen in an
--enable-rust-uno build:

    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:207:77: error: replace function parameter of type 'const OString &' with 'std::string_view' [loplugin:stringviewparam]
      207 | void CppProducer::generateCBridgeConstructors(CppFile& file, const OString& className,
          |                                                              ~~~~~~~~~~~~~~~^~~~~~~~~
    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.hxx:177:75: note: previous declaration is here [loplugin:stringviewparam]
      177 |     static void generateCBridgeConstructors(CppFile& file, const OString& className,
          |                                                            ~~~~~~~~~~~~~~~^~~~~~~~~

Change-Id: I5d5fa38d735a63438395848d6038f9d0e8e40401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190852
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-09-12 13:57:03 +02:00
Michael Weghorn cc9c0bac1f rustmaker: Make methods static (loplugin:staticmethods)
Fix clang plugin errors like the following seen in an
--enable-rust-uno build:

    In file included from /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.cxx:10:
    /home/michi/development/git/libreoffice/codemaker/source/rustmaker/cpproduce.hxx:177:10: error: this member function can be declared static [loplugin:staticmethods]
      177 |     void generateCBridgeConstructors(CppFile& file, const OString& className,
          |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      178 |                                      const OString& functionPrefix, const OString& handleTypeName);
          |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I7d2ae9ba71da8a6db73101e177610e9ec0df7616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190850
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-09-12 13:56:56 +02:00
Michael Weghorn 8b513dcebb rustmaker: Make loplugin:simplifyconstruct happy
Fix this clang plugin error seen in an
--enable-rust-uno build:

    .../libreoffice/codemaker/source/rustmaker/cpp_include_manager.cxx:138:17: error: simplify construction, just use 'Foo a(...);' [loplugin:simplifyconstruct]
      138 |     std::string targetTypeStr = std::string(targetType);
          |     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Change-Id: Idf5e672e65e4029686a6c2cd4ca5b9dde7de3e72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190849
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-09-12 13:56:51 +02:00
Michael Weghorn 82df59fa8e rustmaker: Use OString literals (loplugin:ostr)
This fixes clang plugin errors like the following
seen in an --enable-rust-uno build:

    .../libreoffice/codemaker/source/rustmaker/rustproduce.cxx:1063:16: error: use a _ostr user-defined string literal instead of constructing an instance of 'OString' from an ordinary string literal [loplugin:ostr]
     1063 |         return "u8";
          |                ^~~~

Change-Id: I5891641b80b46e19f1ceb401e48b6a8fb0286e58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190848
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-09-12 13:56:29 +02:00
Mohamed Ali d9f05dc007 Rust Bindings: Add rustmaker (Rust codemaker)
The rustmaker provides comprehensive support for converting UNO type definitions into idiomatic Rust code with proper memory safety and type system integration.

Also adds the RustFile, RustOptions, and RustProducer classes to handle
Rust code generation, file management, and command line option parsing
for various UNO type kinds such as enums, structs, and interfaces.

Change-Id: Iaf87af13352c55e81c1745ef7a8f591c3e61e0a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188088
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-09-11 21:38:59 +02:00
Andrea Gelmini 3cc8e28a9b Fix typo
Change-Id: I7b390e9a1a102f0f37eab2459ea8f229bfb58198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190363
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-09-03 08:39:13 +02:00
Caolán McNamara 756adb5751 cid#1665185 silence Untrusted loop bound
like the other "makers" in the module

Change-Id: Idb8a672e422690a09240d4508bbd07d8d9091bea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190443
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-01 09:16:30 +02:00
Manish Bera 2bdf17ee6e Add initial scaffolding for pythonmaker
This commit introduces the 'pythonmaker' executable, a new tool in the
codemaker module.

pythonmaker generates Python type stub files (.pyi) from UNO IDL type
libraries (.rdb files). This enables static type checking and modern
IDE features like auto-completion for developers writing Python scripts for LibreOffice.

This commit includes the complete, feature-complete tool capable of handling all major IDL entity types (enums, constants, typedefs,
structs, exceptions, interfaces, services, and singletons).

Change-Id: I52f783aa982e1de04a207a9a884aee207f99d193
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185498
Tested-by: Jenkins
Tested-by: Hossein   <hossein@libreoffice.org>
Reviewed-by: Hossein   <hossein@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-08-28 15:21:01 +02:00
Manish 8cf9bdbade tdf#158237 Use C++20 contains() instead of find() and end()
Change-Id: I9a17900837330031a906cb3526b624936ec87bd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188790
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-08-08 21:07:16 +02:00
Xisco Fauli 46d43e80e1 codemaker: remove dead test code
Change-Id: I73e81dac5ccce7ee2c1fd204c3769781f6c2f287
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187251
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-07-01 21:20:41 +02:00
Gabor Kelemen e0afd45007 tdf#146619 Run IWYU on codemaker/
Change-Id: I2edd6e4cb4275d5ca79791f6b709c0e8b2b64f71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187142
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-07-01 09:39:25 +02:00
Xisco Fauli 35df2783a5 codemaker: use frozen
Change-Id: I596d7394031631aa3f3ff30816b2c5e07b18356b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187019
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-26 11:47:27 +02:00
Gabor Kelemen a48bb5c25b Remove obsolete fw declarations from canvas/ codemaker/ configmgr/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ife87bf89617d97cee9dd1f25d6e912665e4c33a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183879
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-11 10:53:14 +02:00
Julien Nabet 068fef40d3 Related tdf#162279: rather use OSL_DEBUG_LEVEL instead of NDEBUG
Following Stephan's suggestion.

Change-Id: Iaeb7192129d83471aa0a32e7adb272a14e80ff71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179703
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-01-04 09:30:50 +01:00
Mike Kaganski 91b1153bb7 Move LIBO_USE_SOURCE_LOCATION to o3tl for possible reuse
Change-Id: I045fc1d86576f6017def01a14dd9a091ee35a544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179323
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-25 11:54:49 +01:00
Noel Grandin 5fe9b3df62 loplugin:reftotemp in codemaker..connectivity
Change-Id: I9da2976410f7c4da8ab0d85150fc87f2b3df9e0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-08 17:33:29 +01:00
Caolán McNamara 23d7910c1e cid#1554844 COPY_INSTEAD_OF_MOVE
and

cid#1554878 COPY_INSTEAD_OF_MOVE
cid#1554907 COPY_INSTEAD_OF_MOVE
cid#1555082 COPY_INSTEAD_OF_MOVE
cid#1555224 COPY_INSTEAD_OF_MOVE
cid#1555301 COPY_INSTEAD_OF_MOVE
cid#1555378 COPY_INSTEAD_OF_MOVE
cid#1555395 COPY_INSTEAD_OF_MOVE
cid#1555452 COPY_INSTEAD_OF_MOVE
cid#1555466 COPY_INSTEAD_OF_MOVE
cid#1555514 COPY_INSTEAD_OF_MOVE
cid#1555566 COPY_INSTEAD_OF_MOVE
cid#1555753 COPY_INSTEAD_OF_MOVE
cid#1555782 COPY_INSTEAD_OF_MOVE
cid#1555825 COPY_INSTEAD_OF_MOVE
cid#1555842 COPY_INSTEAD_OF_MOVE
cid#1555891 COPY_INSTEAD_OF_MOVE
cid#1555917 COPY_INSTEAD_OF_MOVE
cid#1555961 COPY_INSTEAD_OF_MOVE
cid#1556021 COPY_INSTEAD_OF_MOVE
cid#1556055 COPY_INSTEAD_OF_MOVE
cid#1556307 COPY_INSTEAD_OF_MOVE
cid#1556349 COPY_INSTEAD_OF_MOVE
cid#1556436 COPY_INSTEAD_OF_MOVE
cid#1556665 COPY_INSTEAD_OF_MOVE
cid#1556696 COPY_INSTEAD_OF_MOVE
cid#1556718 COPY_INSTEAD_OF_MOVE
cid#1556775 COPY_INSTEAD_OF_MOVE
cid#1556835 COPY_INSTEAD_OF_MOVE
cid#1556877 COPY_INSTEAD_OF_MOVE
cid#1556994 COPY_INSTEAD_OF_MOVE
cid#1557010 COPY_INSTEAD_OF_MOVE
cid#1557074 COPY_INSTEAD_OF_MOVE
cid#1557111 COPY_INSTEAD_OF_MOVE
cid#1557142 COPY_INSTEAD_OF_MOVE
cid#1557163 COPY_INSTEAD_OF_MOVE
cid#1557164 COPY_INSTEAD_OF_MOVE
cid#1557214 COPY_INSTEAD_OF_MOVE
cid#1557254 COPY_INSTEAD_OF_MOVE
cid#1557322 COPY_INSTEAD_OF_MOVE
cid#1557327 COPY_INSTEAD_OF_MOVE
cid#1557492 COPY_INSTEAD_OF_MOVE
cid#1557565 COPY_INSTEAD_OF_MOVE
cid#1557663 COPY_INSTEAD_OF_MOVE
cid#1557798 COPY_INSTEAD_OF_MOVE

Change-Id: I2ae9c184dcc18d44a65437e18c49e16b27f4d81d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-14 15:28:24 +02:00
Stephan Bergmann 15492ec2d2 Add "f" suffix to literals of type float
...to avoid

> error CS0266: Cannot implicitly convert type 'double' to 'float'. An explicit conversion exists (are you missing a cast?)

(as would e.g. happen if offapi/org/libreoffice/embindtest/Constants.idl were
included in regular builds)

Change-Id: I6a4d8b151755edd3a8b03d73e2bb546cf1d19e7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174200
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-29 19:05:47 +02:00
Caolán McNamara 08964038e1 cid#1607989 Overflowed constant
and

cid#1607976 Overflowed constant
cid#1607855 Overflowed constant
cid#1607731 Overflowed constant

Change-Id: I18e8ffb8a9b5a55e0ecb71862549a94ff5c2fc1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173781
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-23 09:32:54 +02:00
RMZeroFour c3c7b48fa9 .NET Bindings: Native bridge for .NET
This patch includes all marshalling and proxy handling code on the
.NET side as well as the native side needed for a fully functional
UNO bridge.

It also includes some changes and corrections to net_basetypes and
netmaker needed for the bridge to work properly.

It also includes the FirstUnoContact example in C# as demonstration.

Change-Id: I406932938a4415d24408fb41ddfa7d8eeb5d1f94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170916
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-09-18 08:10:36 +02:00
Caolán McNamara b289d5f5cb cid#1608561 Overflowed constant
Change-Id: I3115263da1c76f635d544e41c3cf96e068b34324
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173543
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-17 17:18:34 +02:00
Mike Kaganski d29d6b49c4 Avoid slicing in operator==
Change-Id: I6f0f1b67dee717d9fa16f4ae9e7b6441d7c5002b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172197
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-22 14:39:05 +02:00
RMZeroFour 641d082c44 .NET Bindings: Fix netmaker and net_basetypes
This commit makes a few misc. fixes to netmaker and net_basetypes
- Renamed css.uno.Exception to css.uno.UnoException to avoid name
  conflicts with System.Exception
- Added a new css.uno.Any constructor and setValue function that
  deduces the type of the any from given object at runtime
- Changed the AnyTests unit tests to match changes made to css.uno.Any
- Removed the in keyword from UNO 'in' parameters. Was a premature
  optimisation that might have a negative effect for certain types.
- Generated struct and exception field members were not marked public
  earlier by accident, fixed.
- Generted struct and exception constructors had parameters in order
  opposite to expected, fixed.
- Generated services tried to instantiate the interface, not the
  service earlier, fixed.

Change-Id: Ia63f9db469db13a5d01617617095b8f568b39c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171706
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-14 13:14:01 +02:00
Julien Nabet 572011827a tdf#162279: Base Forms: details of the warning only on debug mode
As Mike noticed, the pb is more general than just Base forms.
So here's the general fix suggested by Mike (thank you for the help!)

Change-Id: Ic57039c9c37f26d2ea2d0e0bda89f277ba7044cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171337
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-01 11:44:08 +02:00
Caolán McNamara 1eb3b00c82 cid#1608295 silence Untrusted loop bound
Change-Id: I925f4a73118fbf81a48b32a096bdddf194148120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171057
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-26 10:41:43 +02:00
Noel Grandin 1bbcc3fdf3 O[U]String overloads that return view for rest parameter
Add new overloads to OUString methods that have a
"OUString* rest" style parameter.

Instead return a view, which does not require allocation.

To avoid overload ambiguity, split the methods into
different variants that do not use default parameters.

Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-25 13:29:11 +02:00
Gabor Kelemen e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Caolán McNamara 4b3ecc330b cid#1604129 Uninitialized scalar field
Change-Id: Id75a73a8fc4cb06bdc1cbccab8921e1794e13382
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169789
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-01 13:44:14 +02:00
Andrea Gelmini fda1827a74 Fix typo
Change-Id: I517be535c68037fb92a44ed52f59be115fcef129
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169225
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-19 23:00:40 +02:00
RMZeroFour e597e712b6 .NET Bindings: Add netmaker (.NET codemaker)
This commit adds the netmaker executable to the codemaker/ module, to
generate C# code from UNOIDL specifications.

Also adds some Makefiles in the net_ure/ directory to generate code for
udkapi and offapi, to build the net_uretypes and net_oootypes assemblies.

Change-Id: Ifb61fe6a0f8f594eaa6ff95b025ba57f247b0d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168710
Tested-by: Jenkins
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-06-19 09:34:45 +02:00
Caolán McNamara b671bb2ea7 WaE: C6011 Dereferencing NULL pointer warnings
convert OSL_ASSERT to assert

Change-Id: I047b5987734c14e05c9be89db297749c36a0a26f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166922
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 14:48:15 +02:00
Noel Grandin 59ad8d6d15 loplugin:ostr in codemaker,unoidl
Change-Id: I75f5531023f31da029491ce4a078005eebbfe59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166738
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-04-26 19:44:07 +02:00