Commit Graph

1518 Commits

Author SHA1 Message Date
0d05173015 loplugin:constantparam
Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0
Reviewed-on: https://gerrit.libreoffice.org/30858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15 12:56:26 +00:00
a71d6a2a84 loplugin:expandablemethods in dbaccess
Change-Id: I6087a3eff46926646ac1637615a0af30b38956a4
Reviewed-on: https://gerrit.libreoffice.org/30712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 11:13:34 +00:00
14301589d7 style fix for cppcheck redundantCondition
Change-Id: I5d02c6f4c6b411c23a6de43374884a76e1c408fe
Reviewed-on: https://gerrit.libreoffice.org/30667
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 18:55:52 +00:00
c1805c48ae loplugin:oncevar in dbaccess
Change-Id: I956063bb354fbbd002e922bb06d0b3863a2750fc
Reviewed-on: https://gerrit.libreoffice.org/30565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 13:15:41 +00:00
7441141bcf No good reason for dbaccess::OCacheSet::updateRow to be pure?
Most of its virtual member functions are (though insertRow is already a curious
exception), even though they are defined, so smells like a copy/paste error
rather than deliberate design.  And appears to have been the only reason why
loplugin:unnecessaryoverride filtered out such overriding of pure base
functions.

Change-Id: Ib2a40af9cd3cd3dbb26c4147f7d01de4e11f5f6e
2016-10-31 11:38:49 +01:00
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
6920de0e1f coverity#1374268 Uncaught exception
Change-Id: Ife6e9897c12a9754afd5f4754c7de41eef7f00eb
2016-10-26 09:56:30 +01:00
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
ef637a1c4e loplugin:expandablemethodds in dbaccess..drawinglayer
Change-Id: Iee9143999f5c94040dadd378006f2a429ca0edb5
Reviewed-on: https://gerrit.libreoffice.org/30012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:30:48 +00:00
1e3996ce83 loplugin:unnecessaryoverride in dbaccess
Change-Id: I458092403faa46f80957a55b48374678e196de11
2016-10-05 12:34:55 +02:00
1e49e33c26 loplugin:constantparam in chart2..connectivity
Change-Id: Ic9e1bd36a11c7148fa7595a2b6c6de9bd7a8653d
Reviewed-on: https://gerrit.libreoffice.org/28834
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 06:40:30 +00: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
a54f7b5ce9 coverity#1372446 Uncaught exception
Change-Id: I831c0d2e6449eae76383163f08e7b16c7decc92f
2016-09-03 18:51:05 +01:00
02d1eb96e1 coverity#1372405 Uncaught exception
Change-Id: I9d2029be969d767eb096137017e8a7e646b69d2d
2016-09-01 10:40:14 +01:00
f28dd1d9d2 coverity#1372404 Uncaught exception
Change-Id: Id78404a2fae06004a35c9bf07136bd4806a12e02
2016-09-01 10:40:14 +01:00
f9eaeae19d coverity#1372403 Uncaught exception
Change-Id: I9bdb04e55f28c5470e13debde9845c984954092f
2016-09-01 10:40:14 +01:00
cb1539c4d6 coverity#1372401 Uncaught exception
Change-Id: I9624eeacbe8dc32fd22560737c3d69cf022b2724
2016-09-01 10:40:14 +01:00
a9dcaba2d5 coverity#1372400 Uncaught exception
Change-Id: I2319602a3b04bc0c5a6d4082ac62f98f7a697cf8
2016-09-01 10:40:14 +01:00
2ff52852a2 coverity#1372395 Uncaught exception
Change-Id: Ia384d4f7186e3ea870a6bb06fb8227ae0321715e
2016-09-01 10:40:14 +01:00
8f7886c742 coverity#1372393 Uncaught exception
Change-Id: I310fb547b81d89e9000760f6628e07d2e5c7effc
2016-09-01 10:40:14 +01:00
c39378edb2 coverity#1372391 Uncaught exception
Change-Id: I62358c3705c437dfe1e3e370a2cc857a21144ca2
2016-09-01 10:40:14 +01:00
50caee009b coverity#1372385 Uncaught exception
Change-Id: Ic8a33ef10d627bc5868a77aa7f14b46682d735d2
2016-09-01 10:40:14 +01:00
9f0e49cee4 coverity#1372382 Uncaught exception
Change-Id: I7c3e11542d2b82af212d2f52bc1b66f0e6ce187c
2016-09-01 10:40:14 +01:00
47a72493a9 std::list<sal_Int32> -> std::vector
Change-Id: Ie1d062bd4dabf7ca7de08193597225462447b076
2016-09-01 11:05:21 +02:00
1eca527f25 loplugin:stringstatic
Change-Id: I00cb0310c90601472472c570e6c3452605258059
2016-08-16 11:38:08 +02:00
2c76fd1e04 tdf#67647 getStructuredFilter returns operator
Change-Id: I010ea3c24b4d5411711a93e35d4b173f5bde9e55
Reviewed-on: https://gerrit.libreoffice.org/28000
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-10 14:32:32 +00:00
7fa183cb1a loplugin:countusersofdefaultparams in chart2..desktop
Change-Id: Iaca94acd6ef91f07ed0c0085390500c418099dee
Reviewed-on: https://gerrit.libreoffice.org/27896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 10:28:25 +00:00
bd4c80b856 tdf#100726: Improve readability of OUString concatenation
module cui and dbaccess fixed

Change-Id: Ief6fca46622fe4e0da804c9a874f7ec93a0fd7af
Reviewed-on: https://gerrit.libreoffice.org/27770
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-04 09:34:11 +00:00
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
9600746f22 loplugin:redundantcast: redundant static_casts in dbaccess
Change-Id: Ia959a92044ba2fb7fef1938bd236e4a3a9f55908
2016-07-08 16:47:31 +02:00
cd71034b26 comphelper::OBaseMutex -> cppu::BaseMutex
convert usage of deprecated class, and remove the old class

Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2
Reviewed-on: https://gerrit.libreoffice.org/26843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:49:07 +00:00
bb1e59d596 Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValue
Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9
2016-06-17 19:40:58 +02: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
d96c114171 clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 06:58:44 +00: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
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
0b1e4a3067 Prevent Any::setValue from reinterpreting bool* as sal_Bool*
...which only happens ot work in environments where sizeof (bool) == 1.  The
simpler alternative is to use the operator <<= template without passing explicit
UNO type information, anyway.

The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument.  (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.)  As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.

Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f
2016-05-03 15:26:01 +02:00
a5810faae3 clang-tidy modernize-loop-convert in d*
Change-Id: I0830a41b48e884ef63d32b5873c7007195659bb9
2016-04-25 11:57:07 +02:00
6009d33823 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I5cd8fd979fd4caa3d7cde599096627bfdd0dec7e
2016-04-20 17:25:39 +02:00
80018b6006 Replace map to sal_Bool with map to bool
Change-Id: Ib75d197293d7854976b131f61dc78536a4ac8a97
2016-04-20 17:25:34 +02:00
29ad0f5d16 dbaccess: replace boost::bind with C++11 lambdas
Change-Id: I84d7e2e3b00985815fb1945fbaf87cf5944bd8e6
Reviewed-on: https://gerrit.libreoffice.org/24116
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-18 08:42:26 +00:00
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
9fce680e27 loplugin:passstuffbyref in dbaccess
Change-Id: Ice52ebbfeca45c8587fdcd0d3dea5c02c7de27e3
2016-04-13 13:27:51 +02:00
dbd1f4b75a clang-tidy performance-unnecessary-value-param in dbaccess
Change-Id: I9cec61867b4e6e8abde7749047974c6de87b9669
2016-04-12 11:25:18 +02:00
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
b15ee18a5e cppcheck: silence warnings assertWithSideEffect
Mark some class methods as pure.
warnings look like this:
> dbaccess/source/core/api/RowSetBase.cxx
> 593    assertWithSideEffect	398	warning	Assert statement calls
> a function which may have desired side effects: 'isAfterLast'.

Change-Id: I1b69340c3714be4678b599fa9a8ca933122aa857
Reviewed-on: https://gerrit.libreoffice.org/23981
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11 08:19:20 +00:00
6b2d75f966 cppcheck: noExplicitConstructor
Change-Id: I68310e2abc8f0ca114adb2b52f82157a0f455202
2016-04-04 11:16:06 +01:00
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
9e596250a6 tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: Icff7c0308843d6a7608be24d7fcf11fa079c7b72
Reviewed-on: https://gerrit.libreoffice.org/23672
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:44:34 +00: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