973 Commits

Author SHA1 Message Date
Noel Grandin
12b2803f19 drop unused PRESOBJ_IMAGE
Change-Id: I8fa011bea423e961a3ebe7cd8687e4bce7c4cd77
2017-02-15 09:36:42 +02:00
Noel Grandin
1342a8a4f2 drop unused SwChildWindowMailmerge from SfxShellFeature enum
Change-Id: Ica64d75986877bc0b2fc3bafb092457396fb8e27
2017-02-15 08:33:37 +02:00
Noel Grandin
dfd5510a7a convert SmBracketType to scoped enum
and drop unused enumerators

Change-Id: Icda3ff510331f9f0adb97d6dac56edf325d0d1a7
2017-02-15 08:33:37 +02:00
Noel Grandin
e48f0084df remove unused AccessibilityChanged from SfxHintId enum
Change-Id: Ic2d413002466e92d38a7a918b3f7e04d3c9eebf2
2017-02-15 08:33:37 +02:00
Noel Grandin
89c24a380a convert SvxIconChoiceCtrlPositionMode to scoped enum
and drop unused AutoAdjust enumerator

Change-Id: Ie900f89241947cb93a16f0223071846fecfef09c
2017-02-15 08:33:37 +02:00
Noel Grandin
923fd24972 convert svt::table::TableArea to scoped enum
and drop unused TableAreaDataArea enumerator

Change-Id: I00da558ab899dccbeaa9786c65f7a2831f323b25
2017-02-14 14:22:24 +02:00
Noel Grandin
7bd5d9c81b convert to EnumerationResult to scoped enum
and drop unused RUNNING constant

Change-Id: I498b8b47e172336775b38c953f867f2adc57603e
2017-02-14 14:22:24 +02:00
Noel Grandin
2b2cd4b06e convert SvxPrevLineSpace to scoped enum
Change-Id: I5903169e1d7728a2f1e547efdff82a75e8d7b6a7
2017-02-14 14:22:24 +02:00
Noel Grandin
b0a23c4c35 remove unused BreakedLine enumerator from SdrMeasureTextVPos
Change-Id: I28cf3d36c1427b382aea1925d2dd94ace0d2a443
Reviewed-on: https://gerrit.libreoffice.org/34204
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 08:09:24 +00:00
Noel Grandin
078ce1d597 convert SvxXMLTableImportContextEnum to scoped enum
and drop unused stice_unknown enumerator

Change-Id: Ia2d363c9e8d9e501bbfb6f9bb5838b109ce8593b
Reviewed-on: https://gerrit.libreoffice.org/34201
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 08:08:58 +00:00
Noel Grandin
251decd320 remove unused BrkAction enumerator from SdrEventKind
Change-Id: I46c50bbbad5d269b7f15e041db115fa7f37a8168
Reviewed-on: https://gerrit.libreoffice.org/34205
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 07:13:10 +00:00
Noel Grandin
d8499c45eb convert ShellModes to scoped enum
and drop read-only SHELL_MODE_DRAW_CTRL enumerator

Change-Id: I2ccaeb492912c876b89ff9b5dccaa99e28a268b7
2017-02-13 08:17:42 +02:00
Noel Grandin
f149f5abed convert eF_ResT to scoped enum
and drop read-only FLD_TAGTXT enumerator

Change-Id: I718529082ce540c0e3bca37d969917d3b3a67f5e
2017-02-13 08:17:42 +02:00
Noel Grandin
cdbe81f2ac convert SW_KeyState to scoped enum
and drop unused InsDel_* enumerators.
Also rename to SwKeyState to make it a little shorter and more
consistent with other naming.

Change-Id: I837ea8d64a0f26426567dcf78750939fc959a4a4
2017-02-13 08:17:42 +02:00
Stephan Bergmann
c0f241e80f SourceManager::getFilename returns StringRef
Change-Id: I77db8565efe2e0d366afc8470308d7801a2a7337
2017-02-11 20:31:37 +01:00
Stephan Bergmann
07bcdbaed1 loplugin:dynexcspec: Deallocation functions are implicitly non-throwing
...so a dynamic exception specification should be replaced with noexcept(false).
Doesn't look like this omission made any difference when running the rewriter
across the LO code base earlier, though.

Change-Id: Ib0e2b412b65cae7c1a68e875bbddf93f3656cebb
2017-02-10 17:52:15 +01:00
Stephan Bergmann
57a505e8e9 Remove unnecessary blacklists from loplugin:stringconstant
Change-Id: I866a421a2b3e8830aaa7096adaef945a2264195e
2017-02-10 17:49:45 +01:00
Noel Grandin
6e12729f71 remove unused enumerator from EncodedWordState
Change-Id: I793276d2b13bdb966e18acb8f13b4c7e77516898
2017-02-10 08:08:45 +02:00
Noel Grandin
3e33fbd269 restore constant to VerticalOrientation
Removed in commit f4826959c1a5b0e6d2849d4240668b2087582848
"new loplugin:unusedenumconstants".
And add a comment.

Change-Id: I63d6f46aa92e31db08e51e47a62104dc7d3d3359
Reviewed-on: https://gerrit.libreoffice.org/34057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09 10:09:08 +00:00
Noel Grandin
bca47d830e remove ConnectionIdentifierType enum
since we only use the AsciiCString enumerator.
Consequently simplify the GetConnectionIdentifier method

Change-Id: I9e1a1318d2f12bfd18edeb8479e0e7171b22d0f1
Reviewed-on: https://gerrit.libreoffice.org/34026
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09 09:51:05 +00:00
Stephan Bergmann
8458ec8c9c Fix SAL_DEBUG_BACKTRACE
...after 56d071c10ca8016848f1f059aa3eb197fe928844 "rename SAL_DEBUG_TRACE to
SAL_DEBUG_BACKTRACE" (looks like this doesn't get used much...)
2017-02-09 10:35:20 +01:00
Noel Grandin
afc755fa61 loplugin:unusedenumconstants read-only constants in vcl (2)
Change-Id: Ia3da23e0ef2fa710403745bd11255ed001516da4
Reviewed-on: https://gerrit.libreoffice.org/34020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09 05:46:03 +00:00
Noel Grandin
65b7b6322b loplugin:unusedenumconstants read-only constants in vcl
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2
Reviewed-on: https://gerrit.libreoffice.org/34018
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 12:42:52 +00:00
Noel Grandin
25702ff6c9 loplugin:unusedenumconstants read-only constants in writerfilter
Change-Id: I3cc0d696059b130a8f1f1d8d3b1908d2e84d1a75
Reviewed-on: https://gerrit.libreoffice.org/34017
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 11:00:32 +00:00
Noel Grandin
b2453d1f41 convert DEBUG_TIME to scoped enum
Change-Id: I91b286d8415ebc8c6675aca6ee143850c956c74b
Reviewed-on: https://gerrit.libreoffice.org/33986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07 07:43:32 +00:00
Noel Grandin
c1380c0039 drop unused FONT_PROPTYPE_CELL constant
which makes this enum not necessary anymore

Change-Id: I0194634d357569aee502f1e8a7fd95c49e23040c
Reviewed-on: https://gerrit.libreoffice.org/33967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07 06:01:50 +00:00
Noel Grandin
d91c81e433 convert GalleryBrowserTravel to scoped enum
and drop unused GALLERYBROWSERTRAVEL_CURRENT value

Change-Id: Id91824cbe024d4b5109ee0755b518164837bc6a6
Reviewed-on: https://gerrit.libreoffice.org/33965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07 06:01:27 +00:00
Noel Grandin
fde0b8df30 loplugin:unusedenumconstants in oox
Convert FragmentHandler2::MCE_STATE to scoped enum and drop MCE_UNUSED
constant

Change-Id: Id0b3a81e61d77af5d3837527b008e196835f57cd
Reviewed-on: https://gerrit.libreoffice.org/33954
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 11:36:17 +00:00
Stephan Bergmann
3ea39bda0e loplugin:unusedenumconstants should apparently not be run by default
Change-Id: I42f479de39b94ca8e9c72a6e92534f602a9fad39
2017-02-06 11:57:39 +01:00
Noel Grandin
c9c3cb5446 loplugin:unusedenumconstants in connectivity..cui
Convert ExpressionFunct to scoped enum and drop FUNC_CONST value.
Convert MQueryExpressionBase::node_type to scoped enum and drop Unknown
value.
Dop PageType::Color value

Change-Id: Icb1f5503c230fb91329acc7d9e1da665fa28d95e
Reviewed-on: https://gerrit.libreoffice.org/33948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 09:13:25 +00:00
Noel Grandin
bac9a5d634 loplugin:unusedenumconstants in framework
Convert EProtocol to scoped enum and drop E_UNKNOWN_PROTOCOL.
Convert ToggleButtonToolbarController::Style to scoped enum and drop
STYLE_TOGGLEBUTTON.
Convert TargetHelper::ESpecialTarget to scoped enum and drop
E_NOT_SPECIAL.

Change-Id: I412adacac15192cf6563ce4d5e5b74bfffff4737
Reviewed-on: https://gerrit.libreoffice.org/33949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 07:57:28 +00:00
Noel Grandin
fcb0280c10 remove accidentally committed files
Change-Id: Ib41f16f945f6b7a5ba314b13ce8a7b24c35a8edb
Reviewed-on: https://gerrit.libreoffice.org/33947
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 07:57:15 +00:00
Noel Grandin
8b2ffb280b loplugin:unusedenumconstants in vcl
- drop TTCR_GLYPHSEQ
- drop ImageType::Invalid
- give preedit_data_t a default constructor, so my plugin spots that the
eState field is being initalised to DontKnow effectively by a memset
- document ToolbarIconSize::Small as unused, but can't remove since
it might be stored in a user-setting somewhere

Change-Id: I94b34bba83a04de16f95e4faec95b4bd29f3c652
Reviewed-on: https://gerrit.libreoffice.org/33887
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 05:48:02 +00:00
Miklos Vajna
839e53b933 compilerplugins: enable loplugin:cppunitassertequals by default
This forces writing a comparision of two variables in the
CPPUNIT_ASSERT_EQUALS(expected, actual) form, rather than
CPPUNIT_ASSERT(actual == expected). The benefit is when the test fail,
it's more clear what are these two values, rather than just seeing that
they are not equal.

In the relatively rare case when the types are not streamable, the
plugin can be silenced using CPPUNIT_ASSERT(bool(it == foo.end())). But
please always first consider making the type streamable instead. See
commit 0e1b831b93048c68735f2e2dbdcee587db4862ef
(CppunitTest_vcl_complextext: fix loplugin:cppunitassertequals warnings,
2016-12-16) for an example.

Change-Id: I564fb0724836b6dbbea9262b53ad646e285a339c
2017-02-03 12:20:03 +01:00
Noel Grandin
22326cb4f5 new loplugin unusedenumvalues
Change-Id: I03d684fc35238a45a6d99855e5ee6d3a5e33740d
2017-02-03 11:28:44 +02:00
Stephan Bergmann
6abbbe7015 Fix copy/move ctor check
Change-Id: I2993d5809204098e29a7560d666fa1aafb024a89
2017-02-02 11:49:20 +01:00
Noel Grandin
02957bc3b7 loplugin:stringconstant, this should be a break
after commit dce867e8c4863c969eea3515a988630b74708a43
"loplugin:stringconstant handle calls to constructors with one arg"

Change-Id: Ib572d904a95aa96aab3c799f9b7cfb505fcee5e6
2017-02-02 11:35:06 +02:00
Stephan Bergmann
1028e5192c More ctor check fixes
Change-Id: Ifcce63b975fb7c4ac7e7545e3eadcc6f7f12e466
2017-02-01 15:38:50 +01:00
Stephan Bergmann
836b74aead Fix ctor check
Change-Id: Ie261d5412c510c045b4d93a6bf1a3d4cf4371897
2017-02-01 15:31:37 +01:00
Noel Grandin
994e38e336 loplugin: use TypeCheck instead of getQualifiedNameAsString
since the latter is rather slow

Change-Id: Ib73cdb923585580777c2265b561c1808e93b2baa
Reviewed-on: https://gerrit.libreoffice.org/33585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 12:49:42 +00:00
Noel Grandin
2489000d3f loplugin:useuniqueptr extend to check local vars
just the simple and obvious case for now, of a local var being allocated
and deleted inside a single local block, and the delete happening at the
end of the block

Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625
Reviewed-on: https://gerrit.libreoffice.org/33749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 12:15:22 +00:00
Noel Grandin
dce867e8c4 loplugin:stringconstant handle calls to constructors with one arg
Change-Id: Ide9148a908bef46ba14640dfa6f556beaf6e3f60
Reviewed-on: https://gerrit.libreoffice.org/33772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 07:57:16 +00:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Stephan Bergmann
53a9e834f0 ...and Clang 4 will have it, too
Change-Id: Ia927ed7d1e7815e59ccb67246da6981c65683168
2017-01-27 11:58:18 +01:00
Stephan Bergmann
f4fac7f341 getExceptionSpecSourceRange is new in Clang 5
Change-Id: Ifa9223fadeeb1fde54afc99874a1b3d855073dce
2017-01-27 11:50:36 +01:00
Noel Grandin
2d506f4c3d fix spelling containging->containing
Change-Id: I49f736c049735e89ce9f71740f5c308120378a9a
2017-01-27 12:43:41 +02:00
Noel Grandin
4511431fb6 improve "unnecessary user-declared destructor" check
to look for inline&empty destructors, where we can just let
the compiler do it's thing

Change-Id: Ibde8800bdfed6b77649c30ebc19921167c33dec3
Reviewed-on: https://gerrit.libreoffice.org/32999
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 09:49:04 +00:00
Stephan Bergmann
1a90a23d9f Enable loplugin:dynexcspec rewriting mode
Change-Id: I73404287c387a36e224683f75e967d51d911175b
2017-01-27 10:47:16 +01:00
Stephan Bergmann
38da1ed919 Make plugin rewriting work on Windows too
...in a somewhat hacked-up way for now (see the TODO comment)

Change-Id: Ida89fb8257b876cfca05b3048ce15996091c5703
2017-01-27 10:46:15 +01:00