summaryrefslogtreecommitdiff
path: root/unoidl
AgeCommit message (Collapse)Author
2021-10-21loplugin:flattenNoel Grandin
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-15Repurpose regcompare test as unoidl-check testStephan Bergmann
532b47a650ce5189e1fb759201129d7d1f434133 "[ABI CHANGE] In SDK, replace regcompare with unoidl-check" had left "registry/CustomTarget_regcompare_test.mk around to verify that unoidl-check behaves the same as did regcompare on those old-format .urd/.rdb files." Behavior of unoidl-check on those old-format .rdb files will become less relevant with the planned move from the old-format idlc/regmerge toolchain to the new-format unoidl-write toolchain also for the SDK. But there appear to be no unit tests for unoidl-check, so repurpose (and move around) the existing test (switching it from using idlc/regmerge to using unoidl-write). Change-Id: I4c33e9c16aaf0f99e35d9257a40f3bc2ae2725ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121783 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-14Enforce the UNOIDL identifier schemeStephan Bergmann
...which reserves identifiers containing underscores and starting with a lowercase letter for the implementation. That TODO can finally be resolved now after 04af4e4f55f3ef319a78edd4d0109e2e7eba90b6 "[API CHANGE] Fix all bad UNOIDL identifiers across offapi". Change-Id: Id63ba96aa77f8666fbdfa90f7b260af42e6856bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122362 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11loplugin:moveparam in unoidlNoel Grandin
Change-Id: Id3069cad0b118b5593bb7a0faa9d7e33e5bef168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123353 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-21Implement the SourceTreeProvider CursorStephan Bergmann
Change-Id: Ibf54bd1e852ea23fb37c7222625895d240452424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122361 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
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 formatHossein
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-26loplugin:flattenNoel
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
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-23tdf#124176 Use pragma once in u*Vincent LE GARREC
ucb, uno*, uui Change-Id: Ic4b6d541eb0df8bf7bceddf178ebb5177ad2b87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112046 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-16loplugin:referencecasting in UnoControls..unoxmlNoel
Change-Id: I42f216b6115be693a4e57d70f6cbbf11b62ec185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110998 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-12fix fuzzer buildCaolán McNamara
Change-Id: I41df4af812cd225a0bd8e49df9e8b3c322698d28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110825 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11Silence some -Wimplicit-fallthroughStephan Bergmann
("fallthrough annotation in unreachable code") Change-Id: I707451cf7f5215e228763049b9903240de1987cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110747 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05Revert "Fix typo in code"Stephan Bergmann
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba. osl_Pos_Absolut (include/osl/file.h) is part of the stable URE interface; it must not be changed. Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-13loplugin:stringview (macOS)Stephan Bergmann
Change-Id: I5a1ffe6d9c140ea7ec7ca22a4e631b3d2c3579ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107657 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-18tdf#123936 Formatting files in module unoidl with clang-formatPhilipp Hofer
Change-Id: If315a05bcb237dc2922981c0d041b0c0b5d152d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105724 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06Revert "loplugin:stringbuffer"Noel Grandin
This reverts commit f0356b6128bb4e78041d53025ad7c2e0b8e0c299. Reason for revert: There is a OUStringConcat overload for OUStringBuffer which would have kicked in here, so this is unnecessary Change-Id: I3bafb6c30bd3a2c1912daf227554889f1e09c78a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06loplugin:stringbufferNoel
Change-Id: Id6f7268f12eb728dbb255aa19cd590b6813c4f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-31Simplify makefile logic using new gb_notStephan Bergmann
Change-Id: I19cb227a52fe6cd55dbba7b28689c4de995837fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105075 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-10-30unoidl-check: try to come up with a better commentJan-Marek Glogowski
Change-Id: I80958838fd2b2e0b642a79b358f1f94a9b37eceb
2020-10-30Fix unoidl-check build condition for cross buildsJan-Marek Glogowski
$(filter-out ...) is not the same as !$(filter ...). So hopefully this conditional variant is now correct for cross builds. This should fix the missing host unoidl-check for the host ODK needed in the SDK package. Change-Id: I0cbe4da1f5cd3493c9b214d8263e7e9584dc535c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105037 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-10-18tdf#124176: Using pragma oncemariamfahmy
Change-Id: I634d2eebfa71ebdbe6dc334f3bc29e70a06a94ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104461 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-10-04odk: fix Windows Arm64 buildJan-Marek Glogowski
I didn't change odk/util/check.pl to handle the currently missing climaker. I hope this problem will eventually be fixed before anybody really considers developing with LO ODK on Arm64... Change-Id: Icc070bde77e73362646d62401410277a85d3d697 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-18unoidl-read: Avoid redundant redeclarationsStephan Bergmann
...of interfaces for which such a forward declaration has already been emitted. Update the reference rdbs accordingly with LD_LIBRARY_PATH=.../master/instdir/program \ .../master/workdir/LinkTarget/Executable/unoidl-read --published \ .../libreoffice-7.0.0.3/instdir/program/types.rdb \ >.../master/udkapi/type_reference/udkapi.idl LD_LIBRARY_PATH=.../master/instdir/program \ .../master/workdir/LinkTarget/Executable/unoidl-read --published \ .../libreoffice-7.0.0.3/instdir/program/types.rdb \ .../libreoffice-7.0.0.3/instdir/program/types/offapi.rdb \ >.../master/offapi/type_reference/offapi.idl Change-Id: I7448ae44d479a8c622f6f534abe6087ce8a8ea32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100896 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04loplugin:simplifybool a little more aggressiveNoel Grandin
with expressions like !(a && b) Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-10compact namespace in ucb..uuiNoel Grandin
Change-Id: I644d5e418028b4b4e66cf67b20a1155a689acab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-15Revert "loplugin:constfields in unoidl"Noel Grandin
This reverts commit c04a8576f07cb837439959b8bdbb8b620684d508. Change-Id: Iefede980495d9d59ab3fa26e1ccfa85a58a5c206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90520 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-02ofz#20976 build-failureCaolán McNamara
Change-Id: I6fc81e6ef13f77dea410f95e159a932089603aeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89801 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-02Revert "ofz#20976 build-failure"Caolán McNamara
This reverts commit 5b22433d79823372744038c5ae28094bc938fb48. Reason for revert: <INSERT REASONING HERE> Change-Id: I4a104ca86dadbcc7f797df41326d48a53ca1c990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89800 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-02ofz#20976 build-failureCaolán McNamara
Change-Id: I31434d2b979aff20a53b164ffbb3d19247cd1ce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89826 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-03avoid flex-caused warnings about unused functionsLuboš Luňák
Change-Id: If6a028efbf2403fd92dcab914ae3197d34579392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87869 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25tdf#124176: Use pragma once instead of include guardsOnur Yilmaz
Change-Id: I093227c37d9ddb056aaa0c13ec413164dfc6780e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87393 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19OUStringChar must either take a sal_Unicode or an ASCII charStephan Bergmann
...so forbid anything else, to avoid issues like the one described in 766cdd869d7d983e9e171a3eae0629cb9a0206ff "This code wants to add the numeric SvxRotateMode value". Some remaining places that apparently do want to convert some numeric value to sal_Unicode have been augmented with an explicit cast. Change-Id: I6200a84e250e697bc88694bd71142ca1d9a13651 Reviewed-on: https://gerrit.libreoffice.org/81132 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-27Deduplicate O(U)StringNumber definitions; add toAsciiUpperCaseMike Kaganski
Change-Id: I00e7ce62940907b5f4efc2b7f23f355c3e43ed6b Reviewed-on: https://gerrit.libreoffice.org/79686 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-20loplugin:constvars in test..unotoolsNoel Grandin
Change-Id: I087dc53ca5c18893974bbd9d959de56d5a4cdfa0 Reviewed-on: https://gerrit.libreoffice.org/77827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): unoidlStephan Bergmann
Change-Id: I325e5f2d2e13c10c4d7e9110d41e959fca5e098c Reviewed-on: https://gerrit.libreoffice.org/76632 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-26cid#1448388 Assignment of overlapping memoryCaolán McNamara
Change-Id: I9946af03ed5ac6823e610d6c8bf24afae463777e Reviewed-on: https://gerrit.libreoffice.org/76354 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-24cid#1448548 Assignment of overlapping memoryCaolán McNamara
Change-Id: I146abd4635db993a5a0c5e612bb3f6dc23cdfe24 Reviewed-on: https://gerrit.libreoffice.org/76227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>