summaryrefslogtreecommitdiffstats
path: root/cppu
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:useuniqueptr cppu,idlc,io,ucbhelperNoel Grandin2018-01-113-21/+15
| | | | | | | Change-Id: I6d8c24fabd52b39c66ce0b88b547df7ec85dad76 Reviewed-on: https://gerrit.libreoffice.org/47725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:passstuffbyref improved returnsNoel Grandin2017-12-232-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>
* loplugin:salcall fix functionsNoel Grandin2017-12-1115-74/+74
| | | | | | | | | | 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>
* loplugin:salcall handle static methodsNoel Grandin2017-12-071-1/+1
| | | | | | | Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:salcall fix non-virtual methodsNoel Grandin2017-12-051-4/+4
| | | | | | | | | 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>
* Replace lists by vector or deque (cppu)Julien Nabet2017-11-184-59/+30
| | | | | | | | | + use for range loops Change-Id: If0fcba6e06538913031c50ec878b18db3547e06c Reviewed-on: https://gerrit.libreoffice.org/44894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constmethods in unotoolsNoel Grandin2017-10-261-2/+2
| | | | | | | Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d Reviewed-on: https://gerrit.libreoffice.org/43865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:includeform: cppuStephan Bergmann2017-10-2329-478/+478
| | | | Change-Id: I438346398fd8430cf4357b8a3d8e9f423966f2ca
* overload std::hash for OUString and OStringNoel Grandin2017-10-232-5/+3
| | | | | | | | | 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>
* add << operator for css::uno::ExceptionNoel Grandin2017-10-041-11/+0
| | | | | | | Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
* Enable -Wunreachable-codeStephan Bergmann2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:unnecessaryparen include c++ castsNoel Grandin2017-09-043-3/+3
| | | | | | | 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>
* convert std::map::insert to std::map::emplace IINoel Grandin2017-08-111-2/+1
| | | | | | | 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>
* convert std::map::insert to std::map::emplaceNoel Grandin2017-08-112-5/+4
| | | | | | | | | which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove excess SAL_INFOsStephan Bergmann2017-08-101-12/+0
| | | | Change-Id: I21aa7c7878c4ec1371cec4738d2482cc101020a1
* loplugin:constparams in cppuNoel Grandin2017-07-195-8/+8
| | | | | | | Change-Id: I0e772b8cf4ee281b5f3e26131df985607a569c48 Reviewed-on: https://gerrit.libreoffice.org/40156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cppu: remove unnecessary LOG_LIFECYCLE_* macrosChris Sherlock2017-07-176-96/+14
| | | | | | | Change-Id: I0f19cf7045e6ff2906404a73ce710e42800c0a72 Reviewed-on: https://gerrit.libreoffice.org/39994 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* use more OUString::operator== comphelper..cuiNoel Grandin2017-07-134-10/+10
| | | | | | | Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: https://gerrit.libreoffice.org/39888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* teach unnecessaryparen loplugin about identifiersNoel Grandin2017-07-101-1/+1
| | | | | | | Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unnecessaryparen handle parens inside call exprNoel Grandin2017-07-071-2/+2
| | | | | | | | | | stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fix m68k build (again)Rene Engelhard2017-07-041-6/+20
| | | | | | | | | | This reverts commit d5d6ee3b3e7cf3d93f892a452244051e4294fe6d and applies the patch cleanly again. somehow it got mis-applied. Change-Id: Id199d9086fb8e2e52bb810c8ddcbdd7fa7060676 Reviewed-on: https://gerrit.libreoffice.org/39279 Reviewed-by: Rene Engelhard <rene@debian.org> Tested-by: Rene Engelhard <rene@debian.org>
* C++11 remove std::unary_function bases from functorsJochen Nitschke2017-07-032-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:casttovoid: cppuStephan Bergmann2017-07-021-4/+4
| | | | Change-Id: I5f2880701f42000e15c148f3c14a211fbbcf2ef1
* remove unused osl/mutex.hxx includesJochen Nitschke2017-06-181-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>
* remove unnecessary use of OString::getStrNoel Grandin2017-05-282-19/+7
| | | | | | | Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Revert "Fix typos"Stephan Bergmann2017-05-181-1/+1
| | | | | This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
* Fix typosAndrea Gelmini2017-05-181-1/+1
| | | | | | | | | Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* cleanup osl/diagnose.h includesJochen Nitschke2017-05-091-1/+0
| | | | | | | | | | | | | | with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* revert OSL_ASSERT changesChris Sherlock2017-05-0719-97/+97
| | | | Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
* tdf#43157: convert rest of cppu from OSL_ASSERT to assertChris Sherlock2017-05-0712-66/+66
| | | | Change-Id: I32684aaf33a798484d68bb8c3689cae542a8d608
* tdf#43157: convert cppu's LogBridge from OSL_ASSERT to assertChris Sherlock2017-05-071-4/+4
| | | | Change-Id: I8c377e716df65ca272ed4d4c1038260c68b6c30e
* tdf#43157: convert cppu's AffineBridge from OSL_ASSERT to assertChris Sherlock2017-05-071-7/+7
| | | | Change-Id: Ia55de2424b6e42a4377e7f5c06387aec79a59ec4
* tdf#43157: convert cppu's threadpool from OSL_ASSERT to assertChris Sherlock2017-05-075-20/+20
| | | | Change-Id: Id9cb46db0dd6f635014982ce958804dd0f02dd83
* loplugin:salunicodeliteral: cppuStephan Bergmann2017-04-281-1/+1
| | | | Change-Id: I0bb182f258439e6ce7bc7c54d68da4db1581ff19
* loplugin:cppunitassertequals: cppuStephan Bergmann2017-04-281-41/+89
| | | | Change-Id: I0497e726ca8c75b84acf3a8d177cfe4883ee2517
* Remove now-duplicate css::uno::Type operator <<Stephan Bergmann2017-04-281-11/+0
| | | | | | | ...was missing from 06c1dc4c09ba816affb8b65e8215bcd56a81df91 "LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type" Change-Id: Ifb3f8f72bfeb1038f01797aab9afb5f5059f9d5b
* gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky2017-04-2111-11/+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>
* remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin2017-04-211-2/+2
| | | | | | | Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* update cppunit to 1.14.0Markus Mohrhard2017-04-141-6/+0
| | | | | | | Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: https://gerrit.libreoffice.org/36499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* clang-tidy: readability-else-after-returnNoel Grandin2017-04-126-83/+66
| | | | | | | | | | | | | | 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>
* make UNO enums scoped for internal LO codeNoel Grandin2017-04-042-35/+39
| | | | | | | | | | | | | | | | | | | | | | | | this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove redundant 'inline' keywordStephan Bergmann2017-03-032-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>
* Assert IdContainer's bInit in uno_releaseIdFromCurrentThreadStephan Bergmann2017-02-232-1/+2
| | | | | | | | ...implying that pLocalThreadId, nRefCountOfCurrentId, pCurrentId are initialized, implying that zero-initializing them during construction isn't necessary. Change-Id: I98399203694edde14abc664a82861ba50dfb357c
* loplugin:subtlezeroinit: cppuStephan Bergmann2017-02-212-2/+2
| | | | Change-Id: Ie2bbca4c1d7c4730d4ac655a3711f2b9917face0
* Drop :: prefix from std in c*/Tor Lillqvist2017-02-153-6/+6
| | | | | | | Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: https://gerrit.libreoffice.org/34324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* teach lolugin:stringconstant about calling constructorsNoel Grandin2017-01-311-2/+2
| | | | | | | | | | | so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove dynamic exception specificationsStephan Bergmann2017-01-262-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | ...(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>
* coverity#704593 Dereference after null checkCaolán McNamara2017-01-071-1/+1
| | | | Change-Id: I5426cb2e8ca1e8fd2e9f38419ffe6d6e148a7cba
* teach sallogareas plugin to catch inconsistenciesNoel Grandin2016-12-152-2/+2
| | | | | | | 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>
* OSL_TRACE->SAL in chart2..ooxNoel Grandin2016-12-132-2/+2
| | | | | | | 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>