Commit Graph
1704 Commits
Author SHA1 Message Date
David Rosenfeld 9b06135233 tdf#158068 Use OUString literals in comp_properttysetmixin.cxx
Change-Id: I7133baec0e5c00811d066c5ef04a05407f387da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202947
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-04-04 17:35:11 +02:00
Gabor Kelemen a20e7520c3 Sanity check all IwyuFilter files
This should not complain anymore:

for i in $(ls -1 */*yaml) ; do mod=$(echo "$i" | cut -d '/' -f1 ) ; bin/find-unneeded-includes --sanitycheck "$mod"; done

Change-Id: I5c4b99f5cb58c6f696b127c81edd6d323104cd7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191829
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-14 19:44:19 +02:00
Gabor Kelemen c1cb3276e7 bin/find-unneeded-includes: add exception for URE headers as well
so that these can be removed from per-module yaml files

Change-Id: I8bf8da64b51072ccd926e3555c7c8da89f29e648
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191003
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-09-24 12:09:52 +02:00
Henry Castro 9e86101902 cppuhelper: add 'm_' prefix to OComponentHelper class members
Change-Id: I02a3ce12eb1d02dd28a2eec9beeb9633292975ce
Signed-off-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189882
Tested-by: Jenkins
2025-08-19 13:25:54 +02:00
Gabor Kelemen 953a4159ba tdf#146619 Run IWYU on cppu/ cppuhelper/ cpputools/
Change-Id: Ib3eadf94a382d9eee4fd08c1a914ea27bc75814e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189790
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-08-19 09:47:37 +02:00
Henry Castro b85184f3b8 cppuhelper: Prefix ContextEntry_Init struct members with 'm_'
Change-Id: Ic7b05c322e8f013a1192c9cdfc129d9700c941e6
Signed-off-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189608
Tested-by: Jenkins
2025-08-14 18:58:24 +02:00
Mike Kaganski 3a4961af43 Use o3tl::{get,set}Environment instead of resp. osl_* functions
Simplifies the code, and avoids OUString internals access.
Also replace some getenv calls.

Change-Id: I5f7dc492fe87ea1fbaad6a61bc54e21f0f0c5aef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187974
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-07-17 07:03:19 +02:00
Henry Castro 1b05e253fc cppuhelper: add m_ prefix to OInterfaceIteratorHelper4 for member variable
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I7772c875ea77f942ca55dbe9551df19c2767a5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186044
Tested-by: Jenkins
2025-05-30 16:46:45 +02:00
Stephan Bergmann 887804deb5 New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...warning about non-overriding virtual dtors in final classes.  Every single
one of these might or might not be suspicious (e.g., in some cases it might be
better to have a virtual dtor in a derived-from class).  Also, for some of the
virtual dtors, making them non-virtual then caused

> error: unnecessary user-declared destructor [loplugin:unnecessaryoverride]

so those were removed completely.

Change-Id: If0ee71645a347d6096b65988c56f627c42fe54b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-12 23:11:05 +02:00
Henry Castro 4e1b2f1174 cppuhelper: prefix 'm_' members of the class OFactoryComponentHelper
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I8dbed6d72de45d334e760f3551faa0a3bb7c6fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183274
Tested-by: Jenkins
2025-04-14 17:24:52 +02:00
Mike Kaganski 269b588647 Use osl_getEnvironment instead of getenv
Fix a TODO

Change-Id: I8647b6b90f3fb50180363f8241f27329be426a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183505
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-03-30 15:08:33 +02:00
Mike Kaganski 0166610b95 Use osl_getEnvironment instead of getenv
Avoids conversion to OUString; and is Unicode-safe on Windows.

Change-Id: If4f76f867f988d43ec4dae0a8e09f1390fee42e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183503
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-30 13:49:46 +02:00
Mike Kaganski c2ffb93c72 Deduplicate getTypeEntries in cppuhelper
Also makes sure that the code initializing the struct uses the same
mutex.

There is also a duplicating code in comphelper/source/misc/compbase.cxx;
however, to deduplicate also that, we would need to export the function.

Change-Id: I145ea21d5c20536bab887ad55c69b74e7aeeb239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181865
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-02-22 09:35:16 +01:00
Caolán McNamara 7a283ee554 Resolves: tdf#165295 partial cid#1555986 lock acquisition evasion revert
seeing as getTypeEntries can be reentrant

Change-Id: Ice119e2a48d4912722a35843bd1c5078805249bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181799
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-02-17 22:10:38 +01:00
Caolán McNamara a1a3fd98dc cid#1555986 Check of thread-shared field evades lock acquisition
and

cid#1556190 Check of thread-shared field evades lock acquisition
cid#1555295 Check of thread-shared field evades lock acquisition
cid#1608596 Check of thread-shared field evades lock acquisition
cid#1555236 Check of thread-shared field evades lock acquisition

Double-checked locking pattern

Change-Id: Id5cba26750bbd9c7e0248181f636ff653ada5654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-17 09:34:24 +01:00
Johann bf7ac07c04 tdf#158237: Use C++20 contains() instead of find() and end()
Change-Id: I0528229042aa62d3d99e8dbaad68a86d41cf369a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178659
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-12-27 16:20:47 +01:00
Mike Kaganski 2ef6b7f9db Drop some OTypeCollection uses
Change-Id: Ia1467c44998961f5e0820fb4d0621a4189d49d9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178095
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-08 19:07:31 +01:00
Stephan Bergmann 6c5355d45d Fix Linux cppuhelper_detail_findSofficePath
...so that it looks for the /usr/bin/ symlink with the name with which it is
created by sysui/CustomTarget_share.mk via sysui/desktop/share/create_tree.sh

Change-Id: I46c2bb9d8df936fd5c7bd52bbee86da959d5c6cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176597
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-14 16:11:59 +01:00
Noel Grandin 3f691b4a16 loplugin:reftotemp in cppcanvas..cui
Change-Id: I6c9ded2252462bcdeee6520bb7b7fa1752aa583b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176276
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 17:33:10 +01:00
Caolán McNamara 92f5913aef cid#1556442 COPY_INSTEAD_OF_MOVE
and

cid#1607753 COPY_INSTEAD_OF_MOVE
cid#1554790 COPY_INSTEAD_OF_MOVE
cid#1556463 COPY_INSTEAD_OF_MOVE
cid#1554838 COPY_INSTEAD_OF_MOVE
cid#1556231 COPY_INSTEAD_OF_MOVE
cid#1556878 COPY_INSTEAD_OF_MOVE
cid#1554913 COPY_INSTEAD_OF_MOVE
cid#1558064 COPY_INSTEAD_OF_MOVE
cid#1557043 COPY_INSTEAD_OF_MOVE
cid#1556985 COPY_INSTEAD_OF_MOVE
cid#1556766 COPY_INSTEAD_OF_MOVE
cid#1557351 COPY_INSTEAD_OF_MOVE
cid#1554863 COPY_INSTEAD_OF_MOVE
cid#1556764 COPY_INSTEAD_OF_MOVE
cid#1556279 COPY_INSTEAD_OF_MOVE
cid#1555970 COPY_INSTEAD_OF_MOVE
cid#1556942 COPY_INSTEAD_OF_MOVE
cid#1557964 COPY_INSTEAD_OF_MOVE
cid#1555166 COPY_INSTEAD_OF_MOVE
cid#1556496 COPY_INSTEAD_OF_MOVE
cid#1557175 COPY_INSTEAD_OF_MOVE
cid#1558054 COPY_INSTEAD_OF_MOVE
cid#1557392 COPY_INSTEAD_OF_MOVE
cid#1557850 COPY_INSTEAD_OF_MOVE
cid#1555118 COPY_INSTEAD_OF_MOVE
cid#1557131 COPY_INSTEAD_OF_MOVE
cid#1556614 COPY_INSTEAD_OF_MOVE
cid#1609650 COPY_INSTEAD_OF_MOVE
cid#1555114 COPY_INSTEAD_OF_MOVE
cid#1555241 COPY_INSTEAD_OF_MOVE
cid#1555442 COPY_INSTEAD_OF_MOVE
cid#1556473 COPY_INSTEAD_OF_MOVE
cid#1557654 COPY_INSTEAD_OF_MOVE
cid#1554689 COPY_INSTEAD_OF_MOVE
cid#1556316 COPY_INSTEAD_OF_MOVE
cid#1557929 COPY_INSTEAD_OF_MOVE
cid#1554807 COPY_INSTEAD_OF_MOVE
cid#1554858 COPY_INSTEAD_OF_MOVE
cid#1555103 COPY_INSTEAD_OF_MOVE
cid#1555517 COPY_INSTEAD_OF_MOVE
cid#1556424 COPY_INSTEAD_OF_MOVE
cid#1557252 COPY_INSTEAD_OF_MOVE
cid#1557566 COPY_INSTEAD_OF_MOVE
cid#1608020 COPY_INSTEAD_OF_MOVE
cid#1557742 COPY_INSTEAD_OF_MOVE
cid#1555884 COPY_INSTEAD_OF_MOVE
cid#1554809 COPY_INSTEAD_OF_MOVE
cid#1555336 COPY_INSTEAD_OF_MOVE
cid#1555173 COPY_INSTEAD_OF_MOVE
cid#1556067 COPY_INSTEAD_OF_MOVE
cid#1557040 COPY_INSTEAD_OF_MOVE
cid#1556235 COPY_INSTEAD_OF_MOVE
cid#1557366 COPY_INSTEAD_OF_MOVE
cid#1555910 COPY_INSTEAD_OF_MOVE
cid#1556716 COPY_INSTEAD_OF_MOVE
cid#1558022 COPY_INSTEAD_OF_MOVE
cid#1555769 COPY_INSTEAD_OF_MOVE
cid#1555940 COPY_INSTEAD_OF_MOVE
cid#1557077 COPY_INSTEAD_OF_MOVE
cid#1555270 COPY_INSTEAD_OF_MOVE
cid#1555660 COPY_INSTEAD_OF_MOVE
cid#1556302 COPY_INSTEAD_OF_MOVE
cid#1555678 COPY_INSTEAD_OF_MOVE
cid#1556538 COPY_INSTEAD_OF_MOVE
cid#1557689 COPY_INSTEAD_OF_MOVE
cid#1555009 COPY_INSTEAD_OF_MOVE
cid#1555433 COPY_INSTEAD_OF_MOVE
cid#1555671 COPY_INSTEAD_OF_MOVE
cid#1555255 COPY_INSTEAD_OF_MOVE
cid#1557681 COPY_INSTEAD_OF_MOVE
cid#1557512 COPY_INSTEAD_OF_MOVE
cid#1554958 COPY_INSTEAD_OF_MOVE
cid#1555758 COPY_INSTEAD_OF_MOVE
cid#1555597 COPY_INSTEAD_OF_MOVE
cid#1558040 COPY_INSTEAD_OF_MOVE
cid#1556476 COPY_INSTEAD_OF_MOVE
cid#1557646 COPY_INSTEAD_OF_MOVE
cid#1557950 COPY_INSTEAD_OF_MOVE
cid#1557019 COPY_INSTEAD_OF_MOVE
cid#1557885 COPY_INSTEAD_OF_MOVE
cid#1556402 COPY_INSTEAD_OF_MOVE
cid#1557906 COPY_INSTEAD_OF_MOVE
cid#1556619 COPY_INSTEAD_OF_MOVE
cid#1554683 COPY_INSTEAD_OF_MOVE
cid#1556549 COPY_INSTEAD_OF_MOVE
cid#1554747 COPY_INSTEAD_OF_MOVE
cid#1554929 COPY_INSTEAD_OF_MOVE
cid#1555362 COPY_INSTEAD_OF_MOVE
cid#1557053 COPY_INSTEAD_OF_MOVE
cid#1557891 COPY_INSTEAD_OF_MOVE
cid#1555043 COPY_INSTEAD_OF_MOVE
cid#1555107 COPY_INSTEAD_OF_MOVE
cid#1557203 COPY_INSTEAD_OF_MOVE
cid#1556728 COPY_INSTEAD_OF_MOVE
cid#1557773 COPY_INSTEAD_OF_MOVE
cid#1556845 COPY_INSTEAD_OF_MOVE

Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-06 13:58:54 +01:00
Mike Kaganski ad686b26ce No need to use SAL_THROW_EXTERN_C macro in CXX
Change-Id: I6eb9f0431a9402479a2d90d5b6f68b611d52a9f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175957
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-02 22:16:06 +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 6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara 2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Xisco Fauli d203201261 tdf#163486: PVS: recurring check
V571: Recurring check. The 'if (rEntry.lateInit)' condition was already verified in line 400.
Change-Id: I0a126691213440520bab4b5bd2f2363dfdd57e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175103
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:49:15 +02:00
Caolán McNamara 037efad7b7 cid#1607024 silence Overflowed constant
and

cid#1607900 silence Overflowed constant

Change-Id: I18ef4b6885f872697c272b9fedc6a3e92a0df587
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174492
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-04 20:30:58 +02:00
Noel Grandin f8deb64c3c throw more useful exception from OPropertySetHelper::getPropertyValue
Change-Id: I90e7ab5763bf368cec795a8c39ece17579dd851d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172905
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-09-05 13:51:34 +02:00
Noel Grandin 6ebe316635 tsan: data race
Atomic write of size 4 at 0x7254000f5f08 by thread T38 (mutexes: write M0, write M1, write M2):
0 configmgr::Access::acquireCounting()
1 configmgr::Components::initGlobalBroadcaster(configmgr::Modifications const&, rtl::Reference<configmgr::RootAccess> const&, configmgr::Broadcaster*)
2 configmgr::RootAccess::commitChanges()
3 non-virtual thunk to configmgr::RootAccess::commitChanges()
4 utl::OConfigurationTreeRoot::commit()
5 dbaccess::(anonymous namespace)::DatabaseRegistrations::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&)
6 non-virtual thunk to dbaccess::(anonymous namespace)::DatabaseRegistrations::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&)
7 dbaccess::ODatabaseContext::registerDatabaseLocation(rtl::OUString const&, rtl::OUString const&)
8 dbaccess::ODatabaseContext::registerObject(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
9 non-virtual thunk to dbaccess::ODatabaseContext::registerObject(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
10 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)

Previous read of size 4 at 0x7254000f5f08 by main thread (mutexes: write M3, write M4):
0 cppu::OWeakObject::disposeWeakConnectionPoint()
1 cppu::OWeakObject::release()
2 configmgr::RootAccess::release()
3 non-virtual thunk to configmgr::RootAccess::release()
4 com::sun::star::uno::Reference<com::sun::star::util::XChangesBatch>::~Reference()
5 SvtLinguConfig::~SvtLinguConfig()
6 SwDoc::GetGCIterator()
7 SwDoc::StartGrammarChecking(bool)
8 sw::DocumentTimerManager::GetNextIdleJob()
9 sw::DocumentTimerManager::IsDocIdle()
10 sw::SwDocIdle::UpdateMinPeriod(unsigned long) const
11 Scheduler::CallbackTaskScheduling()

Change-Id: Idaf2707e5902338a873a325228e9c97e646ea768
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172874
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-05 09:58:55 +02:00
Caolán McNamara d7056b1456 cid#1558088 COPY_INSTEAD_OF_MOVE
and

cid#1558080 COPY_INSTEAD_OF_MOVE
cid#1558077 COPY_INSTEAD_OF_MOVE
cid#1558055 COPY_INSTEAD_OF_MOVE
cid#1558043 COPY_INSTEAD_OF_MOVE
cid#1558039 COPY_INSTEAD_OF_MOVE
cid#1558015 COPY_INSTEAD_OF_MOVE
cid#1558014 COPY_INSTEAD_OF_MOVE
cid#1558009 COPY_INSTEAD_OF_MOVE
cid#1558002 COPY_INSTEAD_OF_MOVE
cid#1557998 COPY_INSTEAD_OF_MOVE
cid#1557996 COPY_INSTEAD_OF_MOVE
cid#1557990 COPY_INSTEAD_OF_MOVE
cid#1557986 COPY_INSTEAD_OF_MOVE
cid#1557980 COPY_INSTEAD_OF_MOVE
cid#1557971 COPY_INSTEAD_OF_MOVE
cid#1557968 COPY_INSTEAD_OF_MOVE
cid#1557967 COPY_INSTEAD_OF_MOVE
cid#1557961 COPY_INSTEAD_OF_MOVE
cid#1557959 COPY_INSTEAD_OF_MOVE
cid#1557958 COPY_INSTEAD_OF_MOVE
cid#1557956 COPY_INSTEAD_OF_MOVE
cid#1557953 COPY_INSTEAD_OF_MOVE
cid#1557949 COPY_INSTEAD_OF_MOVE
cid#1557947 COPY_INSTEAD_OF_MOVE
cid#1557940 COPY_INSTEAD_OF_MOVE
cid#1557931 COPY_INSTEAD_OF_MOVE
cid#1557930 COPY_INSTEAD_OF_MOVE
cid#1557915 COPY_INSTEAD_OF_MOVE
cid#1557913 COPY_INSTEAD_OF_MOVE
cid#1557910 COPY_INSTEAD_OF_MOVE
cid#1557886 COPY_INSTEAD_OF_MOVE
cid#1557884 COPY_INSTEAD_OF_MOVE
cid#1557880 COPY_INSTEAD_OF_MOVE
cid#1557875 COPY_INSTEAD_OF_MOVE
cid#1557871 COPY_INSTEAD_OF_MOVE
cid#1557862 COPY_INSTEAD_OF_MOVE
cid#1557847 COPY_INSTEAD_OF_MOVE
cid#1557845 COPY_INSTEAD_OF_MOVE
cid#1557844 COPY_INSTEAD_OF_MOVE
cid#1557843 COPY_INSTEAD_OF_MOVE
cid#1557838 COPY_INSTEAD_OF_MOVE
cid#1557835 COPY_INSTEAD_OF_MOVE
cid#1557834 COPY_INSTEAD_OF_MOVE
cid#1557828 COPY_INSTEAD_OF_MOVE
cid#1557823 COPY_INSTEAD_OF_MOVE
cid#1557817 COPY_INSTEAD_OF_MOVE
cid#1557813 COPY_INSTEAD_OF_MOVE
cid#1557812 COPY_INSTEAD_OF_MOVE

Change-Id: I55d4a920daa2d148683419169eb828325fd3c757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171732
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11 20:14:54 +02:00
Caolán McNamara 329e913b0b cid#1556624 COPY_INSTEAD_OF_MOVE
and

cid#1556622 COPY_INSTEAD_OF_MOVE
cid#1556629 COPY_INSTEAD_OF_MOVE
cid#1556632 COPY_INSTEAD_OF_MOVE
cid#1556634 COPY_INSTEAD_OF_MOVE
cid#1556642 COPY_INSTEAD_OF_MOVE
cid#1556644 COPY_INSTEAD_OF_MOVE
cid#1556663 COPY_INSTEAD_OF_MOVE
cid#1556674 COPY_INSTEAD_OF_MOVE
cid#1556682 COPY_INSTEAD_OF_MOVE
cid#1556683 COPY_INSTEAD_OF_MOVE
cid#1556685 COPY_INSTEAD_OF_MOVE
cid#1556694 COPY_INSTEAD_OF_MOVE
cid#1556708 COPY_INSTEAD_OF_MOVE
cid#1556711 COPY_INSTEAD_OF_MOVE
cid#1556712 COPY_INSTEAD_OF_MOVE
cid#1556714 COPY_INSTEAD_OF_MOVE
cid#1556719 COPY_INSTEAD_OF_MOVE
cid#1556727 COPY_INSTEAD_OF_MOVE
cid#1556744 COPY_INSTEAD_OF_MOVE
cid#1556757 COPY_INSTEAD_OF_MOVE
cid#1556782 COPY_INSTEAD_OF_MOVE
cid#1556784 COPY_INSTEAD_OF_MOVE

Change-Id: I5d5bc884cd7351a81c18b35aaf4e304256242988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171128
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-07-28 18:36:01 +02:00
Stephan Bergmann 875997c896 Properly implement cppu::throwException for Emscripten
...by implementing (for now) just enough of the cpp2uno half of the Wasm UNO
bridge to make it work.  In general, that half suffers from the same issue as
the already-implemented uno2cpp half, namely that Wasm doesn't allow to generate
code on the fly (which, in this case, would be needed to implement the vtable
slot trampoline functions).  So, for now just hard-code the few
vtableSlotFunction_* that are needed by the UNO interfaces for
cppuhelper/source/exc_thrower.cxx.  (A proper fix would probably use the same
approach as for the uno2cpp half, and use something like wasmcallgen to generate
at least all the vtableSlotFunction_* needed for udkapi/offapi upfront.)

The RTTI for the exceptions needs to be unique across the executable for
exception catching to actually work (as it compares exception types by RTTI
address rather than by name).  We thus need to export all the relevant RTTI
symbols (which I hacked into the existing wasmcallgen for now, even if that
makes that executable's name a slight misnomer now), and access them with a new
jsGetExportedSymbol.  (This exporting would also be needed by the "classical"
approach of using dlsym on the main module, cf.
<https://gerrit.libreoffice.org/c/core/+/167187> "WIP: Emscripten: Set up
support for dlsym from main module".  And while that dlsym approach would work,
it is much simpler to just use that jsGetExportedSymbol than to use a dlsym
detour, and thereby avoid all the hassle of -sMAIN_MODULE detailed in the commit
message of that Gerrit change.)

It also turned out that including Emscripten's <cxxabi.h> needs
__USING_WASM_EXCEPTIONS__ to be defined, because it uses that in its declaration
of __cxa_throw.  (The source for setting that define internally in Emscripten is
get_cflags in the emsdk's upstream/emscripten/tools/system_libs.py, which
defines __USING_EMSCRIPTEN_EXCEPTIONS__ for the non-Wasm, Emscripten JS
exception mode, and defines __USING_WASM_EXCEPTIONS__ for
--enable-wasm-exceptions, which we use.  The commit message of
f4ec967599 "Fix redefinion of Emscripten
__cxxabiv1::__cxa_exception" documents my prior confusion of when one or the
other would be defined.)

Change-Id: Id08765ab5b4ce1553dc3a61648324526185cb64c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170246
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-10 12:32:15 +02:00
Caolán McNamara e5aa87aeeb drop requirement for rtl_random_getBytes to have "Pool" arg
Seeing as since:

commit e9531b792d
Date:   Tue Feb 6 14:39:47 2024 +0100

    sal: rtlRandomPool: require OS random device, abort if not present

    Both rtl_random_createPool() and rtl_random_getBytes() first try to get
    random data from the OS, via /dev/urandom or rand_s() (documented to
    call RtlGenRandom(), see [1]).

we don't use the initial arg to rtl_random_getBytes anymore, drop the
requirement to have one. Then simplify our usages of that, and
addtionally deprecate rtl_random_createPool and rtl_random_destroyPool.

Change-Id: I13dcc067714a8a741a4e8f2bfcf2006373f832c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-08 11:29:54 +02:00
Noel Grandin 5edaca5c89 use boost::small_vector in cppuhelper
shaves 5% off startup time

Change-Id: I901e1112727eb7a50f70d1853386e0696fee7e5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167000
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-03 09:00:41 +02:00
Noel Grandin e8fdc8a4ff elide some OUString temporaries
Change-Id: I8364489639c8c02e9670ee597f48d61007244f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166973
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-02 02:51:23 +02:00
Caolán McNamara 6104316fd5 WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: If4f035fef1e13780b6ce14477ccb2bd7b0eab133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166829
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30 18:51:46 +02:00
Mike Kaganski 00e2762c66 Drop uses of css::uno::Sequence::getConstArray in cppuhelper .. cui
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: Ia2b60af973183bbe79656e67b5e37d7efa39a308
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166817
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-29 23:15:40 +02:00
Noel Grandin 60728712f0 loplugin:ostr in cppu,cppuhelper
Change-Id: I15c00d7a87396d07be2d10a0311f308a93e8eec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-04-27 15:11:25 +02:00
Gabor Kelemen b6f5472ea1 tdf#146619 Drop unused 'using namespace' in: cppu/ cppuhelper/
Change-Id: I4658c2a5c780fa5e8dd83381eb9978510973e0a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165511
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-29 21:20:50 +01:00
Noel Grandin 07ead05550 unlock mutex around lok_preload_hook
because it now instantiates some services

Change-Id: Ia4f7c2df9f8dca3334906f0b482853002666ddd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164484
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-07 09:00:00 +01:00
Caolán McNamara ca1c8b4471 we don't need the reg or store libraries for fuzzing
possibly other configations too, but just for fuzzing for the moment

from looking at:
https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_libreoffice/latest
and see what is built but is 0% coverage and uninteresting to be non-0

Change-Id: Ia7afdfc033dd8a705d85c76b246dc5dfb259b063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163311
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-13 17:27:34 +01:00
Mike Kaganski 0fa827dbb2 Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-27 12:43:48 +01:00
Noel Grandin 5f9da6e0ee improve loplugin:cow_wrapper
some stuff was hiding inside templates

Change-Id: I89fd1a926dd6bf96e35a74e5028165acae51c60c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-16 13:20:10 +01: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
Stephan Bergmann 15b86648f0 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cppuhelper
Change-Id: I4c221461c60c5e96b738bb902253984a9b0b312b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158170
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 14:41:21 +02:00
Stephan Bergmann e0c33ec15f loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-07 00:47:20 +02:00
Caolán McNamara d282d73792 cid#1537991 Unchecked return value
Change-Id: I303817f007dd0035e64d15b3f9310a06aab18060
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157396
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-29 14:14:00 +02:00
Paris Oplopoios 81e815edbf tdf#153109 Use any_of instead of loop to check a range
Change-Id: Icf65288a7e53257008129b71e8d716b0b0c7f5fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152868
Tested-by: Paris Oplopoios <parisoplop@gmail.com>
Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-06-12 13:11:07 +02:00
Noel Grandin 89e0a3e05d use WeakComponentImplHelper2 in Bootstrap_MacroExpander
Change-Id: I49f051d9c9da46ec877e4f611836c7a3548f9f10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151581
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-10 08:01:47 +02:00
Noel Grandin 8809b57da9 use WeakComponentImplHelper2 in ServiceManager
Change-Id: I0f141398effbd2673c02f9d1f4378fd4e67af655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151580
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-10 08:01:25 +02:00
Noel Grandin 94aba9289a use WeakComponentImplHelper2 in TypeManager
Change-Id: I2358006a069ea4e8cdeeeafb8384ad8d47fba50a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09 18:15:20 +02:00