summaryrefslogtreecommitdiffstats
path: root/cppuhelper/qa
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:referencecasting in cppuhelperNoel2021-02-171-3/+3
| | | | | | | Change-Id: Ie19f01a35ef656f5532c5ec41dbed1c0e4cf77d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctornienzu2020-06-051-2/+1
| | | | | | | Change-Id: Ic61c1d5829b510a71b8d444f29ffed36ee540ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94717 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
* compact namespace in canvas..cuiNoel Grandin2020-05-082-2/+2
| | | | | | | Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Extend loplugin:external to warn about classesStephan Bergmann2019-11-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:sequentialassignNoel Grandin2019-07-291-2/+1
| | | | | | | Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f Reviewed-on: https://gerrit.libreoffice.org/76501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Some uses of C++17 class template argument deductionStephan Bergmann2019-02-191-4/+4
| | | | | | | Change-Id: I47c469c0fcdff41d83729be9489c946e81ef3686 Reviewed-on: https://gerrit.libreoffice.org/68020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#42949 Fix IWYU warnings in cppuhelper/Gabor Kelemen2019-02-142-7/+0
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I0eebd82b96d630da0597166cf87d398072607c13 Reviewed-on: https://gerrit.libreoffice.org/67473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai2018-11-101-9/+9
| | | | | | | Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* remove more rtl::OUString and OString prefixesNoel Grandin2018-10-244-108/+108
| | | | | | | | | which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fillUnoException not working on std::rethrow_exception exceptionsCaolán McNamara2018-08-041-0/+32
| | | | | | | | | | | | | | | | | | | used since... commit dacc1b40df67d154c96b256b0d920460f38c3d11 Date: Sat Jul 28 16:33:22 2018 +0100 ofz#9597 rethrown IOException not caught by catch IOException the adjustedPtr seems to be as expected, but the type_info not. Presumably these are thrown as 'dependent exceptions' (?) https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_type.cc#L42 Change-Id: Ibd736abe941bb1d5facdb88139b3a0e6cf32cf1f Reviewed-on: https://gerrit.libreoffice.org/58477 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* More loplugin:cstylecast: cppuhelperStephan Bergmann2018-01-121-2/+2
| | | | | | | | 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
* add cppu::throwException test caseCaolán McNamara2017-11-251-0/+59
| | | | | | | | | | | | | 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>
* loplugin:oncevarNoel Grandin2017-07-311-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>
* makeAny->Any in cppuhelper..cuiNoel Grandin2017-02-241-13/+13
| | | | | | | 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>
* a whole bunch of SAL_WARN_UNUSEDNoel Grandin2017-01-311-0/+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>
* Remove dynamic exception specificationsStephan Bergmann2017-01-262-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | ...(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>
* tdf#88206 replace cppu::WeakImplHelper* in cppuhelperJochen Nitschke2016-12-074-9/+9
| | | | | | | 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>
* loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2016-09-131-1/+1
| | | | | | | | | | | | | | | | | 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
* cppuhelper: fix loplugin:cppunitassertequals warningsMiklos Vajna2016-09-092-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>
* loplugin:overrideStephan Bergmann2015-11-201-3/+3
| | | | Change-Id: Ic89d255bf56234a82b23ad6cc36d8d1250acbcab
* use initialiser list for Sequence<OUString>Noel Grandin2015-11-161-4/+3
| | | | | | | Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* use initialiser for Sequence<OUString>Noel Grandin2015-11-151-2/+1
| | | | | | | | | | | | using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:nullptr (automatic rewrite)Stephan Bergmann2015-11-101-3/+3
| | | | Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
* Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2015-10-121-1/+1
| | | | Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
* Revert "return and use std::vector from OInterfaceContainerHelper"Noel Grandin2015-06-291-9/+10
| | | | This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
* return and use std::vector from OInterfaceContainerHelperNoel Grandin2015-06-291-10/+9
| | | | | | | | | | since most of the time we don’t need a heavyweight uno::Sequence. Adds a new method getElementsAsVector(). Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a Reviewed-on: https://gerrit.libreoffice.org/15747 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* cppcheck: noExplicitConstructorCaolán McNamara2015-06-091-1/+1
| | | | Change-Id: Ic33ee6936f40bec4f3a82aea39a180ae6e9a0928
* remove unnecessary use of void in function declarationsNoel Grandin2015-04-151-1/+1
| | | | | | | | | | | | | | | | ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
* Remove unused */qa/checkapi/Stephan Bergmann2014-12-191-30/+0
| | | | | | ...superseded by CppunitTest_odk_checkapi Change-Id: I5df89a1a12f496984deab153f0ba2734323c1293
* Removed duplicated includesAndrea Gelmini2014-10-313-4/+0
| | | | | | | Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* cppuhelper: remove SAL_THROW macroNoel Grandin2014-06-051-1/+0
| | | | Change-Id: I54141071396d04e7bead56da14a665b8556ba6d2
* cppuhelper: fix includesThomas Arnhold2014-06-045-88/+88
| | | | Change-Id: I0e6bc822d19cf266dea716fe92f2ccd08d87c51f
* Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10Julien Nabet2014-05-111-3/+3
| | | | Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
* cppu::OMultiTypeInterfaceContainerHelperVar hashImpl param is unusedStephan Bergmann2014-04-151-2/+2
| | | | | | | | | ...since f059134fab0f91b7a15594ad06536a13fbfae034 "INTEGRATION: CWS cppuhelpshrink: #i72766# save memory in cppuhelper, using a vector instead of a hash_map" (but a dummy "void" default is left in place for backwards compatibility). Change-Id: I3bb0af8158f34737d41c344464f3cf944e2891ed
* First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann2014-03-261-1/+1
| | | | | | | ...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
* cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann2014-02-261-1/+1
| | | | Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
* Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann2013-12-171-2/+2
| | | | Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
* Clean-up uno/lbnames.hStephan Bergmann2013-12-161-1/+0
| | | | Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919
* add mode lines to new files (and idls) since last runCaolán McNamara2013-09-221-0/+3
| | | | Change-Id: Id1e74f18c90e69d1a781c8f02e30dc3c005ed4fd
* Resolves: #i122208# introduce rtl::CStringHash and rtl::CStringEqualHerbert Dürr2013-05-101-17/+1
| | | | | | | | | | | | | | | | | | unify the various c-string compares and hashes. (cherry picked from commit b7e3470a154538a92f0a21b14e726d75723f4a92) Conflicts: oox/inc/oox/export/shapes.hxx oox/source/export/shapes.cxx sal/inc/rtl/string.hxx sdext/source/minimizer/pppoptimizertoken.cxx svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx vcl/source/glyphs/gcach_ftyp.cxx writerfilter/source/resourcemodel/TagLogger.cxx xmloff/source/draw/EnhancedCustomShapeToken.cxx Change-Id: Ib742744077bfb4d38a462d88b44bdef45601b4ae
* automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold2013-03-192-68/+66
| | | | | | | | | | | Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
* re-base on ALv2 code. Includes:Michael Meeks2012-12-067-282/+87
| | | | | | | | | | | | Patches contributed by Ocke Janssen converted reportdesign. http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1394326 Patch contributed by Oliver Rainer-Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115
* c++ API: use css alias in generated headers, adds global css declThorsten Behrens2012-11-303-6/+0
| | | | | | | | | | | | This changes all generated API headers (.hpp and .hdl) to use a namespace alias 'css' instead of the pointlessly long com::sun::star Makes the change in cppumaker & associated tools, adds a global namespace alias definition in sal/types.h, and removes a kiloton of local, now pointless-to-harmful versions of that alias from all over the code. Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
* Bin no longer used iOS cppunit stuff that even breaks the buildTor Lillqvist2012-08-024-350/+0
| | | | Change-Id: I459f7fd097a81ef5977974f52b0cc2c2f155a810
* allow using rtl::OUString etc. simply as OUString, without rtl::Luboš Luňák2012-07-161-0/+30
| | | | | | | | | | | http://lists.freedesktop.org/archives/libreoffice/2012-April/029940.html The RTL_USING #define (set by gbuild for anything that's not public API) allows to use such classes simply by their name, without having to use the namespace or do explicit using rtl::OUString (which half of the sources do anyway). Change-Id: I7edaf12cd278489cdc1d5ff782f0a86361c13c0a
* re-base on ALv2 code.Michael Meeks2012-06-291-26/+17
|
* targetted re-work of cppunit pieces.Michael Meeks2012-06-276-16/+4
|
* re-base on ALv2 code.Michael Meeks2012-06-212-46/+28
| | | | Change-Id: Ice06e639213aeb6f7f23cbf4634947dd25613db1
* cppuhelper: convert to gbuildMatúš Kukan2012-01-024-213/+0
| | | | missing subsequent test qa/propertysetmixin/makefile.mk
* remove include of pch header in cppuhelperNorbert Thiebaud2011-11-273-6/+0
|