0a840edcc1
includes should be at the top of the file
...
not randomly scattered through the code
found with something like:
git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include"
Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351
Reviewed-on: https://gerrit.libreoffice.org/30952
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-11-18 09:25:06 +00:00
7cca2c7fb3
new loplugin finalprotected
...
look for final classes, and make sure they don't have protected members
Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-11-16 09:10:16 +00:00
1ba4bb6397
loplugin:countusersofdefaultparams in editeng..rsc
...
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-11 12:12:22 +02:00
1a743fd8a2
loplugin:expandablemethods in hwpfilter..linguistic
...
Change-Id: I62ae20ab4a47b3b7e2b0d503cedcad3319cc9c85
Reviewed-on: https://gerrit.libreoffice.org/30683
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-11-08 08:41:38 +00:00
990102be61
loplugin:unnecessaryvirtual in hwpfilter..rsc
...
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-11-08 06:10:25 +00:00
877774c057
loplugin:expandablemethodds in hwpfilter..linguistic
...
Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5
Reviewed-on: https://gerrit.libreoffice.org/30016
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-10-19 08:07:18 +00:00
a217e0d012
clang-cl loplugin: hwpfilter
...
Change-Id: I63677cea6ee2cec0589bd853ca9b135931df63d4
Reviewed-on: https://gerrit.libreoffice.org/29863
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-10-16 14:19:09 +00:00
6adebd2b2b
remove define 'local'
...
Change-Id: I7b8ff60a25a5b835b7a2893befeb82b424bbcd2c
Reviewed-on: https://gerrit.libreoffice.org/29354
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
2016-09-28 16:53:57 +00:00
b755094c83
No need for an abstaract HIODev::close
...
...that was only called from dtors anyway, where its virtual-ness doesn't
actually help (and would trigger loplugin:fragiledestructor if that were
enabled)
Change-Id: I477a22f2cadd1124b7106c5338e525629968a284
2016-09-16 09:13:53 +02:00
b647996a9b
replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
...
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.
Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
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
dbe0b5aa9d
loplugin:countusersofdefaultparams in framework..lotuswordpro
...
Change-Id: I9833d85eb6543e996b0f357657c53b1c076ecde4
Reviewed-on: https://gerrit.libreoffice.org/27898
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-08-05 11:51:28 +00:00
2cdc693c56
Remove __cplusplus-checks from apparently-C++-only files
...
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-07-13 14:54:14 +00:00
f541b99855
loplugin:nullptr: Better heuristic to determine code shared between C and C++
...
Change-Id: I51e1c5fa4639e51fac90f92adf3d87d12960d589
2016-07-11 14:32:07 +02:00
a2b2b7b07e
loplugin:passstuffbyref also for {css::uno,rtl}::Reference
...
Change-Id: Ic7827a5bb9afe04e76336e98e66483eabcaa9dde
2016-07-07 18:59:55 +02:00
42486dde49
move #includes to top of file
...
instead of being randomly embedded somewhere deep inside the CXX code.
Found with:
git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t :
Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a
Reviewed-on: https://gerrit.libreoffice.org/26764
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-06-29 14:49:19 +00:00
6247ff3fed
loplugin:singlevalfields in hwpfilter
...
Change-Id: I53adaca40f0cce6c155f3e35e92809dc6b2a4ab9
2016-06-24 11:41:00 +02:00
1f1f26bf0f
loplugin:implicitboolconversion
...
Change-Id: I21aeb9504be38e4a6b55892730131a878234ced3
2016-06-23 13:08:11 +02:00
9b9e5cfd2f
tdf#99589 - tolower / toupper - dangerous to Turks ...
...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: jan iversen <jani@documentfoundation.org >
2016-06-23 09:59:49 +00:00
8f6ce60fdb
cppcheck: noExplicitConstructor
...
Change-Id: I2bd2fd9c5768128130659213305b7da04686125a
Reviewed-on: https://gerrit.libreoffice.org/26000
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-06-07 08:16:20 +00:00
62d270116b
tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
...
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2016-06-06 18:09:11 +00:00
f3c1d240bd
loplugin:constantparams
...
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361
Reviewed-on: https://gerrit.libreoffice.org/25769
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-06-03 09:08:42 +00:00
8a2149c105
clang-tidy misc-assign-operator-signature
...
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f
Reviewed-on: https://gerrit.libreoffice.org/25154
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-20 07:55:30 +00:00
32180be989
remove leftover comment
...
of commit 2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae
Change-Id: Ic3847bf36666de598f79d19c1b28ff0f8a4881f0
Reviewed-on: https://gerrit.libreoffice.org/25123
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
2016-05-19 06:08:11 +00:00
2c8fe2e737
update unusedmethods plugin to deal with constructors
...
and fix the operator< implementations in some of the other
plugins too.
Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-05-18 10:03:44 +00:00
b994589cec
Add SAL_FALLTHROUGH, where apparently appropriate
...
Change-Id: I41dec58c163bdd33b71b3519fa0fd6eca72faae6
2016-05-10 17:01:40 +02:00
b6ecea71be
Add SAL_FALLTHROUGH to what looks like flex-generated code
...
Change-Id: Icd980dbbdc8b55d76b7f8abe4dd1a9d7e475143d
2016-05-10 16:58:44 +02:00
14cd5182c5
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
0f3ac23d73
Insert explicit "break" when falling through to empty next case
...
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.
Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
91adb929d7
clang-tidy modernize-loop-convert in h-l/*
...
Change-Id: I843528327b25d18476f8959cabba16371213a48a
Reviewed-on: https://gerrit.libreoffice.org/24460
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-04-28 09:31:29 +00:00
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
07b4791dc8
loplugin:salbool: Automatic rewrite of sal_False/True
...
Change-Id: Icfa6686ee96e4c9ddf23abc3ece6beae6521473a
2016-04-20 17:25:42 +02:00
e474c8b86a
Get rid of odd _HCHAR_, _UTYPE_, _ZZRECT_ guards
...
Change-Id: Ic44d1c751319897c55fdd03c912cd670624f928f
2016-04-12 15:50:21 +02:00
6254b1f70e
Get rid of _DATECODE_WEEK_DEFINES_
...
Change-Id: I1b50fadd64df0a18339410068696a836850e9248
2016-04-12 15:50:21 +02:00
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
7a43da0613
-Werror,-Wundef
...
see c665a1bc0f45aa4a4c679e6f004581168e03f93d for __STDC__ not defined under
MSVC/clang-cl.
Change-Id: I65d8a3b33ff40fc80c52b294b0c5bc75d9f5cf2f
2016-03-04 10:11:07 +01:00
5adde1bf69
loplugin:unuseddefaultparams various
...
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546
Reviewed-on: https://gerrit.libreoffice.org/22852
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-03-03 11:39:56 +00:00
db8067145f
loplugin:write only fields
...
Change-Id: I44f249a17d0a510ec63a488b656d57a1a392f821
2016-02-22 14:34:21 +02:00
ce43d0ae92
use consistent #define checks for the Windows platform
...
stage 1 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f
Reviewed-on: https://gerrit.libreoffice.org/22390
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2016-02-16 10:37:55 +00:00
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
538f276ae0
Formatting changes across all modules
...
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs
Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2016-02-09 08:11:34 +00:00
2af991dc23
coverity#1349757 Unchecked return value
...
Change-Id: Ia2286fa9e1c351c4e4c9579b31b94ce1eac3b841
2016-01-21 14:07:45 +00:00
4ff5a55584
loplugin:unusedmethods
...
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e
Reviewed-on: https://gerrit.libreoffice.org/21603
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-01-20 08:13:51 +00:00
a7f6efc68b
loplugin: unused return values
...
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af
Reviewed-on: https://gerrit.libreoffice.org/21571
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-01-18 12:50:09 +00:00
bdeb15881f
loplugin:unusedmethods unused return value in hwpfilter
...
Change-Id: Ib225db89e60708f6b55b3cb86f8e881386fab86f
2016-01-11 13:49:59 +02:00
64d624b651
Fix typos
...
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com >
2016-01-10 14:17:20 +00:00
e488bc443b
cppcheck: duplInheritedMember
...
Change-Id: I451a7a04fd1578d3095e5931f0792a32870a647e
2016-01-04 20:27:22 +00:00
aa330a9ddc
cppcheck: allocaCalled
...
Change-Id: I253f71f851621d8a3d1244468b9da63ba2d10b09
2016-01-02 20:32:43 +00:00
bea8a7ad63
cppcheck: noExplicitConstructor
...
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
fb8a3fac5d
loplugin:nullptr: More NULL -> nullptr automatic rewrite
...
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00