Noel Grandin
a2e3705d8b
loplugin:unnecessaryparen improve member expression
...
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741
Reviewed-on: https://gerrit.libreoffice.org/68757
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06 06:47:06 +01:00
Noel Grandin
191f85df58
re-land "new loplugin typedefparam""
...
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad,
and adds a bunch more fixes.
Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a
Reviewed-on: https://gerrit.libreoffice.org/68680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05 12:12:26 +01:00
Noel Grandin
c9bb48386b
Revert "new loplugin typedefparam"
...
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8.
This is not ready to land yet, seems like the latest update
of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04 08:56:11 +02:00
Noel Grandin
9865440d21
new loplugin typedefparam
...
verify that parameters use the exact same typedef-names (if any)
in definition and declaration
Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77
Reviewed-on: https://gerrit.libreoffice.org/68439
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04 07:32:43 +01:00
Luboš Luňák
b5c3f38cb8
do not call GetFormatTable() from GetNonThreadedContext() (tdf#121949)
...
ScDocument dtor calls ClearLookupCaches(), which calls GetNonThreadedContext().
But ScDocument instances used for copy&paste GetFormatTable() fails
on null mxPoolHelper, because ScDocument ctor doesn't set it in such a case.
So set up the pointer in ScInterpreterContext on demand only if actually
needed.
Change-Id: If3811da5bb00a2d7d404c089ee1bf46037a2cddb
Reviewed-on: https://gerrit.libreoffice.org/68350
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-03-01 10:03:05 +01:00
Stephan Bergmann
b31e2b6960
Remove unused YYWarning functions (cargo cult?)
...
Change-Id: I9cb03530150ee35bdaee4920dd2e818007a0a658
Reviewed-on: https://gerrit.libreoffice.org/68469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28 16:43:42 +01:00
Stephan Bergmann
e3c8943e26
Fix apparent temporary debugging leftover
...
Change-Id: I3277a341137b1b404ad9839431b5cc39a88fcbe1
Reviewed-on: https://gerrit.libreoffice.org/68425
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27 11:47:10 +01:00
Noel Grandin
48dc1e48d0
loplugin:unnecessaryoverride look for more patterns
...
like
bool Foo::bar() {
b = Super::bar();
return b;
}
Change-Id: I5e4c8005a3da7d7487c9039c35dcbb1d17e65bd7
Reviewed-on: https://gerrit.libreoffice.org/68418
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 09:13:25 +01:00
Noel Grandin
57ac2fcdda
loplugin:unusedfields fix read/write when dealing with r<<= and >>=
...
Change-Id: I103bcc2f21741d0a52a0bdf053fdbddf5a3e9ea0
Reviewed-on: https://gerrit.libreoffice.org/68387
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:36:12 +01:00
Noel Grandin
7f2e5c9ad2
m_bShowAllShapes in SdPageObjsTLV is dead
...
since
commit c4a91f1409fc21d92f207718f29377c2862e381f
Date: Mon Feb 11 17:32:44 2019 +0000
weld SdInsertPagesObjsDlg
Change-Id: I9644c492d02e930592fd568c15f2f87d12f4f038
Reviewed-on: https://gerrit.libreoffice.org/68386
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:35:44 +01:00
Noel Grandin
4d502ef355
loplugin:simplifybool improve search for negated operator
...
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34
Reviewed-on: https://gerrit.libreoffice.org/68379
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:35:11 +01:00
Noel Grandin
19240f625f
loplugin:unusedfields look for classes where we can make all the..
...
fields private
Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27
Reviewed-on: https://gerrit.libreoffice.org/68302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:34:52 +01:00
Noel Grandin
3525b4e098
loplugin:unusedmethods
...
Change-Id: I085394e0f4b780dc5b376d5ac0e9d761434e3ead
Reviewed-on: https://gerrit.libreoffice.org/68301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25 11:46:44 +01:00
Andrea Gelmini
11c13789f9
Fix typo
...
Change-Id: I70542a0cbbed834f47a84be4a60330ddc6e84d6f
Reviewed-on: https://gerrit.libreoffice.org/68274
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-24 08:54:22 +01:00
Andrea Gelmini
e99a7a8dfa
Fix typo
...
Change-Id: I428b4c484ba6e18ee2947c9be4688317764769f2
Reviewed-on: https://gerrit.libreoffice.org/68240
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-23 14:19:19 +01:00
Stephan Bergmann
b87f3dc3c5
loplugin:writeonlyvars is no-op on Windows, so don't run its test there
...
But nevertheless, make sure that the variables m_bar9/10 used in combination
with css::uno::Any have UNO-compatible type.
Change-Id: I4e9915193386278ace128df94f7722d90b2567f2
Reviewed-on: https://gerrit.libreoffice.org/68195
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-22 13:35:22 +01:00
Noel Grandin
5febdea1d1
loplugin:unusedfields improve write-only when dealing with operators
...
Change-Id: I3a060d94de7c3d77a54e7f7f87bef88458ab5161
Reviewed-on: https://gerrit.libreoffice.org/68132
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21 12:04:28 +01:00
Andrea Gelmini
ffc59a0c4f
Fix typo
...
Change-Id: Ibd7c52137674eb07c35c951260a8102d06a436cc
Reviewed-on: https://gerrit.libreoffice.org/68130
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-21 07:00:00 +01:00
Stephan Bergmann
0626e66d76
Avoid loplugin:indentation after preproc conditional inclusion lines
...
...to not trigger (for --disable-dbgutil) at
> rContentAtPos.eContentAtPos = IsAttrAtPos::TableBoxFml;
> #ifdef DBG_UTIL
> if( RES_BOXATR_VALUE == pItem->Which() )
> rContentAtPos.eContentAtPos = IsAttrAtPos::TableBoxValue;
> else
> #endif
> const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->PtrToBoxNm( &pTableNd->GetTable() );
(sw/source/core/crsr/crstrvl.cxx:1710)
Change-Id: I8fd5c8a1cd40450bdd8cc97057e5233a0134f044
Reviewed-on: https://gerrit.libreoffice.org/68030
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-20 11:14:55 +01:00
Stephan Bergmann
38642dafb6
Better loplugin:unnecessaryparen check for vexing parse
...
Change-Id: Id7b09a8556da25b81c056d5811ba721e781682d6
Reviewed-on: https://gerrit.libreoffice.org/68025
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19 20:32:00 +01:00
Stephan Bergmann
6ba818779d
Make findOperator more precise wrt acceptable parameter types
...
Change-Id: I0a1ea253d999c9444344188d764134e83ae0c495
Reviewed-on: https://gerrit.libreoffice.org/67959
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18 14:52:43 +01:00
Stephan Bergmann
893ee43180
Tell about presumed corresponding negated operator
...
Change-Id: Ic7ed64ecc4902853dc7431294484abb74e8da65b
Reviewed-on: https://gerrit.libreoffice.org/67953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18 10:22:48 +01:00
Noel Grandin
aa51774e6a
loplugin:simplifybool, check for !(!a op !b)
...
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6
Reviewed-on: https://gerrit.libreoffice.org/67866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 07:15:57 +01:00
Caolán McNamara
294be3035a
drop newly unused code
...
drop now unused ListBoxWrapper
Change-Id: I19271de67269a9e23cf889a32910405cf3dc7a2a
drop unused SingleControlWrapper
Change-Id: I80bd639a9d64a1b35249c1c59c1c9d134ae6f1ca
drop unused PosValueMapper
Change-Id: I5e3d9ed48b5f544215ae82ba7899a62be4e59a25
drop unused ControlWrapperBase
Change-Id: I1890f492604ac848775e8d4b0070a3189a719a18
drop now empty itemconnect.cxx
Change-Id: I5374dbf91dbe715a563e7c694c9d96fb07d8f9c8
drop unnecessary controlwrapper.hxx
Change-Id: Ide633f64ca2851aee4f29a7f86e09cb78043d388
Reviewed-on: https://gerrit.libreoffice.org/67887
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-16 15:52:00 +01:00
Stephan Bergmann
177747c445
SourceManager::getExpansionRange already returns CharSourceRange since Clang 7
...
Change-Id: Ic7c6c648c71203116ca074bd7392a48ff850cd51
Reviewed-on: https://gerrit.libreoffice.org/67864
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-02-15 12:19:34 +01:00
Noel Grandin
e132e781d8
loplugin:simplifybool extend to !(a == b) where comparison an overloaded op
...
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7
Reviewed-on: https://gerrit.libreoffice.org/67816
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15 11:52:41 +01:00
Stephan Bergmann
bf1a511f9c
Make loplugin:stringconcat more robust
...
Change-Id: Ib8adefd90141007c0422b4c15ba9c2cc5f707f3f
Reviewed-on: https://gerrit.libreoffice.org/67762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-13 13:56:12 +01:00
Andrea Gelmini
6d52cd1c0b
Fix typo
...
Change-Id: I036a41bd4d46973a8b6fb51a90c6506cf3f9b8f0
Reviewed-on: https://gerrit.libreoffice.org/67748
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-13 05:07:43 +01:00
Stephan Bergmann
a072b15e96
More loplugin:indentation Qt "emit" hackery
...
Change-Id: I6f71546a5f6ab07bb4df6fc89213962e74984c84
2019-02-12 08:54:19 +01:00
Noel Grandin
0d1253c232
new loplugin writeonlyvars
...
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars
Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 13:25:31 +01:00
Noel Grandin
cc26cfd379
use more hasPathnamePrefix
...
Change-Id: I539e6aedad61d80b6ebe80104b77d720072395bd
2019-02-11 12:37:50 +02:00
Noel Grandin
c04eb27aff
remove debugging code
...
Change-Id: Ibb6f3a1c711959cb4f32541dba96f005e51c9040
2019-02-11 11:37:07 +02:00
Noel Grandin
8c0bb7692a
loplugin:indentation workaround qt macros
...
Change-Id: I17bb0b462bb4ce7e8128c9ad33491aa8b691e566
2019-02-11 10:59:35 +02:00
Noel Grandin
f76bf262a6
new loplugin indentation
...
look for mixed indentation in compound statements, which makes them hard
to read, and sometimes makes it look like a statement is associated with
a nearby if/for
Change-Id: Ic8429cee1f9a86d938097a4a8769a2bce97b3361
Reviewed-on: https://gerrit.libreoffice.org/63283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 08:24:19 +01:00
Stephan Bergmann
4d3571a309
Fix compilerplugins/clang/test/useuniqueptr.cxx for clang-cl
...
...where it failed with
> error: 'error' diagnostics expected but not seen:
> File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 266: rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]
> File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 275: rather manage this member with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]
apparently due to differences in how some std types are implemented.
Change-Id: Ib81ed1a1da867359e7f22bb6fb6ceb3e610e2b41
Reviewed-on: https://gerrit.libreoffice.org/67226
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-31 20:23:39 +01:00
Stephan Bergmann
8949f98d16
loplugin:unusedfileds is no-op on Windows, so don't run its test there
...
But nevertheless, make sure that the variables m_bar9/10 used in combination
with css::uno::Any have UNO-compatible type.
Change-Id: I241d8b5d37de60b00b5bfdc69e642872b28e8ee2
Reviewed-on: https://gerrit.libreoffice.org/67201
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-31 14:13:22 +01:00
Noel Grandin
37f8ea642c
loplugin:unusedmethods
...
Change-Id: Ifb0c479e9d1aed1cd90d78ed23902fc05db556d6
Reviewed-on: https://gerrit.libreoffice.org/66862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-25 08:07:40 +01:00
Noel Grandin
a6358f1c1b
improve loplugin constparams
...
Change-Id: Ic1833dbd030044011e7ee5f89dc35737e5469f05
Reviewed-on: https://gerrit.libreoffice.org/66586
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-25 07:58:04 +01:00
Noel Grandin
924da47e03
update useunique_ptr loplugin
...
with more exclusions
Change-Id: I95e7376ecf9c479d05b85c71f863d9ba40417538
Reviewed-on: https://gerrit.libreoffice.org/66552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18 07:51:04 +01:00
Stephan Bergmann
4828debf7b
New loplugin:empty
...
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe
Reviewed-on: https://gerrit.libreoffice.org/66430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-16 13:08:28 +01:00
Stephan Bergmann
dad7a53f11
Drop o3tl/string_view.hxx
...
...now that all of its uses have been replaced with C++17 <string_view>.
The LO-specific o3tl::basic_string_view ctors with OString and OUString params
have meanwhile been replaced with OString and OUString conversion functions (in
dac7be50cff94e0c34cdca5ac7e35c19685c40c1 "o3tl::string_view -> std::string_view
(in configmgr)"), the ctor with OUStringLiteral turned out to be no longer(?)
needed anyway, and the LO-specific o3tl::toOUString has meanwhile been replaced
with an OUString ctor with std::u16string_view param (in
6856da30665705be6380e84cf55de954c41f15d1 "o3tl::string_view -> std::string_view
(in embedserv)").
Change-Id: Ie5215b07e2387560fb7e94de8b5a963241539c64
Reviewed-on: https://gerrit.libreoffice.org/66144
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11 10:52:54 +01:00
Noel Grandin
7a26512fdb
loplugin:constantparam
...
Change-Id: Id5c7e66b8f8bc324f097dd739ce683d74fc6491b
Reviewed-on: https://gerrit.libreoffice.org/65953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08 10:05:45 +01:00
Andrea Gelmini
cc88570fe3
Fix typo in code
...
Change-Id: I3a4bfbd84735ddcc8d2d0754973f73a98e06c303
Reviewed-on: https://gerrit.libreoffice.org/65652
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-28 09:59:39 +01:00
Noel Grandin
526387b96e
loplugin:unnecessaryvirtual
...
Change-Id: I4ca101ba838afecbbc8e841a6a9fa6c9c0460f14
Reviewed-on: https://gerrit.libreoffice.org/65497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:26:51 +01:00
Noel Grandin
d9d8ec2521
loplugin:unusedfields
...
Change-Id: Ib41c168817c30ce11baf99c3f43005313fe484ff
Reviewed-on: https://gerrit.libreoffice.org/65496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:26:25 +01:00
Noel Grandin
eacc089ce8
loplugin:unusedmethods
...
Change-Id: I63f03bd1a0510bf411341e1a04a40eb7fce2d57e
Reviewed-on: https://gerrit.libreoffice.org/65495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:24:54 +01:00
Noel Grandin
61dfcdda88
loplugin:unusedfields improve write-only logic
...
when dealing with modifications to container classes (e.g. std::vector)
Change-Id: Ic30043631007355ee9a3d9e3f9b6488b435182d6
Reviewed-on: https://gerrit.libreoffice.org/65050
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13 08:37:58 +01:00
Noel Grandin
d2bc01ff10
loplugin:constantparam
...
Change-Id: I389f98d06058ba65a8c2d4df2bf7d4e5102659ad
Reviewed-on: https://gerrit.libreoffice.org/65017
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13 07:19:38 +01:00
Caolán McNamara
3bd103064b
weld SwCaptionOptPage
...
Change-Id: I3373a39d6d8b39717b7aec69544a9d2957db15d8
Reviewed-on: https://gerrit.libreoffice.org/65010
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-12 21:07:12 +01:00
Noel Grandin
a8c1db5483
loplugin:unusedfields
...
Change-Id: I9f11c29a5bcb3512717ad01962f5645de96afe0b
Reviewed-on: https://gerrit.libreoffice.org/64918
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11 10:37:52 +01:00