30 Commits
Author SHA1 Message Date
RMZeroFour b4289da0b4 .NET Bindings: Ported examples for Native bridge
This patch include the following SDK examples ported to .NET
to test the new Native bridge:
- FirstLoadComponent
- HelloTextTableShape
- PathSettings
- PathSubstitution
- TerminationTest
- WriterDemo

The examples include VB.NET and F# as well to test support for
non-C# .NET languages.

Change-Id: I044df4777c7c091241d5b4284f4b6ee6c5de74f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172778
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-09-18 08:11:26 +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 074714fab8 .NET Bindings: Create nuget package for LO SDK
This patch includes:
1. CustomTarget to build and place the LibreOffice.Bindings NuGet
   package in <sdk>/dotnet/
2. net_bridge (.NET library) to declare bootstrap() on the C# side,
   and net_bootstrap (C++ library) to wrap bootstrap() on the native side
3. Changes to LO SDK scripts to find .NET SDK and DOTNET_ROOT on the
   users machine

Change-Id: Ia29ae56a2ad0f808f1563ef6167a3bd7c476642e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170172
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-09-18 08:08:31 +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
RMZeroFour e8a8d32fb3 .NET Bindings: Add DotnetTest class to gbuild
This commit adds the DotnetTest gbuild class to build a unit test
suite using the .NET SDK and the NUnit testing framework.

Also adds a DotnetTest target for the net_ure module, with unit tests
for the Any type, as well as some minor changes to the Any type that
came about when writing the test cases.

Change-Id: Idbc08ac8f0736dd7355092dd1e69a5f1b4137c4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168956
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-03 12:07:11 +02:00
RMZeroFour eca8414763 .NET Bindings: Move built .NET libraries into instdir
This commit adds Package targets for the net_basetypes, net_uretypes
and net_oootypes libraries to install them into instdir/program/dotnet.
Also adds a LIBO_SHARE_DOTNET_FOLDER variable mirroring the
LIBO_SHARE_JAVA_FOLDER variable.

Change-Id: I28cdb2dac799bd72d11c3e550bba1a946db8b49c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170098
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-03 11:28:46 +02:00
RMZeroFour 2ddeef9ff5 .NET Bindings: Improve DotnetLibrary gbuild class
This commit rewrites the DotnetLibrary gbuild class to build a .NET
library. Logic for handling various .NET languages is now consolidated,
while earlier there were separate functions for each language. Usage
has been made much more similar to the Jar gbuild class.

The CustomTargets used to build net_uretypes and net_oootypes have
also been reworked, and a function has been added to DotnetLibrary
to consume sources generated by a custom target, for cleaner usage.

Change-Id: Ie494b2547d30c43f9bb0aedeac4d140f1f3a830b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170168
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-03 11:08:57 +02:00
RMZeroFour 5f4083ffa9 .NET Bindings: Upgrade --enable-dotnet to --with-dotnet
This commit changes the existing --enable-dotnet switch into
--with-dotnet, allowing users to pass in a different dotnet
executable than the one on their PATH, similar to --with-java.
This is used to determine the variables DOTNET and DOTNET_ROOT.

Change-Id: Ia4f02dfdbd33d7629a800a076f758b26bb186d9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169656
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-08-03 10:31:11 +02:00
RMZeroFour 5aeb53c4b0 tdf#137525 Update ColumnValueSet (and others) to use push/pop
This patch updates the ColumnValueSet and some other parts of the
drawing code to use the Push/Pop functions of RenderContext.

Change-Id: I3fbdee9afa167facb45242bc8bad9a35758b3c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165587
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2024-07-17 15:01:12 +02:00
RMZeroFour dd13569254 .NET Bindings: Remove absolute path check in DotnetLibrary
This commit removes the gb_DotnetLibrary__ensure_absolute gbuild
function that was breaking out-of-source directory builds.

Code using that function was changed to accept already absolute paths
as arguments.

Change-Id: I6d9d3dac33e296cf0e69910f16564d822047857e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-27 18:18:49 +02:00
RMZeroFour 4031659233 .NET Bindings: Switch for old windows CLI bindings
This commit adds an --enable-cli/--disable-cli switch to autoconf to
control generation of the old CLI bindings (Windows only). It is
enabled by default, to not be a breaking change to users just yet.
Over time, when the old bindings are deprecated in favor of the new
.NET bindings, it could be set to disabled by default.

Change-Id: Ib60b372459cb0c735275ed17d004d037279357eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168751
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-06-22 00:11:16 +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
RMZeroFour 6538b3b09c .NET Bindings: Add DotnetLibrary class to gbuild
This commit adds the DotnetLibrary gbuild class to build a .NET assembly
using the .NET SDK.

Also adds an option to enable or disable building .NET components with
--enable-dotnet (default) and --disable-dotnet to the autogen script.

Also adds a net_ure/ directory for the updated .NET bindings, currently
consisting of the net_basetypes library.

Change-Id: I9256387a2463ff8476deee85d886c6b3dce8257b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166380
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-06-12 18:48:07 +02:00
RMZeroFour 32eaef8ddb tdf#143123 Port Java clipboard examples to Python
This commit ports the Clipboard example from
odk/examples/DevelopersGuide/OfficeDev/ to Python.

The original Java example code was moved to a java/ subdirectory, and
the new Python code was added to the python/ subdirectory. Necessary
changes were made in the corresponding Makefiles.

Along with the sample code in Clipboard.java, the ClipboardListener,
ClipboardOwner and TextTransferable classes were ported.

Change-Id: Ic3a48023cfc78b770ae64adb2aee2b4d0bcefaff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165225
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-06-05 01:45:19 +02:00
RMZeroFour 21d7936b32 tdf#143123 Port Java PathSubstitution example to Python
This commit ports the PathSubstitution example in
odk/examples/DevelopersGuide/OfficeDev/ to Python.

The original Java example code was moved to a java/ subdirectory, and
the new Python code was added to the python/ subdirectory. Necessary
changes were made in the corresponding Makefiles.

The example can be run with: ./instdir/program/python \
./odk/examples/DevelopersGuide/OfficeDev/PathSubstitution/\
python/path_substitution_test.py

Change-Id: I6c7a8af86cee2dc9cb5384e42bd9644847f28767
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166264
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2024-06-04 15:16:38 +02:00
RMZeroFour c299e54ce2 tdf#143122 Port Java TerminationTest example to C++
This patch ports odk/examples/DevelopersGuide/OfficeDev/TerminationTest
example to C++.

The original Java example code was moved to a java/ subdirectory, and
the new C++ code was added to the cxx/ subdirectory. Necessary changes
were made in the corresponding Makefiles.

Along with the code in TerminationTest.java, the TerminateListener
class was also ported and used in the same C++ file.

Change-Id: I889b8893740bc8f80cdd9aa9925e83cadcea9592
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165916
Tested-by: Jenkins
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-30 15:01:19 +02:00
RMZeroFour 68c04836ab tdf#160084 Simplify comparing with zero when using fTools
As part of the efforts in #160084 to simplify parts of the codebase
by replacing basegfx::fTools::more/less calls with direct comparisions
against zero, this commit performs the changes in a few files in the
drawinglayer/ module.

PS-2: Fix wrong identifier, courtesy of an accidental backspace press...

Change-Id: I52a183dda5ae11989f8ffc8b26ff16ac77d6ebb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165600
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-18 15:19:33 +02:00
RMZeroFour 804caab067 tdf#146266 Move WeakBag test to gbuild system
As part of the efforts in tdf#146266 to move parts of the codebase from
the older makefile.mk build system to the newer gbuild system, this
commit migrates the WeakBag test, and cleans it up a little.

The test can now be invoked using this command:

$ make CppunitTest_comphelper_weakbag

Change-Id: I4ac3771fa23e28abd38a2dab84cacd1ae57fb70f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165591
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-12 16:50:31 +02:00
RMZeroFour e64a1dfc36 Fix typo in HelloTextTableShape makefile
The HelloTextTableShape example, which was recently ported to C++,
has a small typo in line #64 of the Makefile. It gives the user the
command to run the example, but it was missing an 'e' at the end.

Change-Id: I29af45f21ff78dbda42e5bd9e25e44f06536f7c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165915
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-09 22:21:44 +02:00
RMZeroFour afb18ac062 tdf#50998 tdf#87892 Add sinusoid shape
In response to #50998 (as well as #87892 indirectly),
regarding adding sinusoidal and coil-like shapes to the
shape gallery in LibreOffice, this commit adds a sinusoid
shape to the gallery.

The shape is still incomplete for release, at least lacking
icons for the sidebar. Further details posted on the Bugzilla
thread for issue #50998.

PS-2: Removed the previously added flag shape.
PS-4: Moved sinusoid to the end in a new subgroup.

Change-Id: Ie0f6e3948b6dce98dc2b4f87289cfd37f2d16911
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165353
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-04-08 09:54:55 +02:00
RMZeroFour 45d951492a tdf#147906 Use std::hypot for Pythagorean distance
As part of the efforts in tdf#147906 to replace expressions like
sqrt(a^2 + b^2) with std::hypot(a, b), to eliminate overflow
errors, this commit performs the changes in certain files.

This also changes the B3DVector::normalize and B2DVector::normalize
methods to have similar behaviour.

Change-Id: I142585cfa594849f06cd06517ad9d40430df2ade
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165555
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-05 13:59:33 +02:00
RMZeroFour 03c9875b87 tdf#145538 Use range based for loops
As part of the efforts in tdf#145538 to replace regular for
loops with range-based for loops in the codebase where suitable,
this commit does so in SvxNumOptionsTabPage::PageCreated.

PS-2: Renamed a variable.

Change-Id: I7ec813a3c6fead3246137a2841c9f3e80f5adc63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165594
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-02 21:14:12 +02:00
RMZeroFour 6817c668cd tdf#147021 Replace SAL_N_ELEMENTS with std::size
As part of the efforts in #145538 to replace the SAL_N_ELEMENTS()
macro with std::size() and std::ssize(), this commit performs the
necessary changes for a few files in the filter/ module.

PS-2: Replace an std::size call with sizeof, and one with std::ssize

Change-Id: Icac6470cdff762f828651153d0abc5f40b8e5d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165592
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-02 10:38:58 +02:00
RMZeroFour 599b113b73 tdf#42982 Add error messages to thrown exceptions
As part of the efforts in #42982 to improve the UNO API
error reporting, this commit adds error messages in several
files to help improve debugging experience.

Change-Id: I7a51d4fd1e3a57798d70bc3464b034649948a287
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165253
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-03-30 13:32:16 +01:00
RMZeroFour 74299624ec tdf#158237 Use contains instead of find-end
As part of the efforts in #158237 to replace older parts of
the codebase using find() and end() methods, with contains(),
this commit does the needed changes for a few files in the
sc and sw modulues.

Change-Id: Ibf0a432c537879f5bec8e8912d11150733366689
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165223
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-03-26 08:20:02 +01:00
RMZeroFour 6227fccce4 tdf#157665 Use <=> operator for errcode and strong_int
As part of the efforts in #157665 concerning the spaceship operator
for the C++20 codebase upgrade, this commit implements the spaceship
operator, replacing redundant operator overloads, in strong_int.hxx
and errcode.hxx

Change-Id: I23985207c27d6a5147c3f7b4a0d2416f86dec5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165219
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-25 13:51:21 +01:00
RMZeroFour e7eae3aa6e tdf#158067 Replace OUStringLiteral with _ustr
As part of the efforts in #158067 to replace static constexpr
OUStringLiteral variables with string literals of the form
u""_ustr, this commit performs the replacements in some files
of the xmloff module.

Change-Id: Icce2ed7f9a69ef023aaff498975d6afabf161d4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165200
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-23 20:49:49 +01:00
RMZeroFour 64a55911ea tdf#157664 Drop redundant operator != in basegfx module
As part of the efforts in #157664 to remove redundant definitions of
operator!=, to upgrade the codebase to C++20, this commit removes the
remaining definitions in the basegfx module.

Change-Id: I19f2b9ddf42185435313445c8395a851030e2149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165199
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-03-23 11:17:06 +01:00
RMZeroFour c845b7db95 tdf#143148 Replace include guards with pragma once in sc module
As part of the efforts in #143148 to replace include guards in
the codebase with #pragma once, this performs the changes for
the remaining files in the sc module.

Change-Id: Ia5633919e4159da94b6e663fa484ef0524cf7bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165196
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-03-23 10:02:44 +01:00
RMZeroFour db3b31c433 tdf#145614 Convert GCM_PROPERTY_ID #defines to enum
As part of the efforts in #145614 to replace older parts of the
codebase using #defined constants with enums, this turns the
GCM_PROPERTY_ID_* values into an unscoped enum.

Change-Id: Iafb9960b87fcd12f6596578866856fabed8ecd04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164942
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-03-18 09:52:28 +01:00