summaryrefslogtreecommitdiff
path: root/cppuhelper/source
AgeCommit message (Collapse)AuthorFilesLines
2022-05-09osl::Mutex->std::mutex in cppuhelper::ServiceManagerNoel Grandin2-8/+8
Change-Id: I2d30fb3c81e791eb554780b5abf4923a33cc884e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06Remove duplicated includesAndrea Gelmini1-1/+0
Change-Id: I137707aaad44ffe42bb4b234a59ff69e4b2ecaa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133884 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-05-05use more o3tl::getTokenNoel Grandin2-1/+2
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05use more string_viewNoel Grandin2-7/+8
found by examining the call sites of OString::getToken which means I needed to add a new o3tl::equalsAscii function Change-Id: I7dc0ea1cf5ce8090a708d44f2cf7c938fa200c5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in cppuhelperStephan Bergmann2-56/+56
Change-Id: I296f297060f10e09639da837df44cc9d30cc594b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133832 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26Use o3tl::make_unsigned in some placesStephan Bergmann1-1/+2
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26revert unnecessary changeNoel Grandin1-3/+3
from commit 25ada1e520b50247aa27fdbb6f1ab35e678c7ef9 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Apr 21 13:59:07 2022 +0200 use more string_view in cppuhelper Change-Id: Ie5bd9226dca0f222edd0798b8b478054eda5162c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133430 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26Drop obsolete workaround for LanguageTool 1.7Gabor Kelemen1-18/+0
Upstream patch for this issue was integrated for LT 1.8: https://sourceforge.net/p/languagetool/bugs/105/ some 10 years ago. It should be safe to drop this workaround now that LT 1.7 was dropped from core. Change-Id: I4ffec2247bcb6445cfcdb1c19018bdddec712c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133357 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-22fix master after string_view patches..Noel Grandin1-2/+2
crossed paths Change-Id: I066b357dc10e2109658194b3b3682b7083ebbbbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133322 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22use more string_view in cppuhelperNoel Grandin7-44/+47
Change-Id: I846a1201b1b4fb8ca694a0b78b7d4cc2973dfbd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133258 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-22address review comments on "use more string in unoidl.."Noel Grandin2-3/+3
on commit 2d9291b9433c9645b0870525211f74bfb1151555 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Apr 21 12:53:15 2022 +0200 use more string_view in unoidl,codemaker Primarily reverting the findEntity call-chain to use OUString instead of std::u16string_view. Change-Id: Ib01b9473c859bba3791563df753823bbf0a87ce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-21android: Use fake exceptions on all architecturesMichael Weghorn1-4/+2
This was previously only used for aarch64, and the workaround does not seem to be necessary in current Android versions on other architectures. However, while it's e.g. not needed on an x86 AVD with API level 21 (Android 5), at least my x86 AVD with API level 16 (Android 4.1), which is currently our `minSdkVersion`, fails otherwise when trying to open any document with the below in the ADB log. With this (and all the previous fixes for low API/SDK levels) in place, opening a document in Android Viewer finally succeeds there. > F/libc ( 3288): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 3310 (Thread-122) > I/stderr ( 3288): terminating with uncaught exception of type com::sun::star::ucb::InteractiveAugmentedIOException > I/stderr ( 3288): assertion "terminating with uncaught exception of type com::sun::star::ucb::InteractiveAugmentedIOException" failed: file "/usr/local/google/buildbot/src/android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp", line 73, function "abort_message" > I/DEBUG ( 1173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** > I/DEBUG ( 1173): Build fingerprint: 'generic_x86/sdk_x86/generic_x86:4.1.2/MASTER/eng.wdu.20191218.182616:eng/test-keys' > I/DEBUG ( 1173): pid: 3288, tid: 3310, name: Thread-122 >>> org.libreoffice <<< > I/DEBUG ( 1173): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad > I/DEBUG ( 1173): eax 00000000 ebx b76c9f4c ecx 00000000 edx b76cbfd4 > I/DEBUG ( 1173): esi b65ed000 edi 788c7d6c > I/DEBUG ( 1173): xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b > I/DEBUG ( 1173): eip b7661c03 ebp 788c7d88 esp 788c7d40 flags 00210246 > I/DEBUG ( 1173): > I/DEBUG ( 1173): backtrace: > I/DEBUG ( 1173): #00 pc 00021c03 /system/lib/libc.so (abort+131) > I/DEBUG ( 1173): #01 pc 00030ff1 /system/lib/libc.so > I/DEBUG ( 1173): #02 pc 0e137175 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #03 pc 0e1372f5 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #04 pc 0e133d0a /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #05 pc 0e13323f /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #06 pc 0e133194 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #07 pc 0d369737 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #08 pc 0d3673b0 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #09 pc 0d366a7b /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #10 pc 0d377a25 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #11 pc 09a2b944 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #12 pc 098826da /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #13 pc 098cc47c /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #14 pc 098ded29 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #15 pc 098bb839 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #16 pc 098b7e23 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #17 pc 098bb8cf /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #18 pc 0987a677 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #19 pc 0987b7c7 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #20 pc 0987ab4b /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #21 pc 0987a9a7 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #22 pc 0987f90b /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #23 pc 0986d4ff /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #24 pc 09872298 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #25 pc 035625cf /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #26 pc 0355dff2 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #27 pc 035713f9 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #28 pc 03570d3b /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #29 pc 035714b8 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #30 pc 09a5fb66 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #31 pc 09a5f984 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): > I/DEBUG ( 1173): stack: > I/DEBUG ( 1173): 788c7d00 b76cca48 > I/DEBUG ( 1173): 788c7d04 b76ca208 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d08 b76699eb /system/lib/libc.so (_fwalk+11) > I/DEBUG ( 1173): 788c7d0c b76c9f4c /system/lib/libc.so > I/DEBUG ( 1173): 788c7d10 00000000 > I/DEBUG ( 1173): 788c7d14 00000000 > I/DEBUG ( 1173): 788c7d18 00000000 > I/DEBUG ( 1173): 788c7d1c 00000000 > I/DEBUG ( 1173): 788c7d20 00000000 > I/DEBUG ( 1173): 788c7d24 00000000 > I/DEBUG ( 1173): 788c7d28 00000000 > I/DEBUG ( 1173): 788c7d2c 00000000 > I/DEBUG ( 1173): 788c7d30 00000000 > I/DEBUG ( 1173): 788c7d34 00000000 > I/DEBUG ( 1173): 788c7d38 00000000 > I/DEBUG ( 1173): 788c7d3c 00000000 > I/DEBUG ( 1173): #00 788c7d40 00000002 > I/DEBUG ( 1173): 788c7d44 788c7d6c [stack:3310] > I/DEBUG ( 1173): 788c7d48 00000000 > I/DEBUG ( 1173): 788c7d4c 00000115 > I/DEBUG ( 1173): 788c7d50 0000007f > I/DEBUG ( 1173): 788c7d54 b76c9f4c /system/lib/libc.so > I/DEBUG ( 1173): 788c7d58 788c7d98 [stack:3310] > I/DEBUG ( 1173): 788c7d5c b76c9f4c /system/lib/libc.so > I/DEBUG ( 1173): 788c7d60 b76ca208 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d64 788c7e04 [stack:3310] > I/DEBUG ( 1173): 788c7d68 788c7d88 [stack:3310] > I/DEBUG ( 1173): 788c7d6c fffffbdf > I/DEBUG ( 1173): 788c7d70 b76ca208 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d74 b76b3b24 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d78 b7661b8e /system/lib/libc.so (abort+14) > I/DEBUG ( 1173): 788c7d7c b76c9f4c /system/lib/libc.so > I/DEBUG ( 1173): ........ ........ > I/DEBUG ( 1173): #01 788c7d90 b76ca208 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d94 b76b3b24 /system/lib/libc.so > I/DEBUG ( 1173): 788c7d98 b9b98fc0 [heap] > I/DEBUG ( 1173): 788c7d9c 8723cac3 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7da0 00000049 > I/DEBUG ( 1173): 788c7da4 8723cb39 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7da8 b766b6fe /system/lib/libc.so (vasprintf+14) > I/DEBUG ( 1173): 788c7dac 8d73b830 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7db0 b7670fa9 /system/lib/libc.so (__assert2+9) > I/DEBUG ( 1173): 788c7db4 8d73b830 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7db8 788c7df8 [stack:3310] > I/DEBUG ( 1173): 788c7dbc 86a0d175 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): #02 788c7dc0 8723cac3 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7dc4 00000049 > I/DEBUG ( 1173): 788c7dc8 8723cb39 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7dcc b9b98fc0 [heap] > I/DEBUG ( 1173): 788c7dd0 b9b98fc0 [heap] > I/DEBUG ( 1173): 788c7dd4 788c7e04 [stack:3310] > I/DEBUG ( 1173): 788c7dd8 788c7e04 [stack:3310] > I/DEBUG ( 1173): 788c7ddc 86a09960 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7de0 00000014 > I/DEBUG ( 1173): 788c7de4 86a09980 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7de8 788c7e38 [stack:3310] > I/DEBUG ( 1173): 788c7dec 788c7e1c [stack:3310] > I/DEBUG ( 1173): 788c7df0 b9b1c480 [heap] > I/DEBUG ( 1173): 788c7df4 8d73b830 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): 788c7df8 788c8238 [stack:3310] > I/DEBUG ( 1173): 788c7dfc 86a0d2f5 /data/data/org.libreoffice/lib/liblo-native-code.so > I/DEBUG ( 1173): > I/DEBUG ( 1173): memory map around fault addr deadbaad: > I/DEBUG ( 1173): bfa03000-bfa24000 [stack] > I/DEBUG ( 1173): (no map for address) > I/DEBUG ( 1173): (no map above) > D/Zygote ( 1176): Process 3288 terminated by signal (11) Change-Id: I0bc6d13b1217959c5e447e7c6126006b561639a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133264 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-21use more string_view in unoidl,codemakerNoel Grandin2-3/+3
Change-Id: Ibc0624a662c98ef1308a3bb0c7c082935a89a25c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133252 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13use more string_view in cppuNoel Grandin2-5/+5
Change-Id: Ifd2ee4827e0083ffaff9120fee239fb16553380e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132957 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin4-6/+8
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11-Werror,-Wstrict-prototypes (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I72e35f51eb607662608ccaf944bec64ed422cef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132835 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-10-Werror,-Wstrict-prototypesStephan Bergmann1-1/+1
Change-Id: I7b3d6f5a19020191e7add5ed21666d84e54744a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132760 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-18Simplify a static array iterationMike Kaganski1-25/+20
Change-Id: I7dc4fdcbbaef08c1bc3b23403cd13e2c23585f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131733 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28address review comments for "Add XWeak constructor..."Noel Grandin2-20/+9
for commit 27352b81638f2f1e792ab48ec532eaacf6f61718 (origin/master, origin/HEAD) Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Feb 21 16:00:52 2022 +0200 Add XWeak constructor and operator= to uno::WeakReference I accidentally created a new gerrit change for this, and thus managed to miss sorting out various review comments. (*) Fix version number in gcc3.map (*) Narrow the interface (i.e. assume non-null parameter) in WeakReferenceHelper (*) Remove cargo-cult catch and OSL_ASSERT in WeakReferenceHelper (*) Remove accidental indentation Change-Id: I8d1b22dd42216e9293959032d92df65405fb054c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130349 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22Add XWeak constructor and operator= to uno::WeakReferenceNoel Grandin2-0/+53
which is faster since we can skip the UNO_QUERY. Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-28WASM set correct path to FS image unorcJan-Marek Glogowski1-1/+1
Guess in all the fixing when upstreaming all the WASM changes, that hunk got lost. This actually makes the WASM build run, not just compile. Change-Id: Ided621af284e62961eb47957d74b31871a30a2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129105 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-19WASM UNO: add a minimal dummy bridgeThorsten Behrens2-7/+14
... and use the same fake exception rethrowing code then the mobile platforms. Change-Id: Ic90de1cfd1e0092d6064d041a613d60d9f5f76b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128596 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-19WASM setup as non-multiuser, desktop buildJan-Marek Glogowski1-0/+2
Change-Id: I2ee6e006554cf1e5e5e42c2f4f73d8788bff8f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128585 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen1-1/+0
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-13Adapt commentStephan Bergmann1-7/+2
...to 76e04aef4b4adea8179d564b158e58f495ed43a4 "Rename LO-specific uno ini-file (Linux: program/unorc) to 'louno'". (And yes, the original comment guessed right: it is the URE uno ini-file that we look for here.) Change-Id: I3006a5169ae066b984e415d17841f69db338b68b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128325 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-04Drop MSVC special-casing for OWeakObject ctorMike Kaganski1-10/+0
It was introduced in commit 0c38ca4412531adafdb9cbac9dfa7f6f8e0d9882 author Daniel Boelzle <dbo@openoffice.org> date Mon Nov 18 08:59:15 2002 +0000 #104560# outlining of msvc mapfile symbols cppuhelper/source/msvc_win32_intel.map was dropped in commit b222aa8fff63c803781703e72366ca203f3e6a76 author Matúš Kukan <matus.kukan@gmail.com> date Tue Aug 23 15:03:09 2011 +0200 cppuhelper: convert to gbuild The symbol '??0OWeakObject@cppu@@QEAA@XZ' is still exported from cppuhelper3MSC.dll (checked using dumpbin, that number and names of exported symbols are the same), thanks to the CPPUHELPER_DLLPUBLIC macro at the class, that expands to __declspec(dllexport) [1], [2]. Hence, this patch is expected to not cause an ABI change. [1] https://docs.microsoft.com/en-us/cpp/cpp/dllexport-dllimport [2] https://docs.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-declspec-dllexport Change-Id: I895c350970f0e4e0adc1ba90f60925f8d4ba3941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127471 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-21loplugin:flatten in canvas..cuiNoel Grandin1-31/+32
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-19use more cppu::BaseMutexNoel Grandin1-17/+11
Change-Id: I7ac096acfde05aa58a48fb76e895e880e27225d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17Remove empty docpp doxygen comments around namespacesMiklos Vajna1-2/+0
I assume this was originally added to work around some broken doc generator, but we don't enforce comments for namespaces today, so this is no longer needed. Change-Id: Ia2311658516be84b26ae69e09362af560d793a7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126963 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-29Prepare for removal of non-const operator[] from Sequence in cppuhelperMike Kaganski4-41/+69
Change-Id: I692f1faf0b6ebe26771f3b8c5be1aa548ebd8515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124355 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Simplify vector initialization in cppuhelperJulien Nabet1-8/+7
Change-Id: I1c1e36932673fe26fdd9daf21925fb952dbbfa73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123663 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski1-1/+1
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Simplify OTypeCollection ctorsMike Kaganski1-198/+122
Change-Id: I775e0a425abcf616a6d61570edfdfd99c7b9d46a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski1-1/+1
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-11cppuhelper: suppress unhelpful warning C4996Michael Stahl1-0/+9
... that happens while implementing the class declared as deprecated with MSVC 2019. cppuhelper/source/typeprovider.cxx(33): warning C4996: 'cppu::OImplementationId': Uses broken double checked locking Change-Id: I469fe38bd276a554b1ef006d3da270b85f26554b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123422 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-11loplugin:moveparam in cppuhelperNoel Grandin2-7/+7
Change-Id: Idb6b4794e542791b5cf38b611c5d70a34fbe23b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann1-1/+2
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-28Warn harder about unknown constructors and factories on iOS in XcodeTor Lillqvist1-0/+12
Use NSLog() and not just SAL_WARN(). There are so many irrelevant SAL_WARN() warnings displayed that these ones that can be extremely relevant are easily missed. I typically run the app in Xcode with SAL_LOG=-WARN. (Such warnings are typically caused by something missing from the solenv/bin/native-code.py.) Change-Id: I4ab16f4f652ac34319021c9427e2e9f911ee29e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122721 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122756 Tested-by: Jenkins
2021-08-15rtl::Static -> thread-safe static localNoel Grandin1-16/+5
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin4-10/+10
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02convert #defines to OUStringLiteralNoel Grandin2-6/+6
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18better to use a std::vector hereNoel Grandin1-1/+1
Change-Id: Ibd875907bc0618df3b27ed77625ff62c352019ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in EnumerationNoel Grandin1-2/+3
Change-Id: I1f4e99e4a3619b1381d01a16b98128ae9bbbce07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in ContentEnumerationNoel Grandin1-3/+4
Change-Id: I79457a4ffc957f6de47880fdc888648ab69d1349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17osl::Mutex->std::mutex in PropertySetMixinImplNoel Grandin1-8/+8
Change-Id: I45ae292e95efc57a125807d15c6c259533dd5f92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119106 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17osl::Mutex->std::mutex in OWeakConnectionPointNoel Grandin1-24/+23
it is at least a little bit cheaper than osl::Mutex (since it's not recursive) Change-Id: I4ecbbf33045888b9f5111c4224346341e71d4b05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-14cppuhelper : use std::mutex and remove useless rtl::StaticArnaud Versini1-15/+4
Change-Id: Idb272e664c4b745c4db96e505b60905c93937900 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann7-30/+30
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-12use std::unordered_map in cppuhelper ServiceManagerLuboš Luňák1-4/+4
It's faster and I do not see any reason for the map to be sorted. cppuhelper::ServiceManager::findServiceImplementation() may be called quite often e.g. during text layout by i18npool::BreakIterator. Change-Id: If8c77c506b88a0a3eac29e0d20d43d2110eed4ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112280 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-11cppu:OWeakObject zombie debuggingNoel1-0/+9
add some logic to catch re-animating objects early Change-Id: I42b13eaddbc227d8b0a4e786e86ced8fbb406cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>