91 Commits

Author SHA1 Message Date
Noel Grandin
8955c3fde6 loplugin:oncevar
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d
Reviewed-on: https://gerrit.libreoffice.org/30668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:11:51 +00:00
Eike Rathke
8e38964c32 move loplugin:defaultparams to store/
As per IRC 2016-11-04 12:21

Change-Id: Ic4cc7f67fb31be80a966c652cb30bb859f874a8b
2016-11-04 12:28:57 +01:00
Tor Lillqvist
3be8c4c2bb The badvectorinit plug-in probably can be retired
Let's hope it only catches false positives now.

noelgrandin agrees.

Change-Id: Ibd8310c31897aa6835bd6aaf90a49b5cd8f92948
2016-10-21 14:18:20 +03:00
Noel Grandin
40fd53a238 loplugins: extract some common functionality
Change-Id: If470e1d9b481c9eda0829aa985152baf8fb46d7a
2016-10-18 08:51:07 +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
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
fb21736979 Move loplugin:returnbyref to store
...it complains about

  SbxValues * data() { return &aData; }

(include/basic/sbxvar.hxx) returning by pointer rather than reference, but I see
nothing wrong with that.

Change-Id: I1e65ed47322d3b52d0e34a8233f146af86e209f3
2016-08-21 21:20:40 +02:00
Noel Grandin
602647c241 loplugin:unnecessaryvirtual
Change-Id: If25d9307efda5f57b0f80a0cf5c2c5cab6a752d6
Reviewed-on: https://gerrit.libreoffice.org/27981
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-08 13:06:58 +00:00
Stephan Bergmann
733198de1b Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
2016-06-29 09:15:25 +02:00
Stephan Bergmann
1ce7176ba1 Remove support for Clang < 3.3
Change-Id: I185852a738bac10dc6d331afccfcbc7ae1225cb1
2016-06-29 08:55:27 +02:00
Miklos Vajna
7ab4f31b6e compilerplugins: move oncevar into store
As suggested by Stephan and agreed by Noel -- as its warnings are not
useful in all cases.

Change-Id: I3c6034ae9d3c74aeb089a67dc48c1f91a3ea3a21
2016-06-23 09:44:19 +02:00
Andrea Gelmini
d3c96c9f82 Fix typos
Change-Id: Ic3efae53430fbb2c1eb7962c3cf69bf99315e55b
Reviewed-on: https://gerrit.libreoffice.org/26202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-13 06:04:07 +00:00
Bryan Quigley
71cf1aefca Remove unneeded Pane code in Presenter Console
This code hasn't been touched (on purpose) in years, it appears
to have been used to resize part of the console. (It's prefed off)

Change-Id: Iaaeaa8a95c71ae91299bbeeea24869bf2a237b6b
Reviewed-on: https://gerrit.libreoffice.org/24663
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-06 05:55:03 +00:00
Noel Grandin
2e2781d054 move stylepolice back to store
recent updates did not meet with universal approval

Change-Id: Ic059729797049361c7a8a4ae000cd39a5993f6af
2016-04-28 15:39:29 +02:00
Noel Grandin
e8fd5a07ec update loplugin stylepolice to check local pointers vars
are actually pointer vars.

Also convert from regex to normal code, so we can enable this
plugin all the time.

Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 10:55:58 +00:00
Noel Grandin
7b65087eab move stylepolice plugin into store/
seems std::regex is not too well supported yet, at least in
libstdc++-4.8

Change-Id: Ib9feb33d2f197d40fc67dc93468aa2f7dae05bac
2016-04-21 10:05:54 +02:00
Stephan Bergmann
dde79dd504 Rename OfficeIPCThread to RequestHandler
Change-Id: I2076d903e83a0b8eb3aa0ce2413630e2c5415b15
2016-03-29 14:54:20 +02:00
Wastack
9a13cff647 tdf#97966: Remove 'static' keywords
Change-Id: Id991cead4f01830eafd9cf8dd63b519ef07c9451
Reviewed-on: https://gerrit.libreoffice.org/23134
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11 08:57:51 +00:00
Maxim Monastirsky
21b92f386c MenuDispatcher::m_pMenuManager is always nullptr
... as shown by 7da15debe39b50255cc08b3fef7ae38185a9174f.
Which means that MenuManager is unused, and MenuDispatcher
does nothing useful.

Change-Id: Ic85619531054a573d971d38b52609e1cbcaf780c
Reviewed-on: https://gerrit.libreoffice.org/23117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-10 15:23:31 +00:00
Maxim Monastirsky
7affe26a12 Kill sfx2 menu support
Change-Id: I340a066881b1962a4bcd5a2b7d9a0425d8b9557c
2016-02-28 09:10:19 +02:00
Stephan Bergmann
75e24386af Missed CLANG_VERSION for compilerplugins/clang/store/rtlconstasciimacro.cxx
Change-Id: I24d2dc570070a55f39dcd708eb7c47cd71dc0d02
2016-02-26 14:46:23 +01:00
Stephan Bergmann
01f3b95884 These version checks are about the Clang the plugins are built /against/
...not the (Clang) compiler they are being built /with/.  (Also simplifies the
checking #if code.)

Change-Id: I416321be4ef4478785be40571f81500fd3b6feb8
2016-02-26 14:34:29 +01:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Stephan Bergmann
6bffbf100e Enable loplugin:nullptr
I had it locally enabled for like a month now, and it did not produce any more
noise than any of the other plugins.

Change-Id: I94dab702c537969cf32922f6e88b4f5b503cd3f5
2016-01-06 16:48:15 +01:00
Stephan Bergmann
593f3b703c Re-enable loplugin:sallogareas
I had it locally enabled for like a month now, and it did not produce any more
noise than any of the other plugins, but quite some amount of malformed area
designators had been introduced over time.

Change-Id: I642591496bb9338246ba43a3d988481930c087fb
2016-01-06 16:48:15 +01:00
Noel Grandin
00ea9e5e4e update constantfunction loplugin
Change-Id: I7917e5e17e88868a5e315bce11099d32a07ca39e
2015-12-15 10:40:50 +02:00
Stephan Bergmann
4a1edf626a More loplugin:nullptr automatic rewrite (within templates)
Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
2015-12-10 17:34:31 +01:00
Stephan Bergmann
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
Stephan Bergmann
b0339005b8 loplugin:sallogareas
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19 16:05:35 +01:00
Noel Grandin
d9e6270392 loplugin:unnecessaryvirtual
update the plugin with lessons learned from the mergeclasses plugin and
re-run it

Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711
Reviewed-on: https://gerrit.libreoffice.org/20015
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17 12:26:32 +00:00
Samuel Mehrbrodt
40fa83871e Move CommandInfoProvider to vcl and use it from there
Change-Id: If7e3ef81cad8974bc54f359096e3ecc700fa62d6
Reviewed-on: https://gerrit.libreoffice.org/19984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-16 14:48:47 +00:00
Samuel Mehrbrodt
099f1016fa Cleanup: Consolidate the different ways to get command labels/tooltips
Change-Id: Ieab809a3122c9d592894b84ec2e68195a4e02dde
2015-11-16 08:08:09 +01:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
986c495052 Missing isInLokIncludeFile check
Change-Id: I6577987f3f3717337e6607ffbe38397f229978f0
2015-11-10 11:26:03 +01:00
Stephan Bergmann
1cd6e2e08e Keep LibreOfficeKit.hxx compatible with C++03
Change-Id: Ic2f123c9b341dbb421b766c3bba1fc56c1bfb41d
2015-11-10 11:08:30 +01:00
Benjamin Ni
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
Noel Grandin
382eb1a23c remove untyped Link<>
Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b
Reviewed-on: https://gerrit.libreoffice.org/19491
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-21 07:44:43 +00:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Stephan Bergmann
f94d4952dc Commit loplugin:returnunique to store/, for reference
Change-Id: I359d8ab47276e5c801522251d5e141946d94ca5d
2015-10-06 12:44:37 +02:00
Noel Grandin
403c13487c loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 09:39:22 +00:00
Noel Grandin
56365c650c forgot to add this - the python file for the unnnecessaryvirtual
clang plugin

Change-Id: I1392ad1834dc590cec12e379d6478c42b1bbbc20
2015-06-09 10:08:10 +02:00
Noel Grandin
81b954718f loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.

Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
2015-06-09 10:06:57 +02:00
Noel Grandin
24600dcf31 loplugin:constantfunction
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
2015-05-22 09:59:46 +02:00
Tomaž Vajngerl
f1b0cf258d Move paint method rewriter to store
Change-Id: If2bbd355a293e0a0feed7db8f179a0bdcf6dce43
2015-04-29 11:21:47 +09:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
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
2015-04-15 11:47:12 +02:00
Noel Grandin
6aa542445f move the constantfunction plugin into /store
as sberg points out, it needs a massive blacklist, which is going
to be a pain to maintain. Until I can think of a way to make this
more resilient, move it where it can't bother people.

Change-Id: I64fc498146a3cb4ea9c1e37150c4ef50023b7bd5
2015-03-26 14:24:43 +02:00
Stephan Bergmann
a6f8766d35 loplugin:deletedspecial (Mac OS X)
Change-Id: Ia09e2e7b3e40bd04da64b52fe29258017b90b156
2015-02-07 17:24:43 +01:00
Stephan Bergmann
d2e9b222d7 loplugin:deletedspecial to help add SAL_DELETED_FUNCTION annotations
...to special member function declarations that were left undefined.  Helps
compilers do a better job at identifiying unused class members.  This plugin
uses heuristics and whitelists do identify applicable declarations, but is not
appropriate for "unattended" use so is placed into store/.

The following commits contain the results of running this plugin, per module:

* Declarations of undefined special member functions are mmarked
  SAL_DELETED_FUNCTION (aka "= delete", which is deemed superior to deriving the
  class from boost::noncopyable, cf. Howard Hinnant's reply to
  <http://stackoverflow.com/questions/7823990/what-are-the-advantages-of-boostnoncopyable>.

* Any redundant "explicit" or SAL_DLLPRIVATE markers are removed from the
  deleted definitions.

* Some redundant declarations of undefined default ctors are simply removed;
  smelled like clueless cargo-cult to have them declared at all.

* Some declarations of undefined operator == etc. are left in (and marked
  SAL_DELETED_FUNCTION) for now, to be on the safe side, though they are likely
  clueless cargo-cult, too.

* Most "static-only" classes are replaced with namespaces (and some where that
  would be non-trivial due to private members are marked TODO for later).

* Newly identified unused class members are removed.

Change-Id: Ibeaae4fd579d7a0971a2c2a654a2263acd13414a
2015-02-07 12:35:55 +01:00
Noel Grandin
414d84232d move these plugins into /store
we don't need to run them on an ongoing basis, and the current code
does not compile with older versions of clang.

Change-Id: I07ccacf7ff7b00e8e2453fff91a3f487dd5abed9
2015-01-26 09:39:18 +02:00
Stephan Bergmann
f569c4197c Improve loplugin:revisibility
(for non-Windows--only code, as MSVC would complain about such cases anyway)

Change-Id: Id6daf61b79bd31529bdaeb7c6df4f354731ae7d7
2015-01-05 17:25:51 +01:00