2001 Commits

Author SHA1 Message Date
Noel Grandin
7e19677fe9 loplugin:unusedfields
Change-Id: I03e8814407fd8e345cb07ac433db4230b4d96e10
Reviewed-on: https://gerrit.libreoffice.org/64822
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10 07:59:29 +01:00
Noel Grandin
0d43b791e6 loplugin:unusedmethods
Change-Id: I4f2635d468c9ad83b3ac93733529e01a4d03f38e
Reviewed-on: https://gerrit.libreoffice.org/64805
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-09 07:18:17 +01:00
Stephan Bergmann
ab9b67bbb0 Remove obsolete SAL_FALLTHROUGH completely
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"

Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08 13:28:16 +01:00
Andrea Gelmini
e5efd197ad Removed spurious chars
$ file compilerplugins/clang/singlevalfields.results -i

Before:
    compilerplugins/clang/singlevalfields.results: application/octet-stream; charset=binary

After:
    compilerplugins/clang/singlevalfields.results: text/x-c; charset=iso-8859-1

Then converted to UTF-8, to avoid troubles reading it with Python/Editors without
forcing latin-1, like this:

UnicodeDecodeError('utf-8', b'    SwWW8ImplReader::Read_F_DocInfo aName41
    ZULETZTGEDRUCKT
sw/source/filter/ww8/ww8par5.cxx:1569
    SwWW8ImplReader::Read_F_DocInfo aName42
    DERNI\xc8REIMPRESSION
', 155, 156, 'invalid continuation byte')

See here:
https://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte

Change-Id: Ie54c25e069b3f12b6a28e3724f5b2d323f26f737
Reviewed-on: https://gerrit.libreoffice.org/64786
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08 12:48:24 +01:00
Noel Grandin
38187ec15b loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07 07:38:24 +01:00
Stephan Bergmann
efe2889549 Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION changed
Not all compilerplugins/clang/*.cxx depend on config_clang.h (e.g., check.cxx
doesn't), so this mechanism trying to rebuild compilerplugins once the
underlying Clang installation changes doesn't work reliably in practice (just
debugged through this with Miklos on IRC, and it wasn't the first time that
`make distclean` fixed compilerplugins for somebody after they upgraded their
Clang installation).  Removing the brittle mechanism shows that plugin.hxx
doesn't actually depend on config_clang.h.

(There's a second mechanism trying to rebuild compilerplugins once the
underlying Clang installation changes, namely

> # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
> $(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang$(CLANG_EXE_EXT)
>         $(QUIET)touch $@

in compilerplugins/Makefile-clang.mk, but that doesn't work reliably either, as
it depends on the newly installed clang executable being newer than our
clang-timestamp file, which will be the case for self-built Clang installations,
but not necessarily when updating e.g. a distro-provided Clang installation.)

Change-Id: Ie576f14356b3f0e55444375095c86aa851404bf3
Reviewed-on: https://gerrit.libreoffice.org/64623
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-06 08:37:14 +01:00
Noel Grandin
84568fb1ba loplugin:singlevalfields add checking for static class fields
which required a completely different set of code

Also add checking for in-class initialiser on struct/class fields

Change-Id: I31e1586975aaafe23996619e2f59678c5fbc390f
Reviewed-on: https://gerrit.libreoffice.org/64593
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 10:45:40 +01:00
Noel Grandin
e4472d3c13 loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 07:49:30 +01:00
Noel Grandin
e909028cab loplugin:unusedenumconstants look through parentheses
Change-Id: I2afdf5a56d827e283dd2362b87446ad7848cb274
Reviewed-on: https://gerrit.libreoffice.org/64452
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-04 07:12:19 +01:00
Noel Grandin
93e0622d00 loplugin:intvsfloat get this working reliably
Change-Id: Ifdf1a152f6bc2e2f6edae97a5191120f630f7e49
Reviewed-on: https://gerrit.libreoffice.org/64374
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-02 11:46:39 +01:00
Stephan Bergmann
9eff2ebf38 Make some loplugin:implicitboolconversion code use TypeCheck
Change-Id: If675d629784894573085122beadc6abc3e67f457
Reviewed-on: https://gerrit.libreoffice.org/64335
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-30 15:59:54 +01:00
Noel Grandin
437adaac0a loplugin:unusedmethods
Change-Id: Id0d68d659fa06a8230ed0d927b85b6b504525d1e
Reviewed-on: https://gerrit.libreoffice.org/64328
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 12:57:58 +01:00
Noel Grandin
3f88f1a6f4 loplugin:unusedfields
Change-Id: Ib3c797584493763773fd44fc3e8ac8b70ab0c221
Reviewed-on: https://gerrit.libreoffice.org/64326
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 12:22:47 +01:00
Noel Grandin
14b366e57a loplugin:singlevalfields
Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43
Reviewed-on: https://gerrit.libreoffice.org/64327
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 12:18:04 +01:00
Noel Grandin
3b48c94527 loplugin:unusedenumconstants ignore common pattern
Ignore a common pattern that does not introduce any new information,
merely removes information.

Change-Id: I37da352c9295ec12b9dac7aad4b4792a6d726b0d
Reviewed-on: https://gerrit.libreoffice.org/64255
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 08:33:15 +01:00
Noel Grandin
933660e591 loplugin:stringconstant look for unnecessary OString constructor use
and tweak the methods in check.hxx to make them more flexible when
called with
   dc.Class(xxx ? "foo" : "bar")

Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1
Reviewed-on: https://gerrit.libreoffice.org/64207
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29 09:57:15 +01:00
Stephan Bergmann
b9c9c70157 Revert "comment out the EvaluateAsInt compat code for now"
This reverts commit da9fb5d6d9ebf9363981c370ce937d8848989fcb, obsoleted by
<http://llvm.org/viewvc/llvm-project?view=revision&revision=347756> "Re-commit
r347417 'Re-Reinstate 347294 with a fix for the failures.'"
2018-11-29 09:56:10 +01:00
Noel Grandin
07c607b8a2 remove unused SdrInsertFlags enum value
Change-Id: Ic68f2dc4e3752859c943d9885b52b70f33896aea
Reviewed-on: https://gerrit.libreoffice.org/64172
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29 07:19:03 +01:00
Noel Grandin
da9fb5d6d9 comment out the EvaluateAsInt compat code for now
sberg: Note how that Clang change keeps getting reverted; latest one is
<http://llvm.org/viewvc/llvm-project?view=revision&revision=347656>
"Revert r347417 'Re-Reinstate 347294 with a fix for the failures.'"  But
lets wait a little while to see how things settle there.

Change-Id: I05b34ca1377792bcb4c557defd3e9b5d11ee2b14
Reviewed-on: https://gerrit.libreoffice.org/64168
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29 07:17:07 +01:00
Noel Grandin
19c56b3bef loplugin:unusedfields in sw
Change-Id: I7a9184511df96bf2a6c40e39091010a7e2974ed6
Reviewed-on: https://gerrit.libreoffice.org/64143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28 09:35:24 +01:00
Noel Grandin
3abf4b91da loplugin:unusedmethods
Change-Id: Idbdf2d5d12fad894a3dfc3a86cae839502f42cf6
Reviewed-on: https://gerrit.libreoffice.org/64114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28 08:27:56 +01:00
Noel Grandin
0d4298a988 loplugin:unnecessaryvirtual
Change-Id: I3e6424e10eade04951f8ab24bb61af4ce19d1204
Reviewed-on: https://gerrit.libreoffice.org/64113
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 18:43:53 +01:00
Noel Grandin
75dd5d2e73 add EvaluateAsInt compat function for latest clang
the old EvaluateAsInt method has been dropped as from current clang

Change-Id: Ie30d1547ad8de777badff4b380d2fc9fb261e8fe
Reviewed-on: https://gerrit.libreoffice.org/64107
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 17:16:05 +01:00
Noel Grandin
7a581b977e remove unused BorderWindowStyle enum value
Change-Id: I05ae398b75bbafe9b144a90e6735cf7d5e532ce4
Reviewed-on: https://gerrit.libreoffice.org/64097
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:42:22 +01:00
Noel Grandin
b6449c65da remove unused EEControlBits enum value
Change-Id: Ic363903bb6e32c029f5aac6810f69d590df1bf79
Reviewed-on: https://gerrit.libreoffice.org/64091
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:41 +01:00
Noel Grandin
7290ce233d remove unused EVControlBits enum values
Change-Id: I4e10f0a2f40f9e7b6cc40a810468f43b2ab97aa9
Reviewed-on: https://gerrit.libreoffice.org/64090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:22 +01:00
Noel Grandin
f691472b6c remove unused SfxObjectShellFlags enum values
Change-Id: I945047c0955bc66602d1a5033197a7405a69a8d3
Reviewed-on: https://gerrit.libreoffice.org/64089
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:41:06 +01:00
Noel Grandin
3145a03d14 remove unused GraphicsStateUpdateFlags enum values
Change-Id: I1a83c897d93a29d38aebccdba33be7b70592922e
Reviewed-on: https://gerrit.libreoffice.org/64096
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 14:04:45 +01:00
Noel Grandin
a4a98dd035 remove unused SfxViewShellFlags enum value
Change-Id: Ie754752203dcb066c69dff6effb835d7e1db1753
Reviewed-on: https://gerrit.libreoffice.org/64088
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:56:13 +01:00
Noel Grandin
4a68aec049 remove unused enum storeAccessMode value
Change-Id: I88a53e285cc3e8b6cc1c67b1e56322a918554de6
Reviewed-on: https://gerrit.libreoffice.org/64087
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:55:19 +01:00
Noel Grandin
3dba3a2984 remove unused BrowserMode enum values
Change-Id: I46eb4145bd79253c1c20b7a03d82b6873402d9ac
Reviewed-on: https://gerrit.libreoffice.org/64086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:54:59 +01:00
Noel Grandin
1fb4a21198 remove unused SvxIconViewFlags enum values
Change-Id: I31f810383fb92b2d0dbe9fa9162b77f137154e91
Reviewed-on: https://gerrit.libreoffice.org/64085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:54:09 +01:00
Noel Grandin
fb56de2ef7 remove unused RulerBorderStyle enum values
Change-Id: I4f10e323293485e7a1969fd4c80873aa05971e6c
Reviewed-on: https://gerrit.libreoffice.org/64084
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:53:26 +01:00
Noel Grandin
e54d65dea8 remove unused SvxLanguageListFlags enum values
Change-Id: I89a6244c01be811bfdfc443f687708ed6aec8a10
Reviewed-on: https://gerrit.libreoffice.org/64083
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 13:53:07 +01:00
Noel Grandin
876463415a remove unused SdrSearchOptions enum values
Change-Id: I0a8867399699d1c5ce17c2e5dadf96510246f173
Reviewed-on: https://gerrit.libreoffice.org/64067
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:18:12 +01:00
Noel Grandin
ce6ac77816 remove unused PolyOptimizeFlags enum values
Change-Id: I3a2145277212b7b45c25bea2e33aae3f6f4a7776
Reviewed-on: https://gerrit.libreoffice.org/64066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:17:25 +01:00
Noel Grandin
33e80611c4 remove unused SubsFontFlags flags
and document in the registry that the SubstFontsPS is unused

Change-Id: I66a9e0b4353f17b34cffb02823726c9887b7bdd3
Reviewed-on: https://gerrit.libreoffice.org/64065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:16:40 +01:00
Noel Grandin
11fc3b52db remove unused BmpDitherFlags enum values
Change-Id: I09a0eb661b66da78d8b3809124930bc761960712
Reviewed-on: https://gerrit.libreoffice.org/64064
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:15:31 +01:00
Noel Grandin
190de05d55 remove unused DrawButtonFlags enum value
Change-Id: I5e1a92d94e5b7963c8162b74f1b67dbbf3eeccc9
Reviewed-on: https://gerrit.libreoffice.org/64063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:15:14 +01:00
Noel Grandin
40c487469b remove unused HelpEventMode enum value
Change-Id: I0fffa7b02ac61ef009e566d04b903cc02e9b4b3d
Reviewed-on: https://gerrit.libreoffice.org/64062
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:14:46 +01:00
Noel Grandin
ba51e42167 remove unused GraphicManagerDrawFlags enum value
Change-Id: I9e832da8f6b7a90d72c07ab712cbe00774496b76
Reviewed-on: https://gerrit.libreoffice.org/64060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 10:14:13 +01:00
Noel Grandin
30c953423a remove unused QuickHelpFlags enum value
Change-Id: Ia40e882af0df396895a19dd34caa60461cdf6c12
Reviewed-on: https://gerrit.libreoffice.org/64059
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27 07:26:35 +01:00
Noel Grandin
0111686c21 remove unused SalLayoutFlags enum values
Change-Id: I5d1559c2cb201ec69fc6353aaf491fbb5c0534dd
Reviewed-on: https://gerrit.libreoffice.org/64047
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 19:13:38 +01:00
Noel Grandin
b8b7963302 remove unused DrawModeFlags enum values
Change-Id: I86775a5b7609f5e85c8fcc18a0be7e0ee3c8f84c
Reviewed-on: https://gerrit.libreoffice.org/64046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 19:13:20 +01:00
Noel Grandin
b3505dd7ad remove unused enum value ConvertDataFormat::PDF
Change-Id: I61023dc049b914fee1d5d8918b99972d34a82b4a
Reviewed-on: https://gerrit.libreoffice.org/64042
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 19:13:08 +01:00
Noel Grandin
37b3502b5c remove unused enum value SplitWindowItemFlags::Invisible
Change-Id: I4d63601ca3658b4ffd9eaf1c13d4c17503640aa0
Reviewed-on: https://gerrit.libreoffice.org/64041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 19:11:57 +01:00
Noel Grandin
acfa3917ab remove unused enum value SvTLEntryFlags::IN_USE
Change-Id: Ieb09d4d28cc2084da4660165a96561ee57d2420d
Reviewed-on: https://gerrit.libreoffice.org/64029
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 15:44:49 +01:00
Noel Grandin
12d0c06703 remove unused enum value TrackingEventFlags::DontCallHdl
Change-Id: I75b28d20e2e0954fbd2fee396b8e06e9bb7d7073
Reviewed-on: https://gerrit.libreoffice.org/64028
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 14:07:48 +01:00
Noel Grandin
ea72ad4474 remove unused ShowFlags::NoParentUpdate
Change-Id: Id63e1d73643a18d823dfcb35479f0f8eb3e20b15
Reviewed-on: https://gerrit.libreoffice.org/63972
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 14:07:37 +01:00
Noel Grandin
aaad3500b3 remove some unused enum values in xmloff
(*) also make it more obvious what XMLShapeExportFlags::SIZE represents

Change-Id: Ie63edf0f2827f171542037b819ebe7d55e090275
Reviewed-on: https://gerrit.libreoffice.org/63948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26 10:41:14 +01:00