802 Commits

Author SHA1 Message Date
Noel Grandin
2a504a24e4 loplugin:mergeclasse merge ScCbWarningBox with ScReplaceWarnBo
Change-Id: I7b55b036c1992b88b01b51053a3560e9f97986c9
2016-10-14 08:17:50 +02:00
Noel Grandin
a7e395f397 loplugin:mergeclasses ImplEESdrWriter with ImplEscherExSdr
Change-Id: Iea2241d9fc44b92e18101b3f367a643f03729183
2016-10-13 13:31:28 +02:00
Noel Grandin
62223f9a8a loplugin:unnecessaryoverride
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae
Reviewed-on: https://gerrit.libreoffice.org/29656
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 06:47:44 +00:00
Stephan Bergmann
da95ad47af typo
Change-Id: Iea55eee0e5e777e46bb02435f10bca03e554a15c
2016-10-12 08:49:35 +02:00
Noel Grandin
ed89525967 improve error message in refcounting plugin
Change-Id: I02b483c1d696913b33112b9248747f9c3d28dc55
2016-10-12 08:44:50 +02:00
Noel Grandin
5c84f40ea2 loplugin:constantfunction
update the plugin similarly to
    commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970
    Author: Stephan Bergmann <sbergman@redhat.com>
    Date:   Fri Oct 7 12:05:49 2016 +0200
    loplugin:staticmethods: Don't be fooled by decls starting with macros

Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510
Reviewed-on: https://gerrit.libreoffice.org/29665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-11 06:15:21 +00:00
Stephan Bergmann
1dac51334b Handle loplugin:fpcomparison false positives by whitelist
Change-Id: I58e2beb0695a27922856bd8f8988d9e4508aceb6
2016-10-10 13:10:48 +02:00
Stephan Bergmann
e492d7bcd1 loplugin:fpcomparison, macOS redux
Change-Id: Ie41be540209b4af7c0571f7c16bedd0665daff10
2016-10-09 16:23:49 +02:00
Stephan Bergmann
995318e299 loplugin:badstatics: reliably look into std container types
Change-Id: Ifca7325533e3f7d5ce5c59cc6b14d4232d4fc792
Reviewed-on: https://gerrit.libreoffice.org/29614
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-09 07:40:55 +00:00
Stephan Bergmann
160478912a loplugin:badstatics
ScAddInListener has a member

  ScAddInDocs* pDocs; // documents where this is used

where ScAddInDocs is set<ScDocument*>, and ScDocument has a memmber

  VclPtr<SfxPrinter>    pPrinter;

so that's only a chain of (apparently non-owning) pointers.

Change-Id: I050218320eb2c588dcfaee80225f4e45a515ed32
Reviewed-on: https://gerrit.libreoffice.org/29613
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-09 07:40:09 +00:00
Stephan Bergmann
3ee3b36ae0 loplugin:staticmethods: Don't be fooled by decls starting with macros
...like SAL_DLLPRIVATE coming from UNO include files.

Change-Id: I9eb64c96b7e9e2a3742a166cedcf635d98fe65a0
2016-10-07 12:07:43 +02:00
Stephan Bergmann
f1cb6a031e loplugin:staticmethods: sw
Change-Id: I2b06eb926ebc8ab04883da3272ea239a12e09436
2016-10-07 12:07:43 +02:00
Stephan Bergmann
b8711a1383 loplugin:nullptr: remove duplicate warnings
Change-Id: I859d9ac8f7e4134bdac59b39e95eb563d1291e8b
2016-10-07 10:38:06 +02:00
Stephan Bergmann
e03499917e loplugin:fpcomparison: also look into member functions
By accident, the plugin had only looked into non-member functions until now.
However, for the vast majority of newly found cases, it is unclear to me whether
the relevant code needs fixing or not, so I put all those into a giant whitelist
for now.  Maybe the plugin's sginal/noise ration just isn't worth it, anyway.

Change-Id: I7997a0ebdb4211af208285611656a40ead97d935
2016-10-06 16:55:45 +02:00
Noel Grandin
c1e18e05a5 merge dbaccess::StorageInputStream with dbaccess::StorageXMLInputStream
Change-Id: I05b54b8a2fe4ff0c8b9f89e3d29e864e8665b7b8
Reviewed-on: https://gerrit.libreoffice.org/29519
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:42:05 +00:00
Noel Grandin
ac9373e65e merge sd::FuOutline with sd::FuOutlineText
Change-Id: Ie8191ac91175ba51f89809aaa53bc1ffacf42df0
Reviewed-on: https://gerrit.libreoffice.org/29520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04 12:19:10 +00:00
Noel Grandin
bd89dff261 loplugin:mergeclasses various fixes
better tracking of templates, ignore more noise in the plugin so the
python has less log to process

Change-Id: I62874236d362529bd566140ac3fcc65e734fd62c
2016-10-04 09:30:37 +02:00
Andrea Gelmini
8f9af8dd97 Fix typos
Change-Id: Ie44267e7c9f92eb1920f05235826abff761251f1
Reviewed-on: https://gerrit.libreoffice.org/29430
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-03 13:43:44 +00:00
Andrea Gelmini
c0bcdde2a0 Fix typos
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c
Reviewed-on: https://gerrit.libreoffice.org/29442
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 20:10:06 +00:00
Andrea Gelmini
943919692e Fix typos
Change-Id: I8374d6d08f4eb4ae2821e213371c615b92d7e9ab
Reviewed-on: https://gerrit.libreoffice.org/29432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 19:02:02 +00:00
Noel Grandin
4481158f63 unuseddefaultparams plugin has been superceded
by the countusersofdefaultparams plugin

Change-Id: I79cdc4cf884deea212ee76e1436f07696ff49f44
2016-09-30 09:41:03 +02:00
Noel Grandin
4d87443bf5 loplugin:constantparam
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c
Reviewed-on: https://gerrit.libreoffice.org/29321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30 06:57:26 +00:00
Noel Grandin
3468dab9ff clang plugins: do "dotdot" normalisation
which fixes some false positives

Change-Id: I555349180b5ca819f29695789f1545ba2177bd09
Reviewed-on: https://gerrit.libreoffice.org/29320
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-27 12:08:52 +00:00
Noel Grandin
7419057e3e loplugin:unusedmethods in chart2..svx
Change-Id: Ifb6045885049733415895f58cdd911256f48323c
Reviewed-on: https://gerrit.libreoffice.org/29187
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 18:57:43 +00:00
Noel Grandin
c4cd079b8f loplugin:unusedmethods in sc..vcl
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8
Reviewed-on: https://gerrit.libreoffice.org/29183
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 18:56:58 +00:00
Noel Grandin
1c15a20df8 loplugin:unusedmethods unused returns
Change-Id: I4da3374e31d3c7407b401d66275da7f56ae83d30
Reviewed-on: https://gerrit.libreoffice.org/29178
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 13:13:05 +00:00
Noel Grandin
fd22e36ff5 loplugin:unnecessaryvirtual
Change-Id: I7b1aa65a557f3855939ad8b183bba8ff656946f8
Reviewed-on: https://gerrit.libreoffice.org/29173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 12:44:50 +00:00
Stephan Bergmann
4c70a1a666 Check harder whether file is really under WORKDIR
1977b57bc9aaea71252358fa502110c348153c70 "vcl: loplugin:override" had only hit
in out-of-tree builds, where the #include in the generated
workdir/CustomTarget/vcl/unx/kde4/tst_exclude_socket_notifiers.moc is an
absolute path.  For in-tree builds, the generated #include line is
"../../../../../vcl/unx/kde4/tst_exclude_socket_notifiers.hxx", so the returned
getFileName() is .../workdir/../../../../../vcl/..., so was erroneously
considered to be under WORKDIR.

Change-Id: I9abef04b90ecb4921087a53ff196b833940085e5
2016-09-22 08:50:43 +02:00
Noel Grandin
b18e1bc61c loplugin:unusedfields
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24
Reviewed-on: https://gerrit.libreoffice.org/29078
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-20 10:45:14 +00:00
Stephan Bergmann
075489b4b8 Adapt loplugin:dllprivate to DISABLE_DYNLOADING
Change-Id: I721cfeaa144c773ead457e1c9138009d4071a06a
2016-09-20 10:31:21 +02:00
Noel Grandin
1658bd231b loplugin:unusedenumvalues
Change-Id: I9dcc9f73af6db5b4f7cc946bc28931e5c230b34c
Reviewed-on: https://gerrit.libreoffice.org/29012
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-19 10:44:05 +00:00
Noel Grandin
e592877844 loplugin:unusedenumvalues
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b
Reviewed-on: https://gerrit.libreoffice.org/28942
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-18 11:02:45 +00:00
Noel Grandin
a2b77b4368 loplugin:singlevalfields in basic..idl
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-09-16 08:30:26 +00:00
Noel Grandin
96e9ffa647 loplogin:singlevalfields in include/
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc
Reviewed-on: https://gerrit.libreoffice.org/28931
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 06:19:38 +00:00
Noel Grandin
309b65a092 Some of our supported compilers don't do constexpr, which means
o3tl::typed_flags can't be 'static const'

Change-Id: Ia2e40353f7a1b9e66617fa42f9eed6213f9e2d62
2016-09-15 13:02:24 +02:00
Noel Grandin
27be818190 loplugin:singlevalfields in l10ntools..sax
and ignore URE headers in the plugin

Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588
2016-09-15 13:02:24 +02:00
Noel Grandin
3b48b3cc92 loplugin:singlevalfields in sc..vcl
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
2016-09-15 11:30:42 +02:00
Noel Grandin
c3c4ae5fda use split() to simplify loplugin python code
Change-Id: Ib6d7acf54ca6c12a3b096435f8a621244df88b4f
2016-09-15 08:51:14 +02:00
Noel Grandin
6df2c90c08 loplugin:countusersofdefaultparams in vcl
Change-Id: I046e6f16c5b171a06e2be2da2f72340634f3e979
Reviewed-on: https://gerrit.libreoffice.org/28891
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15 06:35:33 +00:00
Noel Grandin
20a9e101d9 loplugin:constantparam
clean up the plugin a little, and try to catch params which are default
constructed, which doesn't seem to be working yet

Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12
Reviewed-on: https://gerrit.libreoffice.org/28861
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 08:47:06 +00:00
Stephan Bergmann
a53808c0ed loplugin:dllprivate
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13 22:26:22 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
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
2016-09-13 13:19:22 +02:00
Noel Grandin
25e4e9694c handle nullptr in various clang plugins
since we are using it so widely now, instead of NULL

Change-Id: I990ff1334f657663e8791ab064d69e56636fe6e7
2016-09-12 08:22:03 +02:00
Noel Grandin
b1164b07f9 loplugin:constantparam in sd
Change-Id: I2bc989802c12b379a1ba4202f54ecfef1f339c8c
Reviewed-on: https://gerrit.libreoffice.org/28774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-10 11:28:16 +00:00
Stephan Bergmann
31dc693029 loplugin:refcounting: No more special-handling of SvXMLImportContext
...after 32ccb4ea863651c22bf33cc15012971d2a2d2810 "resolve the snafu with 2
separate refcounted bases"

Change-Id: Iaf13deb0b83b6dfe1a2cf3863e07cf042c8e4f47
2016-09-09 09:46:39 +02:00
Noel Grandin
d2143eacaf teach loplugin constantparam about default param values
Change-Id: I334622bd34d8349f5b3988122d282b1062b225bb
2016-09-06 12:59:13 +02:00
Noel Grandin
d69066115c improve loplugin:countusersofdefaultparams to check constructors
and their call sites

Change-Id: Ie068cfe2a8f7c3887d38f186a5e91b0cfdcad236
2016-09-06 12:56:45 +02:00
Maxim Monastirsky
671ac3a922 Looks like the menu highlight handler is now unused
Change-Id: I75ff4bce35e7940e07b760f672e08ffe0dd208f8
Reviewed-on: https://gerrit.libreoffice.org/28580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-09-01 09:39:52 +00:00
Stephan Bergmann
c5d8cb41a5 loplugin:stringconstant: adapt to improved OUStringLiteral1
Change-Id: I5c9bfbb97f0eabe1ea691faf522d22070243d234
2016-08-30 15:30:36 +02:00
Stephan Bergmann
bdd60f1f5e Adapt loplugin:stringconstant to improved OUStringLiteral1
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0
Reviewed-on: https://gerrit.libreoffice.org/28447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29 11:44:44 +00:00