Commit Graph

406 Commits

Author SHA1 Message Date
Stephan Bergmann
9439844a79 New loplugin:dynexcspec: Add @throws documentation, vbahelper
Change-Id: I44f1c8f7f2ffdbd050ea219c6b89b246fcbd2473
2017-01-19 18:03:10 +01:00
Stephan Bergmann
3b2ec68686 New loplugin:externvar: vbahelper
Change-Id: Ic66aa797251b6de1d964dcd66ca1bd952c8c17d3
2017-01-09 15:40:05 +01:00
Julien Nabet
d911663f0f Typo: Acess->Access
Found thanks to Buovjaga

Change-Id: I73e36f50a1fd393859ba775ab084a488047864a3
Reviewed-on: https://gerrit.libreoffice.org/32810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-07 10:08:48 +00:00
Julien Nabet
471b58e190 Typo: Postion->Position
Found thanks to Buovjaga

Change-Id: Iacf09325cdb58e0dbdcc9bf0570b2e02ed275132
Reviewed-on: https://gerrit.libreoffice.org/32808
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-07 10:08:36 +00:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Stephan Bergmann
675df4a72e loplugin:unnecessaryoverride (dtors) in vbahelper
Change-Id: I809869a438b710b2c4722027cc78d39a81b0a092
2016-11-24 11:28:15 +01:00
Noel Grandin
78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +00:00
Noel Grandin
0f96b3f33f loplugin:unnecessaryvirtual in test..vbahelper
Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965
Reviewed-on: https://gerrit.libreoffice.org/30649
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 10:11:33 +00:00
Noel Grandin
04bfdc0a82 loplugin:oncevar in vbahelper..writerfilter
Change-Id: Ifd7e91753d9652d6b1c535cde3cddf74757a2483
Reviewed-on: https://gerrit.libreoffice.org/30430
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 10:03:00 +00:00
Noel Grandin
c5498c310f loplugin:expandablemethods in UnoControls..vbahelper
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6
Reviewed-on: https://gerrit.libreoffice.org/30262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-25 11:16:02 +00:00
Jochen Nitschke
7567a4c230 '>>=' with rhs Any is a copy assignment
replace '>>=' operator with '=' where return value is not checked
and simplify. (note: switches lhs with rhs)

Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8
Reviewed-on: https://gerrit.libreoffice.org/30004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 19:28:18 +00:00
Noel Grandin
98b77ad1e6 loplugin:expandablemethods in UnoControls..vbahelper
Change-Id: Iec2c5e13119d97c9ca87e083c0f7cb00227e5231
Reviewed-on: https://gerrit.libreoffice.org/29997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:24:23 +00: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
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "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
c158c00489 loplugin:constantparam in framework..vbahelper
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-09-07 10:04:44 +02:00
Stephan Bergmann
8f30da6386 Some clang-tidy misc-move-constructor-init
...by turning the relevant ctor parameters into "const &".

Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc
2016-08-19 16:55:06 +02:00
Caolán McNamara
4630157e29 cppcheck: passedByValue
Change-Id: I3ffcfe1294a1cbb06aadd3a1a79e9259876e38cc
2016-08-18 14:24:11 +01:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Noel Grandin
9870f02b31 loplugin:countusersofdefaultparams in tools..xmlsecurity
find methods with default params with only zero or one call site

Change-Id: Ie5b30f60e9fe00ba1acf0dfc79b005ded46f05a0
Reviewed-on: https://gerrit.libreoffice.org/27512
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:44:50 +00:00
Stephan Bergmann
e4d7ed0394 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I1d02b91f908c744dd3f7664cd453a791da7bd675
2016-07-07 18:59:55 +02:00
Noel Grandin
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00:00
Jorenz Paragas
cef14b816a tdf#42949: clean up includes in include/filter with iwyu
Change-Id: Id08a999764bfeeff3bb3409b46f48b278009ccbe
Reviewed-on: https://gerrit.libreoffice.org/26238
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-15 09:32:21 +00:00
Jorenz Paragas
1812a6467d tdf#42949: clean up includes in include/vbahelper with iwyu
Change-Id: Iaf93ff58229e9362b03b3e810611e969ef8baf38
Reviewed-on: https://gerrit.libreoffice.org/26206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-13 11:38:03 +00:00
Stephan Bergmann
b05ab09bcc Clean up uses of Any::getValue() in vbahelper
Change-Id: Ie86b1fa0fab5f640ebad9a7fa87266a9787b3118
2016-06-10 18:54:22 +02:00
Noel Grandin
74713b34a3 loplugin:unusedmethods
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda
Reviewed-on: https://gerrit.libreoffice.org/25431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:50:33 +00:00
Noel Grandin
f107d45381 Convert SbxClassType to scoped enum
Change-Id: I48afcdd9924d22b52a8db21aa253061e4d38c85b
Reviewed-on: https://gerrit.libreoffice.org/25259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23 11:49:32 +00:00
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Andrea Gelmini
931b6a1537 Fix typos in code
Change-Id: I408f630732a10567a3352e0c96f1289a1cf6ca81
Reviewed-on: https://gerrit.libreoffice.org/24534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-01 09:53:04 +00: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
Stephan Bergmann
9181f09e28 Avoid reserved identifier
Change-Id: Iefea30eb0db96462aee87349968baf4756e1b786
2016-04-22 10:20:32 +02:00
Noel Grandin
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
d0a271e9ea loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I94b3d976bd6d4cd3ce918668a5a921857675b6c9
2016-04-20 17:27:30 +02:00
Noel Grandin
f34cc90df9 loplugin:passstuffbyref in vbahelper
Change-Id: I09e6ea5cbab5b06dd284a096503b19c15b2136ce
2016-04-14 09:21:39 +02:00
Jochen Nitschke
97abbec956 tdf#94306 replace boost::noncopyable in stoc to xmlsec..
Replace with C++11 delete copy-constructur
and copy-assignment.
Remove boost/noncopyable.hpp includes.
Add missing default ctors.

With this commit there should be no users
of boost::noncopyable left.

Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975
Reviewed-on: https://gerrit.libreoffice.org/24051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13 11:19:04 +00:00
Noel Grandin
2c93d340ae clang-tidy performance-unnecessary-value-param in vbahelper
Change-Id: Ifbe78c4a43b9d77d6ecf481bb1a9aaac6bcd01a6
2016-04-11 15:12:11 +02:00
tymyjan
c20cc7e79b tdf#97499 Fixed containers parameters clearing #4
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04 05:49:06 +00:00
Noel Grandin
6439005484 use SAL_N_ELEMENTS more widely
found using
   git grep -n 'sizeof.*/.*sizeof.*[0]'

Change-Id: Icd4a6cc1ca8ec8ebd68e1701a02789c74cf0eb2a
2016-03-31 11:30:36 +02:00
Noel Grandin
236f308917 loplugin:unuseddefaultparam in include/vbahelper
Change-Id: Idac2134dce40a54cc04f595464357a0f9ca71be0
2016-02-26 13:21:20 +02:00
Noel Grandin
692f142080 loplugin:unuseddefaultparam, ApplyChange->ApplyTempChange
to make it clear what it's doing, now that I have dropped the param

Change-Id: I9fb8bb0f218aa1b01d9ba357e75af35f067625ed
2016-02-26 10:59:39 +02: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
Noel Grandin
5b5f3ccdbb loplugin:unusedmethods unused return value in vbahelper/
Change-Id: I654f1b2d3a488e147acdeb790ce9a9ff3dde61f1
2016-01-13 12:16:24 +02:00
Noel Grandin
3faf5fd9ee loplugin:unusedfields vbahelper
Change-Id: I5fbe892077697111514767552ef0b4bc88d1a701
2015-12-21 12:45:50 +02:00
Stephan Bergmann
b8793748b0 Seems more natural to pass a homogenous list by initializer_list
...than by template parameter pack (even if that requires using ServiceDecl*, as
initializer_list cannot take reference types)

Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-20 13:39:52 +01:00
Noel Grandin
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
Noel Grandin
89ac4f6255 com::sun::star->css in vbahelper/
Change-Id: I7ab89b01cf6817b365a02e73d4635dfdb5b40440
Reviewed-on: https://gerrit.libreoffice.org/20022
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18 06:51:09 +00:00
Noel Grandin
dfb3be7e15 use unique_ptr for pImpl in vcl,vbahelper,uui
Change-Id: Icb7573c24c681a8fc0570d61b6a30dab91378eb8
2015-11-17 10:59:47 +02:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann
45979047ab loplugin:nullptr (automatic rewrite)
Change-Id: I6eb8949e3e14d82b52af9a2ba26d67bf1bd8e1a5
2015-11-10 10:31:59 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00