Commit Graph

205 Commits

Author SHA1 Message Date
Stephan Bergmann
3a639ccf74 New loplugin:externvar: connectivity
Change-Id: I7e62a92ee4b019163de797fd4448170a741879dc
2017-01-09 15:44:10 +01:00
Noel Grandin
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
Noel Grandin
a52231c785 com::sun::star->css in connectivity
Change-Id: I9489e92dc89a6d83a26ff4f0d9aad26acd28ad9f
Reviewed-on: https://gerrit.libreoffice.org/25537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 08:37:11 +00:00
Caolán McNamara
c880eb6b69 tweak assert and switch to squeak by NDEBUG and nonNDEBUG
Change-Id: I996d69d83acb77e96cb105f65a0243bd5fe80295
2016-05-12 12:32:56 +01:00
Caolán McNamara
92c4c76f55 fall-through->SAL_FALLTHROUGH
Change-Id: I91ed1614162f3b7de13a0fe4ce1af689dce21510
2016-05-12 12:22:16 +01:00
Stephan Bergmann
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
Stephan Bergmann
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
Noel Grandin
e1af7f0c43 clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
Stephan Bergmann
15e410e5af loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6fada7331ee369c35cbe019db4e730ce56cd1a1f
2016-04-20 17:25:37 +02: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
960d4ebf76 convert SQLNodeType to scoped enum
Change-Id: I622e55622d38e6017993c8bc52625c85d0f74d74
2016-02-25 13:50:26 +02:00
Noel Grandin
6a9046d02e convert ErrorCode to scoped enum
Change-Id: I37d2dd0b84fce229b548bbe941cfdd1169170af9
2016-02-25 13:50:24 +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
Michael Stahl
bf253799f6 connectivity: replace boost::bind with lambda
Change-Id: I5a68b743221a3519701e4e3778562ae626783e0f
2016-02-03 11:12:49 +01:00
Stephan Bergmann
39d6c6256f -Werror=misleading-indentation (GCC 6)
Change-Id: Ide514da5b4413974e50beeb4f41881294475303c
2016-01-13 17:20:52 +01:00
Stephan Bergmann
c0bd59c15b loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-11-10 10:31:20 +01:00
Stephan Bergmann
03b0fd3e5f loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ia3b2020e3f58e23e87a95d1fee0c76c8aba705ea
2015-11-06 09:35:06 +01:00
Stephan Bergmann
c1778ef1cb clang-analyzer-deadcode.DeadStores
Change-Id: Ie1416bdd0740efa78e1ebdba9d50536f1768b046
2015-10-06 16:33:28 +02:00
Caolán McNamara
33cddeea13 boost->std
Change-Id: Iff14f69c200217c5d868978e8ffc06962b99ac09
Reviewed-on: https://gerrit.libreoffice.org/18568
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 19:32:42 +00:00
Stephan Bergmann
7bff36d45d loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I68b02ad101c4c2165b4618ed5d97cbffc2c43d2d
2015-08-31 08:04:12 +02:00
Noel Grandin
4712396b3b loplugin: defaultparams
Change-Id: I906912f29448bfc72e8139546aa09525c959867f
2015-08-11 09:48:17 +02:00
Stephan Bergmann
615f4b23c6 loplugin:staticmethods
Change-Id: I22af41840410ee78aee739e0dec49bb43cda874b
2015-06-08 13:48:11 +02:00
Jan Holesovsky
15feadfb84 Revert "loplugin:staticmethods"
This reverts commit 81d82b78a1.
2015-06-08 13:11:19 +02:00
Stephan Bergmann
81d82b78a1 loplugin:staticmethods
Change-Id: I22af41840410ee78aee739e0dec49bb43cda874b
2015-06-08 12:55:36 +02:00
Noel Grandin
6140ca9f1d loplugin:loopvartoosmall
Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26
2015-05-29 08:48:41 +02:00
Andrea Gelmini
5b1337f7b2 tdf#62475: partial handmade fixes
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4
Reviewed-on: https://gerrit.libreoffice.org/15712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-15 17:55:15 +00:00
Noel Grandin
6d5ae48427 loplugin:staticmethods
Change-Id: I200fdb2e193127f0c9e8cec4859845d3ec19cea0
2015-04-23 13:08:47 +02:00
Stephan Bergmann
d3d34a289b const_cast: convert some C-style casts and remove some redundant ones
Change-Id: If7e4e3cae1021529819e0b43ef334020ff8b7a43
2015-03-26 15:33:29 +01:00
Caolán McNamara
4d6a509efe convert all remaining BOOST_STATIC_ASSERT to static_assert
and we can include a few less headers

Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-02-05 22:21:49 +00:00
Caolán McNamara
37ebeabd4d BOOST_STATIC_ASSERT->static_assert and drop some includes
Change-Id: I74955a05bf13f7b33650d11c5cf4b1388382da2a
2015-02-05 20:40:42 +00:00
Lionel Elie Mamane
2d292a95c3 janitorial
Change-Id: Ifb0a277a27613ea1a771a8bb3b8c784b9eca4f2f
2015-01-28 18:29:31 +01:00
Lionel Elie Mamane
d613f6e00c Query Design: use correct name for columns that come from another query.
Change-Id: I25b4ccdc2f50ba89687e1f4c871f286251a28e21
2015-01-28 18:29:30 +01:00
Stephan Bergmann
ecf24f3032 connectivity: Use appropriate OUString functions on string constants
Change-Id: I9ca72364cd57fd2da0c6f5f704a3fe494c0a1df5
2014-12-18 14:12:24 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Stephan Bergmann
fc0d57b7af Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06 17:24:13 +01:00
Noel Grandin
05050cdb23 use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-06 13:51:10 +02:00
Caolán McNamara
6cbdfedde1 coverity#1249674 Missing break in switch
Change-Id: I1e957afe1dc35571128fac4432b54e8ae35aa9ab
2014-10-27 14:34:20 +00:00
Caolán McNamara
d803c5e996 coverity#1202804 Explicit null dereferenced
Change-Id: Iff1ada702f57fba9ba979bc158412b0321921672
2014-10-25 14:38:11 +01:00
Noel Grandin
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
Norbert Thiebaud
a62a046df3 fdo#55703 automagically use IS NULL fo 'null' in query design.
Change-Id: I31bcec74a786df016d994834e6146fb7a76e72cb
2014-09-04 15:39:38 +02:00
Noel Grandin
a517898052 remove unnecessary "const &" qualifier from T* parameters
e.g. convert code like
    foo(X * const & p)
to
    foo(X * p)
since the "const &" part of it adds nothing useful.

Change-Id: Icf5f2041517259e7b6e055b75ed1e0e77c547da5
2014-07-18 14:24:19 +02:00
Tor Lillqvist
4e549156ef WaE: enumeration values not handled in switch
The previous commit to this file removed the default: case, so add it back
(even if doing nothing now).

Change-Id: Idc02818a30216dda0d64fddf21188de5766672e2
2014-07-07 13:21:56 +03:00
Caolán McNamara
0d78ad871e DBG_ASSERT->assert when followed by dereference
Change-Id: Ic1c999ffdc391ea01be5711721e7c9e63179473e
2014-07-07 10:48:25 +01:00
Caolán McNamara
8871a650b9 SAL_WARN->assert
immediately dereferenced

Change-Id: I96a657973c219facbaa64dd079dcaaaa3c1c4dd8
2014-07-02 10:46:48 +01:00
Stephan Bergmann
75838570c3 loplugin:staticcall
Change-Id: I7f22aa5576ca3c62fa363971f4fa5992b7711563
2014-06-13 17:54:24 +02:00
Caolán McNamara
231ae9c77c coverity#1158175 Missing break in switch, assuming its intentional
Change-Id: Ia0f1951f1e3edcd858a37ea091550feb2b9fd451
2014-06-05 13:35:54 +01:00
Thomas Arnhold
a2db194ea0 connectivity: fix includes
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-06-04 21:18:39 +02:00
Julien Nabet
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
Noel Grandin
7339ab25ee fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
this is a continuation of the above bug, removing SAL_INFO's
that only mark function entry.

Change-Id: Idb0f72481415594e3f8b7a11ad6e4b8835f6fca0
Reviewed-on: https://gerrit.libreoffice.org/9343
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-13 18:04:58 +00:00
Noel Grandin
199d333f13 connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
2014-04-16 11:51:51 +02:00