1947 Commits

Author SHA1 Message Date
Stephan Bergmann
3cc5149a84 Avoid -Werror=deprecated-declarations with recent Clang trunk
...which first added alternative names to and then deprecated getLocBegin/End

Change-Id: Iaefb8ce259057abfa6cd20f0b63c0ef2949a96b2
Reviewed-on: https://gerrit.libreoffice.org/58820
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-10 15:14:03 +02:00
Noel Grandin
f4fb14ed79 loplugin:unusedmethods
Change-Id: I0308ddd467ab6e283c0503f98885a248eb28290c
Reviewed-on: https://gerrit.libreoffice.org/58738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-09 14:17:08 +02:00
Noel Grandin
8536b96ab7 loplugin:singlevalfields
Change-Id: I75554209ad247173381ea96a14c8bf532bed13a8
Reviewed-on: https://gerrit.libreoffice.org/58724
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-08 19:57:01 +02:00
Noel Grandin
1444bd7200 loplugin:unnecessaryvirtual
Change-Id: I3fe82f6e3aad299fe42d6256c0deaba1339df0c1
Reviewed-on: https://gerrit.libreoffice.org/58708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-08 09:30:45 +02:00
Noel Grandin
c83a807166 loplugin:unusedfields
Change-Id: I9ae44279f1cce06bd6868005fbb878ba4894aed7
Reviewed-on: https://gerrit.libreoffice.org/58706
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-08 09:30:23 +02:00
Noel Grandin
d5415561e3 loplugin:stringloop in various
Change-Id: Ia400e67108e622ae63a8d59667eae96c858f22dc
Reviewed-on: https://gerrit.libreoffice.org/58463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02 10:13:12 +02:00
Noel Grandin
f2fb91390c loplugin:unnecessaryoverride small improvement
when we have two definitions of the same method in a straight
inheritance path up our hierarchy, we were missing a warning

Change-Id: Ibc0f11644c7321a0d5618024860c2503665d8835
Reviewed-on: https://gerrit.libreoffice.org/58354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31 14:59:31 +02:00
Noel Grandin
cfe896e7b8 loplugin:useuniqueptr in SwGrfExtPage
Change-Id: Ic71cf09b6a443f6918b074010fe53ea0843bf246
Reviewed-on: https://gerrit.libreoffice.org/58238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30 08:21:01 +02:00
Stephan Bergmann
446f172057 Prevent loplugin:unreffun on explicitly defaulted special members
...as started to appear (with sufficiently recent Clang versions only, it
appears) after c5fcb476ac8eab18152a7f6d0487daa56231fcf8 "toolkit: avoid
-Werror=deprecated-copy (GCC trunk towards GCC 9)":

> [CXX] toolkit/source/controls/spinningprogress.cxx
> toolkit/source/controls/spinningprogress.cxx:38:5: error: Unreferenced externally invisible function definition [loplugin:unreffun]
>     SpinningProgressControlModel(SpinningProgressControlModel &&) = default;
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Id78cd2d801e9760dde9e0a594e2b62ec20840204
Reviewed-on: https://gerrit.libreoffice.org/58180
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-28 00:18:41 +02:00
Noel Grandin
c8fa03b1f5 new loplugin:stringloop, and applied in various
look for OUString being appended to in a loop, better to use
OUStringBuffer to accumulate the results.

Change-Id: Ia36e06e2781a7c546ce9cbad62727aa4c5f10c4b
Reviewed-on: https://gerrit.libreoffice.org/58092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27 11:15:46 +02:00
Noel Grandin
e953ce16d2 fix warning towards clang7
warning: binding reference member 'n1_' to stack allocated parameter
'n1'

Change-Id: Ifa4c1520453e00d6fc35411fa0edbf2bf2b42708
2018-07-26 09:37:35 +02:00
Stephan Bergmann
07ad18ed6d Silence loplugin:staticaccess in Windows ATL macros (clang-cl)
Change-Id: I18cde30e132b8209d189e9438b49a1c3e5a36672
Reviewed-on: https://gerrit.libreoffice.org/57997
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26 08:45:51 +02:00
Noel Grandin
fdc50b0a1b new loplugin:returnconstant
look for methods that always return the same value

Change-Id: I5f1c5b58a985ecf5f7765a2d4ebd464eae5ef76f
Reviewed-on: https://gerrit.libreoffice.org/57973
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-25 15:17:31 +02:00
Noel Grandin
8a592a5c6a loplugin:useuniqueptr in rptui::Condition
Change-Id: I1197be1f7ea8b621dedef41fdd0a664cb6d90374
Reviewed-on: https://gerrit.libreoffice.org/57879
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-24 10:48:08 +02:00
Noel Grandin
4089e1d9f6 loplugin:useuniqueptr fix check for DELETEZ inside compound stmt
Change-Id: Id748b8b0c9cfe8c288dfafb5d0c2a83a8de2c91c
Reviewed-on: https://gerrit.libreoffice.org/57871
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-24 08:34:32 +02:00
Noel Grandin
dba5dccfc5 loplugin:useuniqueptr in SwHTMLWriter
Change-Id: I67f3dd615e798f8ac865b57332f6153530d81929
Reviewed-on: https://gerrit.libreoffice.org/57863
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-24 08:32:56 +02:00
Noel Grandin
110a25fdc2 loplugin:unusedfields
Change-Id: I1827262ad95942cacff589929f9436f8383cf142
Reviewed-on: https://gerrit.libreoffice.org/57642
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23 09:55:40 +02:00
Noel Grandin
a98d071d32 loplugin:useuniqueptr in HTMLTable
Change-Id: I46ece073659444e802bf480996a5797c9f1ec9e8
Reviewed-on: https://gerrit.libreoffice.org/57754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20 15:24:27 +02:00
Noel Grandin
12dce07aec loplugin:unusedfields - look for fields that can be const, in comphelper
idea from tml.

Extend the unusedfields plugin to find fields that are only assigned in
the constructor.

Change-Id: I258d3581afbe651d53ce730c9ba27a4598cd9248
Reviewed-on: https://gerrit.libreoffice.org/57733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20 14:12:57 +02:00
Noel Grandin
82a2a8f29e loplugin:useuniqueptr in XclObj
Change-Id: I2995dfe5fb39ae2e7f3c37992cb3e2147381784e
Reviewed-on: https://gerrit.libreoffice.org/57753
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-20 09:00:02 +02:00
Andrea Gelmini
ad1fb1c3df Fix typos
Change-Id: I7d12fe95d1c65a431325273c6e95943166e2ec58
Reviewed-on: https://gerrit.libreoffice.org/56941
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-19 14:01:01 +02:00
Noel Grandin
8a939de0e1 loplugin:useuniqueptr in SwUndoTableMerge
Change-Id: I0c528c2b12d219f37a2c2fdf2211fce3c51ad9e4
Reviewed-on: https://gerrit.libreoffice.org/57688
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19 08:13:50 +02:00
Noel Grandin
e69da79dc0 loplugin:constantparam
Change-Id: I8e2e9009f0a70d2fa390e03688a988ac935d5f36
Reviewed-on: https://gerrit.libreoffice.org/57643
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-19 08:09:41 +02:00
Noel Grandin
4c2d0b0d85 loplugin:useuniqueptr in ScTabView
Change-Id: Ic506f5d350abbbbb5912e3ebf753e02821c76841
Reviewed-on: https://gerrit.libreoffice.org/57523
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17 14:03:19 +02:00
Noel Grandin
011c6c719f loplugin:useuniqueptr in SwHTMLWriter
Change-Id: I4802e6502addce96bff4831598e852e4fe673af4
Reviewed-on: https://gerrit.libreoffice.org/57521
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17 12:19:14 +02:00
Markus Mohrhard
026e2623f7 remove the GL based 3D charts
Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9
Reviewed-on: https://gerrit.libreoffice.org/57533
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-07-17 02:59:19 +02:00
Noel Grandin
9882778b83 loplugin:mergeclasses update results output
Change-Id: Id1138cf7358c610aff77b7d7073c61cd3f13129c
Reviewed-on: https://gerrit.libreoffice.org/57485
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-16 13:49:35 +02:00
Noel Grandin
e7a252166e loplugin:useuniqueptr in UndoTransliterate_Data
Change-Id: I1c6e865a6f59ce7f31c42d28b2b463a577b3cc28
Reviewed-on: https://gerrit.libreoffice.org/57421
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-16 08:38:38 +02:00
Noel Grandin
dbf8ad9bc3 loplugin:useuniqueptr in SbUnoStructRefObject
now that we have upgraded to VS2017, we can use std::unique_ptr in
std::map

Change-Id: Id01af07ccae7447405b8f0bc44b08043f453e54b
Reviewed-on: https://gerrit.libreoffice.org/57384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-13 11:58:10 +02:00
Noel Grandin
c75f597722 loplugin:useuniqueptr in SwGrammarContact
Change-Id: I1e6a2ca8f00d6130cfa6d2c18139bf61ada10630
Reviewed-on: https://gerrit.libreoffice.org/57363
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-13 08:40:54 +02:00
Noel Grandin
85cf4d25a3 loplugin:mergeclasses fix ignoring some stuff
Seems that calling getCanonicalDecl here results in us sometimes picking
up forward-decl's, which hides stuff

Also make the python processing code spit out a message if I manage to
mess up the log files

Change-Id: I08bf50eb26cf463c126507b51535b0a0fc9f7ecf
2018-07-12 12:41:01 +02:00
Gabor Kelemen
7af90cc93b Add missing sal/log.hxx headers
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>
2018-07-09 10:49:06 +02:00
Michael Stahl
ff002524c1 compilerplugins: try to make these work with icecream
There are some problems here, this should fix one of them: the
getFilename function returns "<stdin>" for spelling locations, because
the input to clang is sort of preprocessed via -frewrite-includes if
icecream is used and the file is built on a remote host (whereas it's
apparently not preprocessed if the file is compiled locally by icecream).

Using getPresumedLoc() uses the #line directives in the preprocessed
input, which avoids the problem but is more expensive, so try to use it
only when necessary.

The getFileEntry(getMainFileID())->getName() pattern will also result
in "<stdin>", but fortunately icecream passes -main-file-name,
which oddly enough isn't used by the SourceManager's spelling locations,
but is available separately via CodeGenOptions.

This builds everything successfully with clang version 6.0.0:
ICECC_PREFERRED_HOST=myremote make check gb_SUPPRESS_TESTS=t

Change-Id: Ic121511683e5302d7b9d85186c8b9c4a5443fa1b
Reviewed-on: https://gerrit.libreoffice.org/54993
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-07-06 14:12:58 +02:00
Noel Grandin
38733c7daa loplugin:useuniqueptr in ScSimpleEditSourceHelper
Change-Id: Iebe62753d9e6f83f985e4c55fb938d5861613898
Reviewed-on: https://gerrit.libreoffice.org/56903
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-04 08:35:22 +02:00
Stephan Bergmann
f47b3f63b3 Adapt compilerplugins/clang/store/deletedspecial.cxx
...to 322083e0cf1268bc5d40f0d49eb50f00f503ef15 "ScFormEditData copy functions
can be deleted"

Change-Id: Ic62c83b79e70a79d1d236b79140009a4212b6a43
Reviewed-on: https://gerrit.libreoffice.org/56878
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-03 23:36:35 +02:00
Noel Grandin
7c610a2a74 loplugin:constantparam
Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5
Reviewed-on: https://gerrit.libreoffice.org/56778
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02 10:30:49 +02:00
Noel Grandin
f54143088a loplugin:unusedmethods
Change-Id: I92665f577bfe39497905063da517a05b8008c3cc
Reviewed-on: https://gerrit.libreoffice.org/56743
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02 08:48:10 +02:00
Noel Grandin
d98f1e4e03 loplugin:unusedfields improve checking for write-only fields
we trade off a little accuracy for finding more possible write-only
fields.

Change-Id: I9f7edba99481fe4ded0a9d8e45e911b0ee99d269
Reviewed-on: https://gerrit.libreoffice.org/56715
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02 08:47:48 +02:00
Stephan Bergmann
15e51fbc57 Improved loplugin:redundantcast (const-qualified typedefs)
...see comments to <https://gerrit.libreoffice.org/#/c/56661/> "This cast seems
completely unnecessary to me?"

Change-Id: I57d27cd2aa2dc94bc2e0b49fe06a09d31301cb7e
Reviewed-on: https://gerrit.libreoffice.org/56708
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-29 23:41:00 +02:00
Noel Grandin
35c165e46a loplugin:useuniqueptr in SwTextAPIObject
Change-Id: Ied235aefe2cc2ce5e88487503c17e1a54d25ac52
Reviewed-on: https://gerrit.libreoffice.org/56624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29 08:40:31 +02:00
Noel Grandin
bf82016b20 loplugin:useuniqueptr in SwDoc
Change-Id: Ic895c7b79a25a0766cc6d352c5ed75873004fddb
Reviewed-on: https://gerrit.libreoffice.org/56496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-27 08:34:48 +02:00
Noel Grandin
200ca38824 teach useuniqueptr loplugin about calling delete on a param
which is often a useful indicator that the callers can be made to use
std::unique_ptr

Change-Id: Idb1745d1f58dbcf389c9f60f1a5728d7d092ade5
Reviewed-on: https://gerrit.libreoffice.org/56238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-22 20:11:50 +02:00
Noel Grandin
c37077578d loplugin:unusedfields
Change-Id: I7d9966d11f8272034523d9804ecf76e119552780
Reviewed-on: https://gerrit.libreoffice.org/55796
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-14 21:57:20 +02:00
Noel Grandin
e23363f51e loplugin:unusedmethods
Change-Id: Ibd9f4757ec26da7acc645f33573ace3280e84834
Reviewed-on: https://gerrit.libreoffice.org/55788
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-14 15:32:25 +02:00
Noel Grandin
1c3ffcdd4e loplugin:constantparam
Change-Id: Ia769b3176aea287cd57414d7ce8e88c6da43883e
Reviewed-on: https://gerrit.libreoffice.org/55622
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12 08:24:45 +02:00
Noel Grandin
48ca5005ec loplugin:singlevalfields
Change-Id: I1ea854982e042bccc7e5f531802cf1016c81b488
Reviewed-on: https://gerrit.libreoffice.org/55615
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12 08:24:24 +02:00
Noel Grandin
a75cc6348c loplugin:unusedfields
Change-Id: I42a55562747e6097c1193e285da67235f5364bea
Reviewed-on: https://gerrit.libreoffice.org/55610
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 21:31:48 +02:00
Noel Grandin
d4d0376196 loplugin:unusedmethods
Change-Id: I26a0da1ec9cda9030371977596053a45303756a0
Reviewed-on: https://gerrit.libreoffice.org/55609
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 14:38:37 +02:00
Noel Grandin
1f08bff312 new loplugin:shouldreturnbool
look for methods returning only 1 and/or 0, which (most of the time)
should be returning bool.

Off by default, because some of this is a matter of taste

Change-Id: Ib17782e629888255196e89d4a178618a9612a0de
Reviewed-on: https://gerrit.libreoffice.org/54379
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 11:38:15 +02:00
Noel Grandin
ff130af966 loplugin:unnecessaryvirtual
Change-Id: I2ff0f1fff7302cbf884e35879c72df0dc09eede4
Reviewed-on: https://gerrit.libreoffice.org/55597
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11 10:45:41 +02:00