summaryrefslogtreecommitdiff
path: root/helpcompiler/source/HelpLinker.cxx
AgeCommit message (Collapse)AuthorFilesLines
2019-10-01loplugin:stringadd in helpcompiler..ooxNoel Grandin1-4/+2
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-18cid#703974 Unchecked return valueCaolán McNamara1-1/+1
Change-Id: I833175e7687df88719d4d946cf97181158187c67 Reviewed-on: https://gerrit.libreoffice.org/75840 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-30tdf#42949 Fix IWYU warnings in helpcompiler/Gabor Kelemen1-9/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie7e20c77a8035c0ee4f0316966d163b9cd7d11f2 Reviewed-on: https://gerrit.libreoffice.org/73006 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-07std::string has a std::hash specialisation since C++11Noel Grandin1-1/+1
Change-Id: I8cc01420d0235a8d1686881eca1ad9cc4a67ebe0 Reviewed-on: https://gerrit.libreoffice.org/70362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin1-2/+2
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-3/+7
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen1-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 filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-27loplugin:returnconstant in helpcompilerNoel Grandin1-13/+1
and fix scanForFiles to return false on error Change-Id: I246e906de9985947be421d361340874c94a2102d Reviewed-on: https://gerrit.libreoffice.org/58085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11tdf#96099 Remove some trivial std::vector typedefsArkadiy Illarionov1-1/+1
Change-Id: I0e60ec7a3edae42b25ff0917828d0a893ed39a38 Reviewed-on: https://gerrit.libreoffice.org/55245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-07tdf#96099 Remove std::vector typedefsAbhyudaya Sharma1-1/+0
Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473 Reviewed-on: https://gerrit.libreoffice.org/55260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-04-16loplugin:useuniqueptr in StreamTableNoel Grandin1-3/+3
Change-Id: I6a6314a3e6df9edfb6d92d2afbc1567195946292 Reviewed-on: https://gerrit.libreoffice.org/52885 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-18Use for-range loops in helpcompilerJulien Nabet1-32/+19
Change-Id: I787a5b43cb09ac308082cac0e66540f975d79ead Reviewed-on: https://gerrit.libreoffice.org/51473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski1-1/+2
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-03Replace more reinterpret_cast with SAL_W/SAL_UMike Kaganski1-36/+16
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-06cppcheck: unreadVariableJochen Nitschke1-4/+0
since initial commit d6cf80c14ef6abe02125bb8f66262961193cffd7 CWS-TOOLING: integrate CWS l10nframework01 Change-Id: I3d9761911c535965795b10b3ae96da3e7b51f23d Reviewed-on: https://gerrit.libreoffice.org/40808 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in vclNoel Grandin1-1/+1
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4 Reviewed-on: https://gerrit.libreoffice.org/40116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: helpcompilerStephan Bergmann1-4/+1
Change-Id: Ifd37b99b27d1bf25109c83a054b36c1da3825d84
2017-06-25loplugin:oncevar in helpcompiler..jvmfwkNoel Grandin1-1/+1
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03remove empty commentsNoel Grandin1-3/+0
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)Stephan Bergmann1-2/+4
Change-Id: If8085dc00db196eb51b6f14b4f4bac7c37dab249
2017-02-16convert HelpProcessingErrorClass to scoped enumNoel Grandin1-26/+26
and drop unused HELPPROCESSING_INTERNAL_ERROR enumerator Change-Id: I0f2cf063a3f1472e1d52bab5039b1c3158d4865e
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-2/+1
...(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-17new loplugin: useuniqueptr: helpcompiler..ioNoel Grandin1-3/+2
Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de Reviewed-on: https://gerrit.libreoffice.org/33165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10New loplugin:conststringvar: helpcompilerStephan Bergmann1-1/+1
Change-Id: Iaf9cedae10b9bc04353d175778ff68cb38fdb409
2017-01-06New loplugin:charrightshiftStephan Bergmann1-1/+1
Change-Id: Ib645fb11004bc0fe05c9c416ae72b0ae56c23a15
2016-09-16loplugin:singlevalfields in basic..idlNoel Grandin1-8/+0
Also fix obvious bug in the initialisation of the connectivity::odbc::OConnection::m_bClosed field. Probably closes some kind of connection leak there. Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82 Reviewed-on: https://gerrit.libreoffice.org/28932 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-04-28clang-tidy modernize-loop-convert in h-l/*Noel Grandin1-10/+9
Change-Id: I843528327b25d18476f8959cabba16371213a48a Reviewed-on: https://gerrit.libreoffice.org/24460 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-5/+5
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-01-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-12-08tdf#96042: 'std::string::find("something") == 0' means "startsWith()".Jan Holesovsky1-1/+1
This should fix a regression from 3bdd176731c351638f541a37b94094124f3c9f52, apparently the cppcheck's advice is misleading. Change-Id: I427ecaa1eb3c9841cb6112997b9b51feda4583d0
2015-11-30loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-20loplugin:unusedfields helpcompilerNoel Grandin1-6/+3
Change-Id: I8a4feaea642cf781fde54e4afc5cd98e326f8db3
2015-11-15cppcheck:stlIfStrFindNoel Grandin1-1/+1
"Inefficient usage of string::find() in condition; string::compare() would be faster." Change-Id: I90403b1d05eff6499c10be33068e5fd4fed30b62 Reviewed-on: https://gerrit.libreoffice.org/19966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-18/+18
Change-Id: I6e34abccb0bda1c76e30ab973b8fd827d6c99c72
2015-11-06coverity#1338235 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: I66bd63a75e9d75cb5d87be5e4573aec891994588
2015-09-30Fix typosAndrea Gelmini1-1/+1
Change-Id: Iab78219aff60a7a45a319a96f326e27a6e8e25b8 Reviewed-on: https://gerrit.libreoffice.org/18953 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-19boost->stdCaolán McNamara1-2/+1
Change-Id: I5079e03f70370ed83a1158b2e278f48642108f08 Reviewed-on: https://gerrit.libreoffice.org/18692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-28coverity#1308500 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: I38d6c03ee380ba6b3055e000f905a4cc568d5ab6
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe1-2/+2
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin1-2/+1
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-1/+1
Change-Id: Idca144969e2b978fee8cd5b0868fcf418b193967
2015-01-20Some more loplugin:cstylecast: helpcompilerStephan Bergmann1-2/+2
Change-Id: I9e094356601cf156537f75d0629fd214710d80e8
2015-01-07fdo#39440 reduce scope of local variablesŁukasz Hryniuk1-1/+1
Beside scope changes, it fixes lack of initialization in a few places. Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2 Reviewed-on: https://gerrit.libreoffice.org/13755 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-05Some loplugin:revisibility clean-upStephan Bergmann1-1/+1
Stumbled across such redundant visibility re-specifications when looking at the odd case of cppu_unsatisfied_iquery_msg declared CPPU_DLLPUBLIC in cppu/source/cppu/cppu_opt.cxx and used in inline code in include/com/sun/star/uno/Reference.hxx with only a declaration lacking CPPU_DLLPUBLIC visible, and wondering how that actually works on Windows. However, this plugin is probably not worth it being run all the time, so committing it to compilerplugins/clang/store/. Change-Id: Ibc3c4e7499213de1b419ce7eb85455cb832e1510
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara1-1/+1
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-17indent try-block, remove obsolete commentMichael Weghorn1-136/+135
indent block one level deeper than block in which it is contained Change-Id: Ibefd1a87c25100001f842f42f053d9e68feba8a6 Reviewed-on: https://gerrit.libreoffice.org/13498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-07-01New loplugin:stringconcatStephan Bergmann1-2/+1
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-06-17coverity#1223090 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Iec100b86e2952a5efe4fa52bd85fbc00b51f78c3
2014-04-17Avoid possible memory leaks in case of exceptionsTakeshi Abe1-6/+6
Change-Id: Ibadadacbe09a93e7d7a7210868c52a8fa582d427
2014-04-14typo: paramter -> parameterThomas Arnhold1-2/+2