summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)AuthorFilesLines
2018-07-19Fix typosAndrea Gelmini1-1/+1
Change-Id: If7365b05c8f4fd1bf130678cb28f05c9a1add4c7 Reviewed-on: https://gerrit.libreoffice.org/57598 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-16Add missing sal/log.hxx headersGabor Kelemen5-0/+5
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from connectivity to cui Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499 Reviewed-on: https://gerrit.libreoffice.org/57408 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-29tdf#96099 Remove trivial std::map typedefs in [cd]*Arkadiy Illarionov1-5/+3
Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82 Reviewed-on: https://gerrit.libreoffice.org/56639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-31cppuhelper : use rtl::isAlphaNumeric instead of recreate the method.Arnaud Versini1-16/+6
Change-Id: I30bd9e0bf99c2a115b67a59377b2d2ef6fdefef0 Reviewed-on: https://gerrit.libreoffice.org/54194 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2018-05-29loplugin:unusedfields-in-constructor in variousNoel Grandin1-3/+2
Change-Id: Ie0fb647938e3cf730976fb2e435b92bfd67ef645 Reviewed-on: https://gerrit.libreoffice.org/54998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin3-52/+76
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin1-1/+1
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-11Pre-load key UNO mappings.Michael Meeks1-0/+20
Change-Id: I415e07d737c734d63ac969783464babcbb9ea884 Reviewed-on: https://gerrit.libreoffice.org/48365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-11lok: allow libraries to pre-init themselves.Michael Meeks1-0/+13
Populate static module references before entering a jail containing no code. Implement for scfilt, scui, swui, sdui. Change-Id: I8fec2aa78e67053a7945926c818122bd4290103c Reviewed-on: https://gerrit.libreoffice.org/49545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-01cppuhelper: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-4/+0
Change-Id: Ib097ea1764d275a3123d0dccf05d52315b4858a1 Reviewed-on: https://gerrit.libreoffice.org/48971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann1-2/+2
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-17Fix typosAndrea Gelmini1-3/+3
Change-Id: Id1c7ddf6c49ec709e38947a82731fe31a64aad04 Reviewed-on: https://gerrit.libreoffice.org/48076 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: cppuhelperStephan Bergmann1-8/+8
Change-Id: I193884eea6289653d648489edd1a8e929524a3c5
2018-01-12More loplugin:cstylecast: cppuhelperStephan Bergmann3-5/+5
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I3966d302241a52014aaad41f72924a2095ea6621
2018-01-12Revert "Print the important failure messages on iOS even in a non-debug build"Stephan Bergmann1-8/+0
This reverts commit ab07f81d0b5ffc4297d5f15d2458c5cc9217800f. > Jan 12 10:21:35 <sberg> tml_, is ab07f81d0b5ffc4297d5f15d2458c5cc9217800f > still relevant? (one could imagine that if one wants such debug output during > development in a non-debug build, one could build with --enable-sal-log?) > Jan 12 10:22:01 <tml_> I have no idea what's relevant on iOS any longer > Jan 12 10:22:26 <tml_> ... but my gut feeling would be no, can be removed > Jan 12 10:23:14 <tml_> the rationale in the commit message sounds a bit thin > Jan 12 10:24:02 <tml_> surely one should test an ap well enough before > submitting, to verify that it isn't possible to get it to try to invoke a > constructor that isn't included Change-Id: I20ce8aa40a00205c1cae9d6ed4a87a6093745dc4 Reviewed-on: https://gerrit.libreoffice.org/47791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-11Log just one line in cppuhelper::ServiceManager::preloadImplementations()Tor Lillqvist1-3/+48
That *is* what we want, I guess, so better I do it proactively before I am told to do it. Sorry for the back and forth, but my main point in touching this code was anyway the filtering out of the component (the KDE4Backend thing) that causes a crash for me, at least, and which it presumably is fairly pointless to preload anyway. Also, filter out libraries that for some reason have an empty name. Change-Id: I2cffd51e67c23977e0779e7f0d6faaf59d8819d9
2018-01-10Do use just std::cerr in cppuhelper::ServiceManager::preloadImplementations()Tor Lillqvist1-3/+4
As the 1aedb6c4345719a963a883b13fa983db3ab4b9a8 commit message said, the point is that we want this output even with a LO built for production where SAL_INFO() and SAL_WARN() are no-ops. Change-Id: I5f788c3914286ca8df2c7e290150adae0be42820
2018-01-10Bin superfluous using declarationsTor Lillqvist1-3/+0
Change-Id: Icf8a2703b7e72f48bde1cc3bc6fd0de2e663a407
2018-01-10Don't try to preload the KDE4 shell backend as that crashesTor Lillqvist1-0/+7
Change-Id: I1c1ff4ec7cda00a76bdeb018366afed2187c7ef8
2018-01-10Simplify logging in cppuhelper::ServiceManager::preloadImplementations()Tor Lillqvist1-39/+4
Use just SAL_INFO(), with tag "cppuhelper.preload". No unconditional writes to std::cerr. Also, log the loading attempt beforehand, so that it is printed before any crash during the loading of a component. Change-Id: Ifde8be8cb5d18dd88df21c45c906deb575d36960
2017-12-23loplugin:passstuffbyref improved returnsNoel Grandin1-2/+2
improve the detection of stuff we can return by const &, instead of by copying Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69 Reviewed-on: https://gerrit.libreoffice.org/46915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin5-6/+6
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:countusersofdefaultparams in comphelperNoel Grandin1-2/+2
Change-Id: Idb704adbe78a42bf2f2aaf7f6110698d5559e836 Reviewed-on: https://gerrit.libreoffice.org/45936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin1-2/+2
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-28not used with disable-dynloadingCaolán McNamara1-1/+1
Change-Id: Idad8a7b9b984147b7a64caf7527d8ad21bdd55a2 Reviewed-on: https://gerrit.libreoffice.org/45433 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-25iOS, simplifyModule in cppuhelper is unusedlibreoffice-6-0-branch-pointjan Iversen1-0/+2
function simplifyModule is reported unused == error on iOS, therefore guarded with an #ifndef IOS Change-Id: I751cf68bd46ed17032251fede030f9082ce4e4f5
2017-11-25add cppu::throwException test caseCaolán McNamara3-0/+88
that is definitely run by the ubsan tinderbox to flush out cppuhelper/source/exc_thrower.cxx:201:15: runtime error: member call on address "foo" which does not point to an object of type 'cppuhelper::detail::XExceptionThrower' Change-Id: Ia798cc6695011480717c1a80d0ab7830080b5de1 Reviewed-on: https://gerrit.libreoffice.org/45244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-25LOK: provide user feedback while preloading.Michael Meeks1-1/+41
Problems are hard enough to debug in a jailed kit process inside a docker image; provide some visual feedback via stderr. Change-Id: I54b0a21c1375be2acc9da0bbacf959a419471b08 Reviewed-on: https://gerrit.libreoffice.org/45256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-10-27Better fix for CppunitTest_servicesStephan Bergmann2-5/+16
...than 25313923b08018bd837cfe3fc99a5e141602cafc "Fix CppunitTest_services for constructor-based implementations..." (which this commit reverts again). My claim that "the 'factory' would be the object itself" is nonsense, it would rather be an ImplementationWrapper (but one that was freshly created for each ServiceManager::createContentEnumeration). Change-Id: I85c683cff6f9ba78d0f8567a53f8fcbc56fe55cf
2017-10-23loplugin:constmethod in cppu,cppuhelper,idlcNoel Grandin2-3/+3
Change-Id: I9138b7e5d53c30488f99e9f9b9fe3f98c8d6858b Reviewed-on: https://gerrit.libreoffice.org/43583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-2/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski1-1/+2
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin7-15/+12
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-27cppuhelper_detail_findSofficePath: use Unicode on WindowsMike Kaganski2-26/+51
On Windows, UTF-8 is never current locale encoding; so using 8-bit strings will always fail for paths containing characters outside of current codepage. Also fix leaks caused by failing to release its result: previously it could return either result of getenv (that shouldn't get freed), or an allocated string, but never got freed; now the result is always allocated and properly freed. Change-Id: I8b255dea20040eec0572de2b34280749fe8f071c Reviewed-on: https://gerrit.libreoffice.org/42743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-21loplugin:flatten in connectivity..desktopNoel Grandin1-26/+22
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b Reviewed-on: https://gerrit.libreoffice.org/42578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin1-1/+1
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-21cppuhelper: fix double checked locking in getTypeEntries()Michael Stahl1-0/+5
Change-Id: I73674f0293a57ed7c4d54aa6b68ff64d5ca4e7bd
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-2/+1
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin4-18/+10
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31update cppuhelper pchCaolán McNamara1-8/+5
Change-Id: Ifa6390c6665b6048e320a1a61f690ce980b40d6e Reviewed-on: https://gerrit.libreoffice.org/40582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-31loplugin:oncevarNoel Grandin1-2/+2
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:constparams in soltools and variousNoel Grandin3-3/+3
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1 Reviewed-on: https://gerrit.libreoffice.org/40279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin1-3/+2
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin1-2/+2
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: cppuhelperStephan Bergmann1-1/+0
Change-Id: I70a8f00b5ec9d100185d2865bcf54ce96c93adc3
2017-06-20android:Supress the Clang's unneeded-internal-declaration warningbrainbreaker1-1/+2
Change-Id: I76359e98a41206f914c3c05149f0a7eeeff1acc8 Reviewed-on: https://gerrit.libreoffice.org/39007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-15use more SAL_N_ELEMENTS part 3Noel Grandin1-4/+2
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara1-1/+1
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-05Improved loplugin:cstylecast to reference types: cppuhelperStephan Bergmann1-1/+1
Change-Id: Id442b7a76072fb346d927a7dd8659a05bb491f9b