summaryrefslogtreecommitdiff
path: root/testtools
AgeCommit message (Collapse)AuthorFilesLines
2024-07-29testtools, wizards, xmlsecurity: fix issues found by Ruff linterIlmari Lauhakangas2-5/+5
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-29testtools, uitest, unotest: fix issues found by Ruff linterIlmari Lauhakangas2-30/+30
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-12PyUNO bridgetest: adapt to alias removals in unittest module andIlmari Lauhakangas3-140/+140
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-06-22.NET Bindings: Switch for old windows CLI bindingsRMZeroFour1-0/+2
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-19use gb_StaticLibrary_WORKDIR and gb_Library_DLLDIR more consistentlyChristian Lohmaier2-4/+4
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-05-20loplugin:ostr in variousNoel Grandin4-46/+46
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-03makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)Christian Lohmaier4-4/+4
…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-04-30Drop some uses of css::uno::Sequence::getConstArray ...Mike Kaganski1-3/+1
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (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
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara1-4/+5
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-11-02'new Character' is deprecated in JavaNoel Grandin1-20/+20
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'new Double' is deprecated in JavaNoel Grandin1-2/+2
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'new Float' is deprecated in JavaNoel Grandin1-2/+2
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-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testtoolsStephan Bergmann3-8/+8
Change-Id: Idc0de002b7ca4e370add311f91576adaaf354764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158243 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski2-13/+9
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-05-27Use getXWeak in testtoolsMike Kaganski2-4/+3
Change-Id: Iee8f1314fc3d924376b5b6ad6c683c7d451ab900 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150876 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-20Related: rhbz#2136459 use a value which is exactly representable as a floatCaolán McNamara4-16/+16
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-09use std::this_thread::sleep_for instead of osl equivalentArnaud VERSINI1-1/+2
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-04Rudimentary support for dynamic_cast on UNO proxy objectsStephan Bergmann1-0/+4
<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-04Missing test dependenciesStephan Bergmann1-1/+7
Change-Id: I048e5bf58c98c7597c229996a29eb7d53451c495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144990 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-03Move manual bridgetest_inprocess_java to automatic CustomTarget_uno_test checkStephan Bergmann2-19/+11
Change-Id: I38ae06444adba4eb924a19291f466548ec11b024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144984 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-13clang-tidy modernize-pass-by-value in variousNoel Grandin1-1/+2
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-06-13Drop obsolete preprocessor directives from UNOIDL filesStephan Bergmann8-56/+0
...which were used by ildc, which is gone since a8485d558fab53291e2530fd9a1be581c1628deb "[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-05-03Just use Any ctor instead of makeAny in testtoolsStephan Bergmann2-5/+5
Change-Id: Ib895b2269805656a23a93c7e794e097a712bd401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin2-2/+4
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-04-02Recheck modules t* with IWYUGabor Kelemen8-13/+17
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-02-15tdf#145759 Use symbolic constants instead of magic numerical constantsKunal Pawar2-8/+11
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>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann5-16/+4
...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. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "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 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 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-11-12coverity: annotate with markup so they will stay silencedCaolán McNamara1-0/+1
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-10new loplugin:stringliteraldefineNoel Grandin2-7/+7
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-03Prepare for removal of non-const operator[] from Sequence in testtoolsMike Kaganski2-118/+109
Change-Id: If67f845a0350766c7d098a399bd2fae6048c9100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124400 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-31Fix UNOIDL identifiers that started with lowercase and contained underlinesStephan Bergmann5-24/+24
...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-02tdf#143450: Special integre+fp struct return case needs a fix too, of courseStephan Bergmann5-0/+20
...similar to ca344be7aabf88dddde38841e6af6292ece6829b "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-07-28tdf#143450: Fix special fp+integer struct return case for gcc_*_x86-64Stephan Bergmann5-0/+48
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-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann1-2/+2
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-16/+17
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-03-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
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-01-09fix coverity parse errorsCaolán McNamara1-2/+2
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann1-2/+2
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-11Adapt the remaining OUString functions to std string_viewStephan Bergmann2-3/+6
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "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-11-13Make bridgetest exercise parameter passing in the C++/UNO bridge harderTor Lillqvist8-27/+209
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-12Cosmetic change to make it easier to see which parameter is the nthTor Lillqvist8-170/+479
Consequently put each parameter/argument on a separate line for the get/setValues methods. Will make it easier to add more parameters of such types and at such positions that they catch errors in the C++/UNO bridge on more platforms (specifically, the one for macOS on Apple Silicon). Change-Id: I68578d0401358317f3baf913ef4d53009c8f5f2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105633 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-10-16fix some *printf which are using "%l" ie. long specifiersNoel1-1/+1
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-02Fix typo in codeAndrea Gelmini3-6/+6
It passed "make check" on Linux Change-Id: I58e196515614aad309c9df8784b08fa86415549d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101783 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-14loplugin:simplifybool moreNoel Grandin1-2/+3
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: testtoolsStephan Bergmann1-2/+2
Change-Id: I14913564c7dbb453a761b5e37fec4f9eb331417d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97705 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05Upcoming loplugin:elidestringvar: testtoolsStephan Bergmann1-3/+2
Change-Id: I097ecd5c781b35dc792f613a2f5be19919c3f1cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95581 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-18use std::experimental::source_location in uno::ExceptionNoel Grandin1-3/+3
Clang and gcc have moved this out of experimental and into std::source_location, but only in their very latest releases. Change-Id: I9d9d9155788ee4240455ac4628b298dface4ad24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93868 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10compact namespace in testtools..toolkitNoel Grandin3-5/+5
Change-Id: Iae1a7d3e2f14ee98ad486b4423208d2c29039346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-06Move all public Java classes to libreoffice.jarSamuel Mehrbrodt1-2/+5
This moves the classes from juh.jar and ridl.jar to libreoffice.jar The goal is to have one single jar (and Java module, will be added later) which developers can include to work with LO. juh.jar and ridl.jar are kept as basically empty jars with libreoffice.jar on its classpath to keep backwards compatibility. This is a continuation of ae855bf48163ff64d94cfc34aff8e37abdb5518d and a preparation to have Java 9 module support. Change-Id: Ifbbfb97f60373d14256e62ae3122913bd17d5bbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91930 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann1-0/+1
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>