15 Commits
Author SHA1 Message Date
Stephan Bergmann 727d62727e Fix --with-latest-c++ build against libstdc++ 16
(e.g., libstdc++-devel-16.1.1-2.fc44.x86_64) after
f320d95d89ecc9bea81182795969f83b05ec903c "Avoid deprecated
std::filesystem::path::string",

> In file included from engine/codemaker/source/netmaker/netproduce.cxx:19:
> engine/codemaker/source/netmaker/csharpfile.hxx: In member function ‘std::string CSharpFile::getPath() const’:
> engine/codemaker/source/netmaker/csharpfile.hxx:31:27: error: ‘const class std::filesystem::__cxx11::path’ has no member named ‘display_string’
>    31 |         return m_filePath.display_string();
>       |                           ^~~~~~~~~~~~~~

etc.

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ib51f9e0d0e1f902726f0d68a11fe28110388ef6a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6554
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 63e9ab3b87cc5a793c8733e375dc86d99419a88d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208277
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-21 00:09:20 +02:00
Stephan Bergmann 0e2ad911d9 Avoid deprecated std::filesystem::path::string
...and std::filesystem::path::generic_string, which at least GCC 17 trunk
libstdc++ now flags for C++26 (--with-latest-c++) as

> In file included from engine/codemaker/source/netmaker/netproduce.cxx:19:
> engine/codemaker/source/netmaker/csharpfile.hxx:28:53: error: 'string' is deprecated: use 'display_string' or 'native_encoded_string' instead [-Werror,-Wdeprecated-declarations]
>    28 |     std::string getPath() const { return m_filePath.string(); }
>       |                                                     ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/fs_path.h:465:5: note: 'string' has been explicitly marked deprecated here
>   465 |     _GLIBCXX26_DEPRECATED_SUGGEST("display_string' or 'native_encoded_string")
>       |     ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/x86_64-pc-linux-gnu/bits/c++config.h:160:45: note: expanded from macro '_GLIBCXX26_DEPRECATED_SUGGEST'
>   160 | # define _GLIBCXX26_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
>       |                                             ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/x86_64-pc-linux-gnu/bits/c++config.h:112:19: note: expanded from macro '_GLIBCXX_DEPRECATED_SUGGEST'
>   112 |   __attribute__ ((__deprecated__ ("use '" ALT "' instead")))
>       |                   ^

since
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=341ad729c2c93b9f01854913b0404e4fc8958512>
"libstdc++: Add (generic_)display_string and (generic_)native_encoded_string to
filesystem::path".

Occurrences that are obviously meant for display purposes are #if-conditionally
replaced with the new display_string, while all other occurrences are left using
the (non-deprecated) [generic_]string<char> template instantiation, matching the
original code.  (Where, for C++26, the latter could also be replaced with the
new [generic_]native_encoded_string, aka [generic_]system_encoded_string; see
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2319r5.html>
"Prevent path presentation problems" and
<https://cplusplus.github.io/LWG/issue4512> "The system_encoded_string() and
generic_system_encoded_string() member functions of std::filesystem::path are
misnamed" for details.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Change-Id: I7c79c8522608550bb1e0f4cb8e4824480952446b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3987
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit f320d95d89ecc9bea81182795969f83b05ec903c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206226
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-09 09:52:05 +02:00
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
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
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
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
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
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
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
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