Noel Grandin
5053b8cd3f
loplugin:useuniqueptr in AstStruct
...
Change-Id: Ib7416235e41192323e74061bfce6c162e87612f2
Reviewed-on: https://gerrit.libreoffice.org/51736
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-03-23 07:25:01 +01:00
Julien Nabet
1e3a5bb9e9
Use for-range loops in hwpfilter, i18n*, idl* and io
...
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027
Reviewed-on: https://gerrit.libreoffice.org/51492
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2018-03-18 11:33:16 +01:00
Kacper Kasper
9c036b1d3d
Make LibreOffice buildable on Haiku.
...
* Obviously VCL wiring is missing, but most components do build.
Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978
Reviewed-on: https://gerrit.libreoffice.org/50293
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
2018-03-05 14:17:27 +01:00
Mike Kaganski
e9073eadef
idlc: MSVC: pragma warning: make more specific, remove obsolete
...
Change-Id: I0fbba0c1b12f9ade703ceee477dae4056fe9d31e
Reviewed-on: https://gerrit.libreoffice.org/48994
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2018-02-01 17:57:21 +01:00
Noel Grandin
be8c414567
loplugin:unusedmethods also check for functions returning bool
...
we were previously excluding them
Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11
Reviewed-on: https://gerrit.libreoffice.org/48167
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-01-19 13:26:27 +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
Noel Grandin
6ae487db5a
fix use of std::unique_ptr in Idlc
...
I removed the deletes in the destructor in
commit b27fee9e0e
Date: Wed Jan 10 11:44:28 2018 +0200
loplugin:useuniqueptr cppu,idlc,io,ucbhelper
but forgot to do the actual conversion
Change-Id: Icb03070e1d8a2b10ccf892f01e9b44cc6bf0156f
2018-01-17 15:15:28 +02:00
Noel Grandin
23885b06b1
loplugin:unnecessaryparen extend to delete statements
...
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1
Reviewed-on: https://gerrit.libreoffice.org/48027
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-01-17 09:32:03 +01:00
Noel Grandin
37464a0fb7
loplugin:useuniqueptr in idlc
...
Change-Id: Iccc50462ca115546422824b6814abf16a029f005
Reviewed-on: https://gerrit.libreoffice.org/47793
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-01-13 11:20:05 +01:00
Stephan Bergmann
57bbe564ba
More loplugin:cstylecast: idlc
...
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: I1cb9e69b8138cb5bb63f18231018f166b67b3072
2018-01-12 20:21:57 +01:00
Stephan Bergmann
78b60654ff
Manual loplugin:cstylecast fixes in idlc/source/parser.y
...
...with a to-be-committed improved loplugin:cstylecast
Change-Id: Iafd2f3d401e7a9e46acfdba89a5b35498afbfd3c
Reviewed-on: https://gerrit.libreoffice.org/47753
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2018-01-11 18:37:45 +01:00
Noel Grandin
b27fee9e0e
loplugin:useuniqueptr cppu,idlc,io,ucbhelper
...
Change-Id: I6d8c24fabd52b39c66ce0b88b547df7ec85dad76
Reviewed-on: https://gerrit.libreoffice.org/47725
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-01-11 07:37:16 +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
68f8645752
new loplugin salcall: remove unnecessary SAL_CALL
...
In this first commit, I use the plugin to verify the consistency of our
SAL_CALL annotations.
The point being to make the next commit more mechanical in nature,
purely using the rewriter.
There are various chunks of unix-only code that have never had to be
compiled by MSVC, hence the inconsistencies.
In bridges, I had to inline some typedefs to make the verification code
happy, since it cannot see into typedefs.
Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0
Reviewed-on: https://gerrit.libreoffice.org/45502
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-12-04 07:24:52 +01:00
Stephan Bergmann
a2656563f1
loplugin:unnecessaryparen: Warn about parentheses around literals
...
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet
warn about Boolean literals, which are sometimes wrapped in parentheses to
silence unreachable-code warnings.
To avoid multiple warnings about code like
f((0))
switch to generally using a set of ParenExpr to keep track of which occurrences
have already been handled.
Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc
Reviewed-on: https://gerrit.libreoffice.org/45317
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-11-27 14:04:40 +01:00
Noel Grandin
4f4486c61d
look for =() in loplugin:unnecessaryparen
...
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-11-20 12:31:32 +01:00
Noel Grandin
455e4011f7
improve constparam loplugin
...
lots of little fixes to make the logic less pessimistic
Change-Id: If368822984250b11b98c56f5890177a1402e8660
Reviewed-on: https://gerrit.libreoffice.org/44168
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-11-02 10:45:01 +01:00
Stephan Bergmann
f3698af7cc
loplugin:includeform: idlc
...
Change-Id: Ia32beed408de33fbe8ed59ddcab5b01ddc3b8218
2017-10-23 22:46:05 +02:00
Noel Grandin
2559a2a056
loplugin:constmethod in cppu,cppuhelper,idlc
...
Change-Id: I9138b7e5d53c30488f99e9f9b9fe3f98c8d6858b
Reviewed-on: https://gerrit.libreoffice.org/43583
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-10-23 08:15:50 +02:00
Mike Kaganski
848c25b6b1
Silence compiler warnings C4005 (redefined INT8_MIN etc.)
...
Change-Id: I29feefb1045e22addcbe68c00e3ed601e258519d
Reviewed-on: https://gerrit.libreoffice.org/43607
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-20 19:01:19 +02:00
Stephan Bergmann
7855c29b4d
loplugin:includeform: manual changes to idlc/source/parser.y
...
Change-Id: I1f3b08b4af08956aefad12c679cccf7bd5112f8c
Reviewed-on: https://gerrit.libreoffice.org/43557
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-10-19 20:12:00 +02:00
Mike Kaganski
1944e3ddc0
Rename and move SAL_U/W to o3tl::toU/W
...
Previosly (since commit 9ac98e6e34 )
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.
Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-05 16:02:52 +02:00
Julien Nabet
22e748e68a
Prefer prefix operator
...
Change-Id: I82f3f66bfc675dbc4a5d5b57d8715c3de01d9620
Reviewed-on: https://gerrit.libreoffice.org/42994
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2017-10-01 14:53:10 +02:00
Mike Kaganski
362a21d3a1
Use explicit function names for fooA/fooW WinAPI; prefer fooW
...
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.
We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.
Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-09-30 11:23:41 +02:00
Mike Kaganski
afeff9102c
Use even more WIN32_LEAN_AND_MEAN
...
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5
Reviewed-on: https://gerrit.libreoffice.org/42398
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-09-18 01:13:30 +02:00
Noel Grandin
7ca4ea54b4
clang-tidy modernize-use-emplace in hwpfilter..lotuswordpro
...
Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70
Reviewed-on: https://gerrit.libreoffice.org/42156
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-09-11 13:50:50 +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
8ef6be7332
loplugin:constparams in sw part6
...
Change-Id: Ic82946cf9be50d9d9c43338b86dfb700ce5b354c
Reviewed-on: https://gerrit.libreoffice.org/40786
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-06 20:13:53 +02:00
Jochen Nitschke
c49ed68c7e
no copy needed
...
coerce_value(..) is a local static function without side effects
Change-Id: Id153ad26973b5724b33f144ae9eba49562b15067
Reviewed-on: https://gerrit.libreoffice.org/40040
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de >
2017-07-18 20:03:44 +02:00
Noel Grandin
41dc56df37
loplugin:constparams codemaker,idl,idlc
...
Change-Id: Ic72b7525cfbfbd3c5afb12fe9ea814176e6c8c9d
Reviewed-on: https://gerrit.libreoffice.org/40126
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-18 13:27:45 +02:00
Noel Grandin
db3860062e
extend loplugin useuniqueptr to OUString pointers
...
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc
Reviewed-on: https://gerrit.libreoffice.org/39948
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-17 07:23:22 +02:00
Stephan Bergmann
c52cd532b6
Fix lifecycle issue
...
...as shown by ASan/UBSan build use-after-free report at
<https://ci.libreoffice.org/job/lo_ubsan/602/ > after
8e39ef6692 "extend loplugin useuniqueptr to POD
types"
Change-Id: Ic42e408c2c4b2901cdf5d681b332543ec8f445ef
2017-07-16 21:22:13 +02:00
Noel Grandin
8e39ef6692
extend loplugin useuniqueptr to POD types
...
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781
Reviewed-on: https://gerrit.libreoffice.org/39932
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-14 10:13:46 +02:00
Stephan Bergmann
5ef30c205e
loplugin:unnecessaryparen
...
Change-Id: I37833e0e19162790f4ae37d74eb63cb84434cf2e
2017-07-05 14:51:37 +02:00
Noel Grandin
a006f60b6a
loplugin:oncevar in helpcompiler..jvmfwk
...
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd
Reviewed-on: https://gerrit.libreoffice.org/39187
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-25 17:19:36 +02:00
Noel Grandin
6bbda13286
loplugin:unusedfields in forms..idlc
...
Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822
Reviewed-on: https://gerrit.libreoffice.org/39133
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-06-23 08:59:56 +02:00
Noel Grandin
ca145c7364
remove some unnecessary OString constructor calls
...
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7
Reviewed-on: https://gerrit.libreoffice.org/38130
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-29 12:56:28 +02:00
Noel Grandin
ef513fd4b0
remove unnecessary use of OString::getStr
...
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-28 19:44:08 +02:00
Noel Grandin
719a2adfbd
remove unnecessary empty OUString fields and vars
...
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
Reviewed-on: https://gerrit.libreoffice.org/37394
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 08:28:56 +02:00
Noel Grandin
6768a9b602
loplugin:redundantcast check for c-style casts to void
...
Change-Id: Ic8b99f590436f94825e471bc61411c69fd768862
Reviewed-on: https://gerrit.libreoffice.org/36208
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 13:03:06 +00:00
Noel Grandin
7662e92c64
loplugin:redundantcast find cstyle double casts
...
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8
Reviewed-on: https://gerrit.libreoffice.org/36187
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 07:47:30 +00:00
Andrea Gelmini
ee495c299b
Fix typos
...
Change-Id: I389542e18fcf71011f22919743b5280779f449fd
Reviewed-on: https://gerrit.libreoffice.org/35632
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Julien Nabet <serval2412@yahoo.fr >
2017-03-25 09:18:53 +00:00
Stephan Bergmann
6291574d94
Remove unused #include <ctype.h>
...
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
Stephan Bergmann
cb2a1cb370
Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
...
Change-Id: I9d3cf6363e1caf66a9d4cc3a1560c93e17038c2d
2017-03-22 21:59:42 +01:00
Stephan Bergmann
e972d6bb36
Idlc::m_pErrorHandler is unused
...
Change-Id: I41fea5e08381e21dff12f61142a4d54f07a502f4
2017-02-21 07:37:08 +01:00
Stephan Bergmann
1c413e4b9d
loplugin:subtlezeroinit: idlc
...
Change-Id: Ifec509c4d96a932cfe591b5ffa77027b7b372d52
2017-02-21 07:35:05 +01:00
Noel Grandin
a6a46aad51
convert ExprComb to scoped enum
...
and drop unused EC_bit_neg enumerator
Change-Id: I8a93310cd849cee56fcf628424d96005f89ba799
2017-02-16 12:42:04 +02:00
Noel Grandin
d00431fd36
convert ErrorCode to scoped enum
...
and drop unused enumerators
Change-Id: I7330ebf8feead7b67e67f73ba942979e4756269d
2017-02-16 12:42:04 +02:00
Noel Grandin
9651424f73
convert WarningCode to scoped enum
...
and drop unused enumerators
Change-Id: I212cf132c2406e85b44b1af552b0989cecbec162
2017-02-16 12:42:04 +02:00