summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)AuthorFilesLines
2017-11-30LOK: 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/45465 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-11-10loplugin:expandablemethods in comphelper..cppuhelperNoel Grandin4-13/+5
Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d Reviewed-on: https://gerrit.libreoffice.org/30717 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02Improve some error reportingStephan Bergmann1-2/+8
Change-Id: Ibfdb0eeebec785438d46a0e8e6e9f4c847bfb807
2016-10-18replace <<= with assign for <<= with rhs AnyJochen Nitschke1-1/+1
found by deleting specialization of '<<=' template Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c Reviewed-on: https://gerrit.libreoffice.org/29956 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-16clang-cl loplugin: cppuhelperStephan Bergmann1-1/+1
Change-Id: I03d082bb6e403bda0028286d89e22006578da4a8 Reviewed-on: https://gerrit.libreoffice.org/29873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-20[API CHANGE] Remove HAVE_GCC_VISIBILITY_FEATURE, always trueStephan Bergmann1-1/+1
* GCC documents -fvisibility at least as far back as the GCC 4.0 online documentation at <https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Code-Gen-Options.html>. * For external code, odk/settings/settings.mk unconditionally set HAVE_GCC_VISIBILITY_FEATURE for all platforms other than Windows. Make this a fatal configure error for now. The check should be removed completely after LO 5.3 branch-off. Change-Id: I1de415b6ed1591e0a7b6640ece861b6f0ef74112 Reviewed-on: https://gerrit.libreoffice.org/29073 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-19cid#1371142: Move semantics for css::uno::WeakReferenceHelperStephan Bergmann2-0/+15
Change-Id: I442b2d8061bd7d50cbf832b345a7a63461e26224
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann7-33/+33
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-09cppuhelper: fix loplugin:cppunitassertequals warningsMiklos Vajna2-22/+22
Change-Id: Ia7c3de84b8001a30dbe1863be58a9639167cfa11 Reviewed-on: https://gerrit.libreoffice.org/28760 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-11getFactory only called with nullptr "key" argumentStephan Bergmann1-3/+2
Change-Id: I5148e1902cb3c1d2bb87b623dfd843ccadf6c430
2016-07-04Fix some spelling errors in comments and stringsOtto Kekäläinen1-1/+1
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e Reviewed-on: https://gerrit.libreoffice.org/26883 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-17cppuhelper: fix use-after-free race in OWeakConnectionPointMichael Stahl1-0/+3
OWeakObject::m_pWeakConnectionPoint is returned from OWeakObject::queryAdapter(), and stored in OWeakRefListener::m_xWeakConnectionPoint. This is cleared in OWeakRefListener::dispose(), called from OWeakConnectionPoint::dispose(), called from OWeakObject::disposeWeakConnectionPoint(), but it can happen that another thread is in WeakReferenceHelper::get() and has copied m_xWeakConnectionPoint onto the stack before the OWeakObject is released and deleted, then calls OWeakConnectionPoint::queryAdapted() after it is released, accessing the dead m_pObject. Change-Id: I7782e6fb7e07f5a48cf7064115217376714ba8e8
2016-06-17cppuhelper: WeakReference isn't thread-safeMichael Stahl1-7/+4
... but its documentation claims that it is, which is partially misleading, so fix both the documentation and the data race in WeakReferenceHelper::clear(). This actually crashed in clear() in the multi-threaded ZipPackage code on exporting the bugdoc from tdf#94212, presumably because clear() races against OWeakRefListener::dispose(). Change-Id: I85665c11b8157e90d15e8263758e24e66efeb86c
2016-06-08remove "object is disposed" warning in OBroadcastHelperVar::removeListenerNoel Grandin1-1/+4
doesn't add anything of value. Change-Id: Ie2dea7c43570640284771c992d0072ab61de425e Reviewed-on: https://gerrit.libreoffice.org/25871 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25Convert XmlReader::Result to scoped enumNoel Grandin1-11/+11
Change-Id: I6a0d1dcf5ae51d2ac08aacdfec50865f93e51c21 Reviewed-on: https://gerrit.libreoffice.org/25365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24optimise references list handling in OWeakConnectionPoint some moreNoel Grandin1-7/+17
After my commit 1e063e8b "optimise references list handling in OWeakConnectionPoint" Reduce scope of locking, and copy a the performance trick from OInterfaceContainerHelper. Change-Id: Idc218e9d4edf45f8c37c7e517d1a26821800448b Reviewed-on: https://gerrit.libreoffice.org/25406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-24Convert XmlReader::Text to scoped enumNoel Grandin1-1/+1
Change-Id: I4741b13fcf887a95b85886cb41f8236e128e81a2 Reviewed-on: https://gerrit.libreoffice.org/25364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18add some spaces to make it easier to readMarkus Mohrhard1-9/+12
Change-Id: I2eb1c74bc0d91d3a12a66989b696fccbf1d2825e Reviewed-on: https://gerrit.libreoffice.org/25117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-16optimise references list handling in OWeakConnectionPointNoel Grandin1-7/+17
avoid the expensive sequence copying and deleting in OInterfaceContainerHelper. Change-Id: I00867b8a25b27d2a0b0babdf41a082c014e0e07d Reviewed-on: https://gerrit.libreoffice.org/24949 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12loplugin:passstuffbyrefStephan Bergmann1-1/+3
Change-Id: I5a98cea6402b0a02c0e7c329d07d05759a74ec95
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2-4/+4
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-04-27Remove ancient, dead CONTEXT_DIAG codeStephan Bergmann1-231/+0
Change-Id: I24123a54fe847b35f6b3674e2caa9bfb4b339d4a
2016-04-27Remove ancient OSL_DEBUG_LEVEL printfStephan Bergmann1-9/+0
...alerting about something that is not too exciting anyway Change-Id: I7596f14e52a0272762f923882f5f92fc3ac1ddf4
2016-04-21clang-tidy modernize-loop-convert in c*Noel Grandin1-2/+2
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann7-43/+43
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
2016-04-18clean-up: unused using declarations and includesJochen Nitschke4-6/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-13tdf#94306 remove unused boost dependenciesJochen Nitschke2-3/+0
remove <boost/noncopyable.hpp> in pch and remove boost from makefile if it was the only boost entry. Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831 Reviewed-on: https://gerrit.libreoffice.org/24061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-11Fix indentationStephan Bergmann1-7/+7
Change-Id: Ia043e0a5b7ec9623f6575a83374720be1f3b6b83
2016-04-10Typo: multible->multipleJulien Nabet2-2/+2
Change-Id: I1c61841be58d49132ac3c69a6b227d75e829f769 Reviewed-on: https://gerrit.libreoffice.org/23972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-10Typo: rubust->robustJulien Nabet1-1/+1
Change-Id: Icc6bef40a66d5616667d55bf02f10e19153457a7 Reviewed-on: https://gerrit.libreoffice.org/23971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-08tdf#94306 replace boost::noncopyable in cppuhelperJochen Nitschke4-20/+48
and related modules. Replace with C++11 delete copy-constructur and copy-assignment. Change-Id: I18aa9fe4ff696f9b5472cbe4cd0097cb174618b7 Reviewed-on: https://gerrit.libreoffice.org/23904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-05tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar3-26/+7
I removed OSL_DEBUG_LEVEL > 1 conditionals to SAL_INFO statements Change-Id: I6f74f5146473464758f35629877a76bb2bc39b4e Reviewed-on: https://gerrit.libreoffice.org/23071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-02cleanup: remove unused Reference.h(xx) includesJochen Nitschke1-1/+0
and unused using-declarations from Reference.h Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19 Reviewed-on: https://gerrit.libreoffice.org/23735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-12Let's use the iterator return by erase method (final)Julien Nabet1-1/+1
Change-Id: I1934b0c2a9ae9fa089d7e9ded4a289908fb2709a Reviewed-on: https://gerrit.libreoffice.org/23173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-11tdf#97966 redundant static keywords removed 6Wastack1-2/+2
Change-Id: Iaf034f3b2282a973f6503edea41cb3184543fb11 Reviewed-on: https://gerrit.libreoffice.org/23133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10Avoid reserved identifiersStephan Bergmann1-20/+20
Change-Id: I6add6c03c92576127c3e3f93892bcc00c1f51424
2016-03-10Avoid reserved identifiers (use unnamed namespace, just in case)Stephan Bergmann1-7/+10
Change-Id: I3e34368a674e9f128a32604c82181b1b99632c37
2016-03-07improve defaultparams lopluginNoel Grandin1-3/+1
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-26Use an XInitialization-based channel to request service mgr pre-initStephan Bergmann4-145/+139
...instead of private cppu::preInitBootstrap function Change-Id: Id0e6fcf721b697c993e5acffaf7836452cfa9750 Reviewed-on: https://gerrit.libreoffice.org/22699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-1/+1
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin1-1/+1
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-15Re-work cppu::preInitBootstrap()Henry Castro2-11/+18
In the preinit stage, the preInitBootstrap is called to load implementations for each service registered by the service manager. All service requests are: initial Component Context and the process service factory is set. However, some services require that VCL is properly initialized. Change-Id: Ib116e3da172b860f2df4d672f6181b5de0b7e6b2
2016-02-15In loadAllImplementations(), also invoke component factoryHenry Castro1-5/+81
Change-Id: Ie6f6d769b611c8440ddab802545e6bdc482d1476
2016-02-15Just abort() in the DISABLE_DYNLOADING case for nowTor Lillqvist1-0/+4
Should fix the build for Android. Change-Id: Iabba9da8755805ad4d9d21d7a6b4b22e3fa6418f
2016-02-15Introduce lok_preinit() to preload all registered UNO implementationsHenry Castro4-0/+58
Intended to be used from an application like the LibreOffice On-Line server so that it can be called in a process that then will call fork() several times, and much space consuming data will end up being shared. Change-Id: I65341c57d00308d246ec90deab8050b2c4bb3e61
2016-02-09Remove excess newlinesChris Sherlock12-21/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-31unnecessary use of OUString constructorNoel Grandin1-1/+1
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-04tdf#82775: Don't prematurely dispose single-instance servicesStephan Bergmann1-1/+3
...that happen to be requested concurrently from multiple threads Change-Id: Icecfb0b8d88c9123064689643eddf90a99d3b1b8
2015-12-02inline one-liner static methodNoel Grandin1-9/+1
Change-Id: I9e0bd7a34ed691b245738dd66ff5ba7cc879ebe5
2015-11-28Work around clang-cl PR25641Stephan Bergmann2-1/+3
"defaultbootstrap.o : error LNK2001: unresolved external symbol '[thunk]:private: virtual class com::sun::star::uno::Sequence<class rtl::OUString> __cdecl cppuhelper::ServiceManager::getAvailableServiceNames`adjustor{24}' (void)' (?getAvailableServiceNames@ServiceManager@cppuhelper@@GBI@EAA?AV?$Sequence@VOUString@rtl@@@uno@star@sun@com@@XZ)" Change-Id: I04b7353305ffeeb316d70ab8408aeb52ea0f7186