Stephan Bergmann
c18e2ea2a5
New loplugin:data
...
...following up on 1453c2c8f1 "prefer vector::data
to &vector[0]"
Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01
Reviewed-on: https://gerrit.libreoffice.org/72765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2019-05-22 16:35:20 +02:00
Mike Kaganski
ba57c3e041
tdf#120703 PVS: V581 ifs with identical conditions
...
V581 The conditional expressions of the 'if' statements situated
alongside each other are identical.
Change-Id: I79c655a072faff0bdb2af031ed1328e684b83aac
Reviewed-on: https://gerrit.libreoffice.org/71430
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2019-04-27 20:59:34 +02:00
Mike Kaganski
85456fae54
tdf#120703 PVS: Silence V522 warnings
...
V522 There might be dereferencing of a potential null pointer.
Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2019-04-01 00:49:12 +02:00
Arkadiy Illarionov
5af9e26ae8
Simplify containers iterations in cppcanvas, cppu, cppuhelper
...
Use range-based loop or replace with STL functions
Change-Id: I72bf7cdb632c04e2fc8d4f7ab85cb6571222aa07
Reviewed-on: https://gerrit.libreoffice.org/68636
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-03-03 16:27:08 +01:00
Noel Grandin
a58f6d2744
loplugin:indentation in cppu..cui
...
Change-Id: If625e5bf38ca8e1f12686038c7c9be8d0303b6f6
Reviewed-on: https://gerrit.libreoffice.org/67536
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2019-02-08 13:16:15 +01:00
Miklos Vajna
adca0b98c6
cppu: fix Android build
...
By restoring includes which are still needed, conditionally.
Change-Id: Icc331c7d6a084af7d93b941ea879f0c60b9ca9f3
2019-01-29 15:59:56 +01:00
Gabor Kelemen
2660f132cc
tdf#42949 Fix IWYU warnings in cppu/
...
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ia1b2f0a9c99acc7ac538f3b41c1b6757d414db35
Reviewed-on: https://gerrit.libreoffice.org/66970
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-01-29 13:48:23 +01:00
Noel Grandin
12e460d999
loplugin:buriedassign in avmedia..cui
...
Change-Id: Id44f1e98a3aac2c417f8030de603175bf68f0dfe
Reviewed-on: https://gerrit.libreoffice.org/63467
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-11-16 14:03:25 +01:00
Caolán McNamara
5f91153233
coverity#1441100 silence Out-of-bounds access
...
Change-Id: I8d8f93262481c35968cdfff49eddd7a20cf84c1f
Reviewed-on: https://gerrit.libreoffice.org/63022
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-11-07 18:18:51 +01:00
Mike Kaganski
e128f78069
replace double-checked locking patterns with thread safe local statics
...
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323
Reviewed-on: https://gerrit.libreoffice.org/62839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2018-11-04 14:46:01 +01:00
Noel Grandin
6f50961e69
remove more rtl::OUString and OString prefixes
...
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-10-24 14:43:34 +02:00
Stephan Bergmann
7ceee0f1ec
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2018-10-09 14:47:17 +02:00
Caolán McNamara
2e145afcfe
tweak markup
...
Change-Id: I5d7171045a9c271e2ef5f456411fa4d3eb5f1571
Reviewed-on: https://gerrit.libreoffice.org/60895
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-09-22 16:44:09 +02:00
Stephan Bergmann
653218c76a
Fix for --enable-debug --disable-assert-always-abort
...
...found by <https://ci.libreoffice.org/job/lo_tb_random_config_linux/1465/ >
Change-Id: Ia38fe5cac9fa187535599d313a3422c34458bcd9
Reviewed-on: https://gerrit.libreoffice.org/60242
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2018-09-10 12:58:24 +02:00
Noel Grandin
b406744b8f
fix android build
...
after
commit 37f9fdc11c
replace rtl_allocateMemory with std::malloc
Change-Id: Ib565eeb5277a9184f875e67b55040bedbbbdb952
2018-08-29 09:43:11 +02:00
Noel Grandin
37f9fdc11c
replace rtl_allocateMemory with std::malloc
...
where used directly, since rtl_allocateMemory now just calls into std::malloc
Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad
Reviewed-on: https://gerrit.libreoffice.org/59685
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-08-29 09:05:39 +02:00
Noel Grandin
6dbae37b8d
loplugin:constantparam (1)
...
Change-Id: I25077e391ecca1b678062d261a83d88daadf0a58
Reviewed-on: https://gerrit.libreoffice.org/59701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-08-29 09:00:52 +02:00
Jochen Nitschke
c9697dc2ab
replace double checked locking patterns
...
with thread safe static initialization
Change-Id: I4c751a47e3bdf52bbfb67d4f3aabd6f442e30118
Reviewed-on: https://gerrit.libreoffice.org/58287
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-07-29 23:06:39 +02:00
Arkadiy Illarionov
5437eb15ad
tdf#96099 Remove trivial std::map typedefs in [cd]*
...
Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82
Reviewed-on: https://gerrit.libreoffice.org/56639
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-06-29 08:46:34 +02:00
Rene Engelhard
e37135d413
move Java from config_features to already existing config_java
...
Change-Id: I085fab2bcdc5910d1386fc20768fe7063ce3e28e
Reviewed-on: https://gerrit.libreoffice.org/54071
Reviewed-by: Rene Engelhard <rene@debian.org >
Tested-by: Rene Engelhard <rene@debian.org >
2018-05-10 22:44:37 +02:00
Caolán McNamara
2ee4a46be7
convert these to true asserts
...
Change-Id: Ifd602f47dd57cdecff3c175d892993072fb82891
Reviewed-on: https://gerrit.libreoffice.org/48154
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-01-19 09:55:11 +01:00
Stephan Bergmann
697f01e052
SAL_W32 is just an alias for _WIN32
...
...so consistently use the latter instead of the former
Change-Id: I144d5e7c472632f93b2258461510346bc85892d9
Reviewed-on: https://gerrit.libreoffice.org/48135
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2018-01-19 08:19:38 +01:00
Stephan Bergmann
14d38072b5
More loplugin:cstylecast: cppu
...
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/ > "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I8531b2dc474b257c63016c8ae80014c7322e5a71
2018-01-12 20:26:51 +01:00
Noel Grandin
3af500580b
loplugin:salcall fix functions
...
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-12-11 12:13:46 +01:00
Noel Grandin
9a06b99d2f
loplugin:salcall fix non-virtual methods
...
first, since those are safer to change than virtual methods
Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-12-05 07:32:46 +01:00
Noel Grandin
d9b6f4fd38
loplugin:constmethods in unotools
...
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-10-26 10:59:42 +02:00
Stephan Bergmann
7a3aafb5a1
loplugin:includeform: cppu
...
Change-Id: I438346398fd8430cf4357b8a3d8e9f423966f2ca
2017-10-23 22:46:11 +02:00
Noel Grandin
87a9979c89
overload std::hash for OUString and OString
...
no need to explicitly specify it anymore
Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-10-23 08:15:35 +02:00
Noel Grandin
7aa7f4d9e4
loplugin:unnecessaryparen include c++ casts
...
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb
Reviewed-on: https://gerrit.libreoffice.org/41874
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-09-04 10:52:41 +02:00
Noel Grandin
db17a874af
convert std::map::insert to std::map::emplace II
...
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-11 13:51:29 +02:00
Noel Grandin
d347c24036
convert std::map::insert to std::map::emplace
...
which is considerably less verbose
Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-11 12:38:32 +02:00
Stephan Bergmann
bfcad6e2b5
Remove excess SAL_INFOs
...
Change-Id: I21aa7c7878c4ec1371cec4738d2482cc101020a1
2017-08-10 11:40:35 +02:00
Noel Grandin
fbf1e4a5d3
loplugin:constparams in cppu
...
Change-Id: I0e772b8cf4ee281b5f3e26131df985607a569c48
Reviewed-on: https://gerrit.libreoffice.org/40156
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-19 16:54:50 +02:00
Chris Sherlock
2cbd412168
cppu: remove unnecessary LOG_LIFECYCLE_* macros
...
Change-Id: I0f19cf7045e6ff2906404a73ce710e42800c0a72
Reviewed-on: https://gerrit.libreoffice.org/39994
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com >
2017-07-17 21:46:35 +02:00
Noel Grandin
a394d67f37
use more OUString::operator== comphelper..cui
...
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa
Reviewed-on: https://gerrit.libreoffice.org/39888
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-13 11:03:14 +02:00
Noel Grandin
4250b25c6a
teach unnecessaryparen loplugin about identifiers
...
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-10 09:57:24 +02:00
Rene Engelhard
4b7a1b424e
fix m68k build (again)
...
This reverts commit d5d6ee3b3e and applies
the patch cleanly again. somehow it got mis-applied.
Change-Id: Id199d9086fb8e2e52bb810c8ddcbdd7fa7060676
Reviewed-on: https://gerrit.libreoffice.org/39279
Reviewed-by: Rene Engelhard <rene@debian.org >
Tested-by: Rene Engelhard <rene@debian.org >
2017-07-04 22:16:37 +02:00
Jochen Nitschke
c4ddf6cd6d
C++11 remove std::unary_function bases from functors
...
std::unary_function is deprecated since C++11 and removed in C++17
90% done with regexp magic.
removed obsolete <functional> includes.
The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
is used in a std::not1 function helper who uses the members
return_type and argument_type.
- replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
lcl_weakReferenceToSame used the argument_type member in the
operator() parameter.
- inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
used result_type and argument_type in operator().
- inline the types
Also fix compile error with gcc about finding std::for_each.
Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2017-07-03 12:21:03 +02:00
Chris Sherlock
97eb00c75e
revert OSL_ASSERT changes
...
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock
8dd791560b
tdf#43157: convert rest of cppu from OSL_ASSERT to assert
...
Change-Id: I32684aaf33a798484d68bb8c3689cae542a8d608
2017-05-07 08:03:13 +10:00
Noel Grandin
992a333130
clang-tidy: readability-else-after-return
...
run it against sal,cppu,cppuhelper
I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.
Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-12 10:11:34 +02:00
Stephan Bergmann
6cb9e6dad7
Remove redundant 'inline' keyword
...
...from function definitions occurring within class definitions. Done with
a rewriting Clang plugin (to be pushed later).
Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-03-03 20:55:50 +00:00
Noel Grandin
c3586b684c
OSL_TRACE->SAL in chart2..oox
...
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2016-12-13 06:12:00 +00:00
John Paul Adrian Glaubitz
d5d6ee3b3e
uno: Add support for targets with 16-bit alignment
...
Despite being a 32-bit architecture, m68k has a basic
alignment of 16-bit for historic reasons. On m68k,
SAL_TYPES_ALIGNMENT8 is therefore equal to 2 and we
need to cover this case in the static asserts as well.
Change-Id: I4c756af25d57e5d49209697f6e678ef71a5845aa
Reviewed-on: https://gerrit.libreoffice.org/31878
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2016-12-12 12:24:11 +00:00
Stephan Bergmann
954699acbd
cppu/source/uno/EnvDcp.c -> cppu/source/uno/EnvDcp.cxx
...
Change-Id: Ic02d217efef970a365a584f2558c41561e4c6e3d
2016-10-28 08:52:45 +02:00
Stephan Bergmann
11aa8ac4e3
cid#1371314: Add move semantics
...
Change-Id: I995cbdb2b6adc707abe5f1a179e94251641120bc
2016-09-20 18:22:32 +02:00
Michael Stahl
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
Stephan Bergmann
8b1752eb78
icopyConstructFromElements's nAlloc is never negative
...
follow-up to 7fa183cb1a
"loplugin:countusersofdefaultparams in chart2..desktop"
Change-Id: I099229ac4a3670e26570b083e3b0a4a92984f663
2016-08-23 17:34:55 +02:00
Noel Grandin
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
nadith
efef273e2c
tdf#100726: Improve readability of OUString concatenation
...
this bug fixed in the modules between canvas - cppu
Change-Id: I2022b022897dafde20251352376e3facdb9b8d75
Reviewed-on: https://gerrit.libreoffice.org/27663
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2016-08-01 06:12:30 +00:00