summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)AuthorFilesLines
2017-04-27tdf#39468 cleanup source code commentsdennisroczek1-2/+1
* translate German source code comments * remove ascii art * remove bogus source Code comments * remove old StarOffice/Sun internal bug tracker references Change-Id: I443bf2fdba3780c411d69809111daf3aa3a48451 Reviewed-on: https://gerrit.libreoffice.org/36005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky4-4/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-12clang-tidy: readability-else-after-returnNoel Grandin8-127/+108
run it against sal,cppu,cppuhelper I had to run this multiple times to catch all the cases in each module, and it requires some hand-tweaking of the resulting output - clang-tidy is not very good about cleaning up trailing spaces, and aligning things nicely. Change-Id: I00336345f5f036e12422b98d66526509380c497a Reviewed-on: https://gerrit.libreoffice.org/36194 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I56e429ff1b8ee55ccb8df16002b509770762172c Reviewed-on: https://gerrit.libreoffice.org/35618 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin1-4/+4
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann4-5/+5
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-28new loplugin unoanyNoel Grandin1-1/+1
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-24makeAny->Any in cppuhelper..cuiNoel Grandin6-28/+28
Change-Id: Ia54e6e9b71df68bd04c304a0bb02da8ebac74420 Reviewed-on: https://gerrit.libreoffice.org/34603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-21loplugin:subtlezeroinit: cppuhelperStephan Bergmann1-2/+2
Change-Id: I405ba174a4397938415eee6108ca1f0687b4649a
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist4-16/+16
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: https://gerrit.libreoffice.org/34324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-08Blind fix for apparently buggy GCC 4.8Stephan Bergmann1-15/+17
cf. <http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/10952/console> Change-Id: If947e338be0ab17f41f74f8e70e6281f46a7f57c
2017-02-08Use OUStringLiteralStephan Bergmann1-20/+17
Change-Id: I20685c733b12ef2a7efc894091a6e40d1347ac84
2017-02-01loplugin:stringconstant handle calls to constructors with one argNoel Grandin1-15/+10
Change-Id: Ide9148a908bef46ba14640dfa6f556beaf6e3f60 Reviewed-on: https://gerrit.libreoffice.org/33772 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31a whole bunch of SAL_WARN_UNUSEDNoel Grandin2-1/+2
Change-Id: Iea28debc7d3abc58cca21bd3856cb65b321dc1e6 Reviewed-on: https://gerrit.libreoffice.org/33693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin1-1/+1
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann16-681/+282
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, cppuhelperStephan Bergmann2-0/+6
Change-Id: I20b40d0d465cfe130e03f7a8f8da6f4dab404848
2017-01-19these used to OSL_TRACE, quiten them to SAL_INFOCaolán McNamara1-6/+4
Change-Id: Iec429b986a55a847baceb2e84752a380c6db831a
2017-01-18-Werror=unused-function (DISABLE_DYNLOADING)Stephan Bergmann1-0/+4
Change-Id: I2d70946423c6b1fe56d1630d6982e91bd5c7d81a
2017-01-17cppuhelper: implement environment mapping for constructor functionsMichael Stahl4-34/+94
ae3a0c8da50b36db395984637f5ad74d3b4887bc unfortunately forgot to implement mapping between UNO environments for constructor functions in the UNO service manager, and due to the many componennt conversions to constructor functions since then, the log UNO purpose environment has become mostly useless. Save the environment, create a closure today! https://wiki.openoffice.org/wiki/Uno/Spec/Log_Environment Change-Id: Idc03b5ed9529da8e81cd91efe50cbeceffa2b247 Reviewed-on: https://gerrit.libreoffice.org/33060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin1-1/+1
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13OSL_TRACE->SAL in chart2..ooxNoel Grandin2-9/+3
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2 Reviewed-on: https://gerrit.libreoffice.org/31907 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07Remove dead test codeStephan Bergmann27-4386/+0
Change-Id: Iea40cee7dab736ffd954b0eae2b1dca2d9f5463b
2016-12-07tdf#88206 replace cppu::WeakImplHelper* in cppuhelperJochen Nitschke12-52/+51
Change-Id: I3130a3fe28c00bd83cade9667a6e3b3abcb719f7 Reviewed-on: https://gerrit.libreoffice.org/31714 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-28loplugin:unnecessaryoverride (dtors) in cppuhelperStephan Bergmann1-4/+0
Change-Id: Ia23b1fdf126fc57ce929feef60e57b64c782fb50
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>