summaryrefslogtreecommitdiffstats
path: root/codemaker
Commit message (Collapse)AuthorAgeFilesLines
* Add missing sal/log.hxx headersGabor Kelemen2018-07-091-0/+1
| | | | | | | | | | | | | | | | 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 a* to configmgr Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a Reviewed-on: https://gerrit.libreoffice.org/57170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* tdf#96099 Remove trivial std::map typedefs in [cd]*Arkadiy Illarionov2018-06-291-31/+29
| | | | | | | Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82 Reviewed-on: https://gerrit.libreoffice.org/56639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#117918 codemaker: avoid including ourselves in .hpp filesMiklos Vajna2018-06-061-1/+4
| | | | | | | | | | It's pointless, include guards will make sure it's a NOP, but it confuses tools like IWYU. Change-Id: Ic1f56ef267954cdf8bf3cb4f4a5e841d5e4bb82a Reviewed-on: https://gerrit.libreoffice.org/55354 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* coverity#1019311 silence Unchecked return valueCaolán McNamara2018-01-261-1/+1
| | | | Change-Id: Ife2bfed0eecff5fe247d0fef6ee7d77626d9f0be
* loplugin:unusedmethods also check for functions returning boolNoel Grandin2018-01-191-4/+4
| | | | | | | | | we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* SAL_W32 is just an alias for _WIN32Stephan Bergmann2018-01-192-5/+5
| | | | | | | | | ...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>
* More loplugin:cstylecast: codemakerStephan Bergmann2018-01-121-1/+1
| | | | | | | | 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: If1c6b7a83f6f64fbcbced4f036c0f859a1408d0c
* Fix typosAndrea Gelmini2017-12-291-1/+1
| | | | | | | Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b Reviewed-on: https://gerrit.libreoffice.org/47145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann2017-11-273-18/+18
| | | | | | | | | | | | | | | | | | ...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Replace most lists by vectors in codemakerJulien Nabet2017-11-263-10/+8
| | | | | | | | Change-Id: Id867b497514d2d795504ae5c9e7d0ad356524ad5 Reviewed-on: https://gerrit.libreoffice.org/45274 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:constantparam in c*Noel Grandin2017-11-011-7/+1
| | | | | | | Change-Id: I10c7b62e6458062324367b94b207f776af79f598 Reviewed-on: https://gerrit.libreoffice.org/44129 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:includeform: codemakerStephan Bergmann2017-10-2326-142/+142
| | | | Change-Id: If0c6726c4e096f50e2e16f2a4f7e5821457ac368
* loplugin:constmethod in codemaker,registry,storeNoel Grandin2017-10-206-23/+23
| | | | | | | Change-Id: Ie75875974f054ff79bd64b1c261e79e2b78eb7fc Reviewed-on: https://gerrit.libreoffice.org/43540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* add << operator for css::uno::ExceptionNoel Grandin2017-10-041-0/+31
| | | | | | | Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
* clang-tidy modernize-use-emplace in c*Noel Grandin2017-09-113-14/+11
| | | | | | | Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin:droplongNoel Grandin2017-08-142-2/+2
| | | | | | | | | | | | The types 'long' and 'unsigned long' are different sizes on different platforms, making them wholy unsuitable for portable code. And when I mean different sizes, I mean 64bit Linux and 64bit Windows have different bit sizes. Change-Id: Id4d8cd709bf71a3f85ed6515fae2b0a21ae8c25d Reviewed-on: https://gerrit.libreoffice.org/41130 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-115-43/+20
| | | | | | | 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>
* loplugin:oncevarNoel Grandin2017-07-311-6/+3
| | | | | | | | | 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>
* loplugin:constparams codemaker,idl,idlcNoel Grandin2017-07-181-2/+2
| | | | | | | Change-Id: Ic72b7525cfbfbd3c5afb12fe9ea814176e6c8c9d Reviewed-on: https://gerrit.libreoffice.org/40126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* teach unnecessaryparen loplugin about identifiersNoel Grandin2017-07-102-10/+6
| | | | | | | 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-072-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>
* android, fix codemaker buildbreakerjan Iversen2017-06-271-2/+2
| | | | | | Interesting android does not use --enable-java Change-Id: If834485d5a1cfcd2c6ddcd6f30dcbb61aa838dae
* iOS, remove java and cppunittestjan Iversen2017-06-271-4/+2
| | | | | | Low level functions will not be tested Change-Id: I72fa44ea713639db97e39801a3975d6731a684c2
* iOS workaround to avoid mkdir problem.jan Iversen2017-06-241-2/+2
| | | | | | | | | | | this patch solves: make -rs -f /Volumes/LIBREOFFICE/ios/core/Makefile.gbuild all touch: /Volumes/LIBREOFFICE/ios/work/workdir/Executable/cppumaker.run: No such file or directory make[1]: *** [/Volumes/LIBREOFFICE/ios/work/workdir/Executable/cppumaker.run] Error 1 Seems the touch <foo>.run does not have a mkdir -p. Change-Id: I3a02f5fd04cc3e2b96afb919542ef708849daf10
* loplugin:oncevar in codemaker..connectivityNoel Grandin2017-06-201-1/+1
| | | | | | | Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd Reviewed-on: https://gerrit.libreoffice.org/39000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove usage of OString("")Arnaud Versini2017-06-042-9/+9
| | | | | | | Change-Id: I0874f81c35573048d05b3842806daa0db67f7887 Reviewed-on: https://gerrit.libreoffice.org/38386 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove unnecessary use of OString::getStrNoel Grandin2017-05-281-4/+4
| | | | | | | 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>
* cleanup osl/diagnose.h includesJochen Nitschke2017-05-094-4/+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>
* cppcheck: duplicateBreakJulien Nabet2017-04-301-1/+0
| | | | | | | Change-Id: Ia33dddfba35da3b495aae4edabe80b1a560674cd Reviewed-on: https://gerrit.libreoffice.org/37111 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock2017-04-251-0/+1
| | | | | | | Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* More commit resurrectionStephan Bergmann2017-04-041-2/+2
| | | | | | (why do people do such silly reformatting?) Change-Id: Ie9d45d7dfccb000f53fa5e8dc456f1e7c033af18
* Move comment back to where it makes senseStephan Bergmann2017-04-041-3/+2
| | | | | | | It appertains to the preceding code, not the following, so it was indented for a subtle reason. Change-Id: I032033f04a1ca3a91024c11de74ef96527562b41
* make UNO enums scoped for internal LO codeNoel Grandin2017-04-042-477/+482
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* loplugin:loopvartoosmallStephan Bergmann2017-02-252-2/+2
| | | | Change-Id: Ifd83cb180072304511ad8eb031dcf2a867e97e62
* remove unused KeywordsOnly from IdentifierTranslationModeNoel Grandin2017-02-171-3/+2
| | | | Change-Id: I7262e618a14fa9e025d269b560da752e3200309d
* Remove MinGW supportStephan Bergmann2017-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Remove newly-unnecessary #includes from cppumaker-generated filesStephan Bergmann2017-02-085-70/+72
| | | | | | | | | | | | | | | ...after e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications" dropped uses of UNO exception types from those generated files. This needed first adapting client code that implicitly depended on those #includes in the generated files it included ("Add missing #includes": 6dce9c6757823b9e89863716ae70ff4e8ddd4e60, a34d9150b419ee7471b96599d877ff1091d6b567, fed3783e77e00635e50622e7229b06c9e25451f1). Change-Id: Ia1defda2d586b69092f53feef3644875192cbea4 Reviewed-on: https://gerrit.libreoffice.org/34014 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:useuniqueptr extend to check local varsNoel Grandin2017-02-013-12/+9
| | | | | | | | | | | just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove dynamic exception specificationsStephan Bergmann2017-01-265-7/+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>
* loplugin: unnecessary destructor: basctl..codemakerNoel Grandin2017-01-242-4/+0
| | | | | | | Change-Id: Iadcfa9bc4fe9efb8d24d6d6afaf2b9b3def0bc3c Reviewed-on: https://gerrit.libreoffice.org/33452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove dynamic exception specifications from cppumaker-generated codeStephan Bergmann2017-01-201-51/+5
| | | | | | | | | | | | | | See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. This leaves some #include <...Exception.hpp> in the generated code that are no longer needed by the generated files themselves. But C++ implementation classes still use dynamic exception specifications and usually don't repeat the relevant #includes, so postpone removal until the implementation classes are cleaned up in a later step. Change-Id: Ifb7df3bb12f7f10c655b85cb0626afe5050479a4
* loplugin:stringconstant: handle OStringBuffer::appendStephan Bergmann2017-01-111-1/+1
| | | | Change-Id: I283da52c0ee2b63c19e31e9a61ab24997c037a6a
* bootstrap building with --disable-dynloading on standard linuxCaolán McNamara2016-12-202-4/+8
| | | | | | | Change-Id: I5baf70f0053612cba8b74f54aff11ce25cdeb95a Reviewed-on: https://gerrit.libreoffice.org/32202 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann2016-11-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | i.e., css::uno::Any function template specializations Any::has<Any>() const Any::get(Any const &) const operator >>=(Any const &, Any &) operator <<=(Any &, Any const &) that don't make much sense (the first is always true, the rest can be replaced with operator =, which additionally supports move semantics). For 3rd-party compatibility, do this only for LIBO_INTERNAL_ONLY, however. However, some generic template code did benefit from operator >>= working also for Any, so make up for that with a new (LIBO_INTERNAL_ONLY, given that operator >>= still covers if fine for !LIBO_INTERNAL_ONLY) fromAny, complementing the existing toAny. Change-Id: I8b1b5f803f0b909808159916366d53c948206a88 Reviewed-on: https://gerrit.libreoffice.org/30022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* clang-cl loplugin: codemakerStephan Bergmann2016-10-161-1/+1
| | | | | | | Change-Id: I1e11ea28d90a5ee47a0ad6d302724b226ef8440b Reviewed-on: https://gerrit.libreoffice.org/29877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Don't allow O[U]StringBuffer in string concatenationStephan Bergmann2016-10-121-1/+1
| | | | | | | | | | | | | | | ...as OStringBuffer b("foo"); b = "bar" + b; doesn't work as one might expect (see the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2016-October/075464.html> "concat of OUStringBuffer". That feature was LIBO_INTERNAL_ONLY, anyway. And of the affected places, MethodDescriptor::getSignature (codemaker/source/javamaker/javatype.cxx) was the only one that would actually have benefitted. Change-Id: Ib84266f43e40c42c2e428f0c0616db8cfa90adff
* cid#1371162 etc.: Move semantics for cppumaker-generated UNO exception classesStephan Bergmann2016-09-231-5/+6
| | | | | | | | | | | | | | | For UNO ABI reasons, these classes need to be CPPU_GCC_DLLPUBLIC_EXPORT (so their RTTI symbols get exported), so they are careful to explicitly declare any special member functions that would otherwise be declared implicitly, to mark them CPPU_GCC_DLLPRIVATE. But for LIBO_INTERNAL_ONLY, we always use -fvisibility-inlines-hidden (except for MSVC, where it doesn't matter, as CPPU_GCC_DLLPRIVATE expands to nothing there, either), so can leave those functions implicitly declared, so not to prevent move ctor and move assign op from being implicitly declared. This covers cid#s 1371143, 1371162, 1371185, 1371189, 1371290, and 1371308. Change-Id: I468088750a02f85a4790d956c37f4c30de03f00c
* loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2016-09-132-2/+2
| | | | | | | | | | | | | | | | | 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
* tdf#101185 OString concatanations for efficiently codingnadith2016-08-011-4/+2
| | | | | | | | | example of bug fixed Change-Id: Id9f911fa1ec43425018b00af5172e23be1274638 Reviewed-on: https://gerrit.libreoffice.org/27705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* improve passstuffbyref return analysisNoel Grandin2016-07-271-1/+1
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>