735 Commits
Author SHA1 Message Date
Andrea Gelmini 941c112903 Fix typos
Change-Id: I700c7fa85163b18dd310772997bb64f06ad95163
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210059
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 10:48:21 +02:00
Andrea Gelmini 25d7c86a5c Fix typos
Change-Id: Iaac84391d5cf654166739b22b9e6f1c30e9c567e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209924
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:28:07 +02:00
Andrea Gelmini a5040952ce Fix typos
Change-Id: I0e8c119f9a70ed1217ba576f5d6dda24c1580b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209923
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:07:12 +02:00
Mike Kaganski b0390a4d1b Drop unohelper.absolutize, and use uno.absolutize to avoid duplication
Change-Id: I9e3b10c5c9b0a0ef1af66c99732bb217d37c3851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194073
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-16 19:10:57 +01:00
Caolán McNamara 7841de4bf7 drop outdated coverity directives
Change-Id: Icbe3f0bb9433cfcf08efd28bc4eab1ba82efab74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-18 12:40:58 +02:00
Xisco Fauli fae0b4a9eb testtools: remove dead test code
Change-Id: I3943e2b9ef0ce4919e85a6086c646dc9316bb9e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187252
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-07-02 00:54:05 +02:00
Bogdan Buzea dab2cde420 tdf#158803 Remove unused import
Change-Id: Ie653bb412882eb903ec3980dabcab7b249bd9e94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186199
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-10 08:58:16 +02:00
Mike Kaganski 56f3dbffdf Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08 05:34:20 +01:00
Caolán McNamara 0c6e26890a cid#1556875 COPY_INSTEAD_OF_MOVE
and

cid#1556891 COPY_INSTEAD_OF_MOVE
cid#1556903 COPY_INSTEAD_OF_MOVE
cid#1556917 COPY_INSTEAD_OF_MOVE
cid#1556925 COPY_INSTEAD_OF_MOVE
cid#1557021 COPY_INSTEAD_OF_MOVE
cid#1557092 COPY_INSTEAD_OF_MOVE
cid#1557119 COPY_INSTEAD_OF_MOVE
cid#1557218 COPY_INSTEAD_OF_MOVE
cid#1557342 COPY_INSTEAD_OF_MOVE
cid#1557727 COPY_INSTEAD_OF_MOVE
cid#1557800 COPY_INSTEAD_OF_MOVE
cid#1557821 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE
cid#1557677 COPY_INSTEAD_OF_MOVE
cid#1557674 COPY_INSTEAD_OF_MOVE

Change-Id: I20dab0c49a17c28b4feaf97440a36d4962310b29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175686
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-26 21:54:56 +02:00
Caolán McNamara 22df7aee96 cid#1608417 silence deliberate documented Infinite loop
see: testtools/README.md
Change-Id: Ie32624cc7c9262aff5666bc43b828158f0777259
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-06 15:30:51 +02:00
Ilmari Lauhakangas 129e69f005 testtools, wizards, xmlsecurity: fix issues found by Ruff linter
Change-Id: I03edbaa7c9a643ca7503fa0e93c2bf0de3ac4e51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171211
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-29 16:56:57 +02:00
Ilmari Lauhakangas d7628892b0 testtools, uitest, unotest: fix issues found by Ruff linter
Change-Id: I4a848b0f1f114d1262b5242786e088eb50a33cef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171145
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-07-29 10:34:57 +02:00
Ilmari Lauhakangas 64021a1039 PyUNO bridgetest: adapt to alias removals in unittest module and
fix syntax errors

Change-Id: I7e853ba25fd0b541ea7d2770335810b2d9dcb207
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170399
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-12 15:18:35 +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
Christian Lohmaier e56a8300d3 use gb_StaticLibrary_WORKDIR and gb_Library_DLLDIR more consistently
same for gb_Executable_BINDIR[_FOR_BUILD] and fold
gb_Library_WORKDIR_FOR_BUILD into gb_Library_DLLDIR_FOR_BUILD (the
latter also has a workdir variant)

Change-Id: If7e4cf9aab46728182c89344546065bc33b452b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169201
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-06-19 20:00:39 +02:00
Noel Grandin d573e2ae17 loplugin:ostr in various
Change-Id: I9f399b3752da9df930e0647536ffcd4e82beb1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-20 22:09:56 +02:00
Christian Lohmaier 0c4c84a14b makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo

The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.

Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-03 16:06:14 +02:00
Mike Kaganski ea93670372 Drop some uses of css::uno::Sequence::getConstArray ...
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-04-30 06:20:50 +02:00
Caolán McNamara 283aa103b9 cid#1545177 COPY_INSTEAD_OF_MOVE
and

cid#1545179 COPY_INSTEAD_OF_MOVE
cid#1545187 COPY_INSTEAD_OF_MOVE
cid#1545188 COPY_INSTEAD_OF_MOVE
cid#1545189 COPY_INSTEAD_OF_MOVE
cid#1545196 COPY_INSTEAD_OF_MOVE
cid#1545197 COPY_INSTEAD_OF_MOVE
cid#1545204 COPY_INSTEAD_OF_MOVE
cid#1545223 COPY_INSTEAD_OF_MOVE
cid#1545236 COPY_INSTEAD_OF_MOVE
cid#1545239 COPY_INSTEAD_OF_MOVE
cid#1545253 COPY_INSTEAD_OF_MOVE
cid#1545274 COPY_INSTEAD_OF_MOVE
cid#1545286 COPY_INSTEAD_OF_MOVE
cid#1545309 COPY_INSTEAD_OF_MOVE
cid#1545311 COPY_INSTEAD_OF_MOVE
cid#1545345 COPY_INSTEAD_OF_MOVE
cid#1545358 COPY_INSTEAD_OF_MOVE
cid#1545361 COPY_INSTEAD_OF_MOVE
cid#1545365 COPY_INSTEAD_OF_MOVE
cid#1545367 COPY_INSTEAD_OF_MOVE
cid#1545372 COPY_INSTEAD_OF_MOVE
cid#1545373 COPY_INSTEAD_OF_MOVE
cid#1545377 COPY_INSTEAD_OF_MOVE
cid#1545392 COPY_INSTEAD_OF_MOVE
cid#1545399 COPY_INSTEAD_OF_MOVE
cid#1545404 COPY_INSTEAD_OF_MOVE
cid#1545408 COPY_INSTEAD_OF_MOVE
cid#1545430 COPY_INSTEAD_OF_MOVE
cid#1545439 COPY_INSTEAD_OF_MOVE
cid#1545449 COPY_INSTEAD_OF_MOVE

Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10 17:41:18 +01:00
Noel Grandin 00e1ac51e6 'new Character' is deprecated in Java
replace with Character.valueOf

Change-Id: I9938db0fce6490eba6f4900efc3c139a1b71d120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158786
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02 14:47:25 +01:00
Noel Grandin 41d9584179 'new Double' is deprecated in Java
replace with Double.valueOf

Change-Id: If5be8e500e31ebf9d5fb20ea7dd474677d7c74ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158785
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02 12:00:34 +01:00
Noel Grandin cb982f1479 'new Float' is deprecated in Java
replace with Float.valueOf

Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-02 12:00:24 +01:00
Stephan Bergmann e7cf25437e Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testtools
Change-Id: Idc0de002b7ca4e370add311f91576adaaf354764
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158243
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 16:13:38 +02:00
Mike Kaganski 176e8cf09a Use exception ctors, instead of setting members later
Avoids overwriting source location in message

Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-14 15:37:17 +02:00
Mike Kaganski 42a5f14edc Use getXWeak in testtools
Change-Id: Iee8f1314fc3d924376b5b6ad6c683c7d451ab900
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150876
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-27 20:14:56 +02:00
Caolán McNamara 7c15ffd4e3 Related: rhbz#2136459 use a value which is exactly representable as a float
20 builds in a row with the old value all succeeded for me on F38 anyway,
so if the problem still exists this almost certainly doesn't do anything.
But it's nice for debugging to use something that is printed the same by a debugger as seen in the source.

also see: tdf#125978

Change-Id: I42dc5f18c22acc006bffb57578bacb65dbc16013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143116
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 21:04:33 +00:00
Arnaud VERSINI 555f433318 use std::this_thread::sleep_for instead of osl equivalent
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-09 08:37:35 +00:00
Stephan Bergmann ef53355355 Rudimentary support for dynamic_cast on UNO proxy objects
<https://gerrit.libreoffice.org/c/core/+/144139> "New loplugin:unocast" had
argued that uses of dynamic_cast from a UNO interface type are broken in general
(because if the source object is a proxy from the C*+ UNO bridge, its vtable's
RTTI slot will normally not be set up, which can cause a crash), and should be
replaced with uses of XUnoTunnel.  Which the various recent "loplugin:unocast
(...)" commits started to do.  However, it became clear that that is not the
most ideal way forward:  For one, getting more and more implementations of
XUnoTunnel::getSomething into existing class hierarchies is error prone, as each
such implementation must manually delegate to all its base class
implementations.  For another, uses of comphelper::getFromUnoTunnel (which often
needs to do a queryInterface to XUnoTunnel first) are easily more expensive than
uses of dynamic_cast.

Thanks to Noel, the insight here is that for the use case of a dynamic_cast from
a UNO interface type to a local C++ class type, and if the source object is a
proxy, it is sufficient that the dynamic_cast will not crash.  It will
necessarily always return null (as the proxy will never be the implementation of
a local C++ class type), so it is sufficient to fill the RTTI slots of the
proxies' vtables with dummy values.  That avoids having to set up proper RTTI
for those potentially multiple-inheritance proxy types.  (And with this in
place, all those recent "loplugin:unocast (...)" commits can be reverted again
in a next step.)

I verified the changes for the gcc3_linux_aarch64 (on macOS), gcc3_linux_intel,
gcc3_linux_x86-64, gcc3_macosx_x86-64, msvc_win32_intel, and msvc_win32_x86-64
bridges.  The changes for all the other bridges were done blindly.

(For gcc3_linux_x86-64, which already conditionally supported proper RTTI for
UBSan, setting the offset-to-top slot to non-zero had to be made conditional
too, as the dummy ProxyRtti will always pretend to be a full class rather than a
potential base class that could have a non-zero offset-to-top value.  For
msvc_win32_*, it turned out that the existing code to set up dummy XInterface
RTTI (which was there for reasons lost to history) was broken.)

Change-Id: Iec4b8067d26b14b6fb02c2fdd15e1eee20919590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145038
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-04 13:49:58 +00:00
Stephan Bergmann 2eab74ab78 Missing test dependencies
Change-Id: I048e5bf58c98c7597c229996a29eb7d53451c495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144990
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-04 07:54:07 +00:00
Stephan Bergmann 32c845cb43 Move manual bridgetest_inprocess_java to automatic CustomTarget_uno_test check
Change-Id: I38ae06444adba4eb924a19291f466548ec11b024
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144984
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-03 11:57:27 +00:00
Noel Grandin 1743d74e87 clang-tidy modernize-pass-by-value in various
Change-Id: Ie091b22bd77d4e1fbff46545bc86c12f1dbafcfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138171
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-13 19:11:49 +02:00
Stephan Bergmann 5687eba49f Drop obsolete preprocessor directives from UNOIDL files
...which were used by ildc, which is gone since
a8485d558f "[API CHANGE] Remove deprecated idlc
and regmerge from the SDK", and have always been ignored as legacy by its
unoidl-write replacement.

This change has been carried out (making use of GNU sed extensions) with

> for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl

which apparently happened to do the work.  (The final two files are not UNOIDL
source files.)

Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-13 16:27:45 +02:00
Stephan Bergmann 82b9af26a6 Just use Any ctor instead of makeAny in testtools
Change-Id: Ib895b2269805656a23a93c7e794e097a712bd401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03 20:02:54 +02:00
Noel Grandin ddef1e2c01 add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03 09:12:32 +02:00
Gabor Kelemen 52ef78f492 Recheck modules t* with IWYU
See tdf#42949 for motivation

Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132369
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-02 23:32:08 +02:00
Kunal Pawar 49746f40b0 tdf#145759 Use symbolic constants instead of magic numerical constants
1.4142... -> M_SQRT2
0.4142... -> M_SQRT2 - 1
3.1415... -> M_PI
2.7182... -> M_E

Change-Id: If5b19aa38d9902b1a4b717f89f18bdf2f73a47cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129745
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-02-15 21:00:18 +01:00
Stephan Bergmann db3a61cd95 Generally determine Rdb content from gb_*_set_componentfile calls
...instead of by listing the content somewhat redundantly in the Rdb_*.mk
files, to avoid duplication of logic for components that are only built
conditionally (and thus should only be included conditionally in the
corresponding Rdb).  To achieve that, add an "rdb" parameter to
gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros
that internally call gb_ComponentTarget_ComponentTarget), which is used to make
the appropriate gb_Rdb_add_component call internally from within
gb_ComponentTarget_ComponentTarget.  (As a special case,
gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that
has already been done by the corresponding gb_Library_set_componentfile call, so
allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to
support that special case.)

Most Rdb_*.mk files are thus mostly empty now.  One exception is
i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as
needed during the build in CustomTarget_i18npool/localedata.

1c9a40299d "gbuild: create services.rdb from built
components" had already tried to do something similar (in addition to other
things) under a new --enable-services-rdb-from-build option.  However, that
approach had four drawbacks that this approach here addresses (and which thus
partly reverts 1c9a40299d):

1  Rdb_services shall not contain the component files of all libraries that are
built.  While that commit filtered out the component files that go into
Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files
that go into others like Rdb_postgresql-sdbc
(connectivity/Rdb_postgresql-sdbc.mk).

2  The code added by that commit to Makefile.gbuild codified the knowledge that
there is an Rdb_services, which is brittle.

3  The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge
(for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle.

4  Introducing an --enable-services-rdb-from-build option needlessly provided
two different ways how the content of Rdb_services is assembled.

The changes done here would leave --enable-services-rdb-from-build as a
misnomer, as it no longer controls how Rdb_services is assembled.  I thus
renamed it to --enable-customtarget-components, as that is apparently what it
still does now.

Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-10 08:14:24 +01:00
Caolán McNamara 9871789e0f coverity: annotate with markup so they will stay silenced
Change-Id: I8ac0ae4cd64d8171eebd98d89d1fe954280987b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12 09:36:29 +01:00
Noel Grandin 9444c925b2 new loplugin:stringliteraldefine
look for
   #define FOO "foo"
that can be converted into OUStringLiteral.

This is the first pass of this plugin, only doing those #define which
are local to a single compilation unit.

Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10 19:10:31 +01:00
Mike Kaganski e25be4fb3a Prepare for removal of non-const operator[] from Sequence in testtools
Change-Id: If67f845a0350766c7d098a399bd2fae6048c9100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124400
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-03 06:29:37 +01:00
Stephan Bergmann 04117f78f2 Fix UNOIDL identifiers that started with lowercase and contained underlines
...which are reserved in UNOIDL (though unoidl-write does not enforce that for
now, see the TODO in unoidl/source/sourceprovider-scanner.l, and idlc only
warned about it with an explicit -cid option)

Change-Id: I529f385e9c263d2dab9baf3b99f0208457da04c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121346
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-31 11:02:37 +02:00
Stephan Bergmann d5a100f594 tdf#143450: Special integre+fp struct return case needs a fix too, of course
...similar to ca344be7aa "tdf#143450: Fix special
fp+integer struct return case for gcc_*_x86-64"

Change-Id: Ia8110d632a1c5f328822c434efc5b09bd53ec9e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119883
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-02 18:21:30 +02:00
Stephan Bergmann ca344be7aa tdf#143450: Fix special fp+integer struct return case for gcc_*_x86-64
For one, the loop in x86_64::fill_struct was backwards.

And for another, privateSnippedExecutor does not need special handling of FLOAT
and DOUBLE return values (they can simply be moved to %xmm0, as covered by the
general case), but rather for those small structs where floating-point member(s)
in a first eightbyte (targeting %xmm0) are followed by integer member(s) in a
second eightbyte (targeting %rax).  Extended testtools to cover two such cases.

Change-Id: I8e775a1d1ce2312610f265bcc8e40b09bdac56df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119576
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-28 13:08:07 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Hossein ea5641baee Updated README.md files to represent current code / use Markdown format
Previously, all of the README files have been renamed to README.md
and now, the contents of these files were changed to use Markdown
format. Other than format inconsistency, some README.md files lacked
information about modules, or were out of date. By using LibreOffice
/ OpenOffice wiki and other documentation websites, these files were
updated. Now every README.md file has a title, and some description.
The top-level README.md file is changed to add links to the modules.
The result of processing the Markdown format README.md files can be
seen at: https://docs.libreoffice.org/

Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07 17:47:16 +02:00
Hossein c16158772d Using .md extension/Markdown syntax for modules README
Renaming all README files for all top level modules to README.md,
applying no content change at this stage to be able to track history
of the files. These files should be edited to use correct Markdown
syntax later.

Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-24 11:46:14 +01:00
Caolán McNamara ac396f2f6b fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09 13:01:49 +01:00
Stephan Bergmann a3d0091d18 New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.

(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)

Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26 14:51:15 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Tor Lillqvist 76fc34baeb Make bridgetest exercise parameter passing in the C++/UNO bridge harder
The C++/UNO bridge for macOS on arm64 currently uses the Linux code.
Apple's ABI uses slightly different parameter passing on the stack,
though. See
https://developer.apple.com/documentation/xcode/writing_arm64_code_for_apple_platforms?language=objc

That has not been taken into account yet in the bridge code. The
bridgetest, when run on macOS on arm64, didn't notice, sadly, but
succeeded. With this change it crashes, as one would expect it to do.

Add one more byte and short parameter to the setValues(), setValues2()
and getValues() calls in the XBridgeTestBase interface. The stack
allocation for those [in] parameters to setValues() differ between the
Linux and Apple ABIs. Add corresponding attributes to the interface,
and members to the SimpleTest struct.

The changes to the source files in the cli subdirectory (C++/CLI,
VB.NET, and C#) are done blindly as they aren't compiled even on
Windows currently. Most likely the changes to them are incomplete and
erroneous.

Change-Id: I6f689a130d89b23cad9918829107d7da49a79c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105770
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-11-13 20:01:08 +01:00