542 Commits

Author SHA1 Message Date
Noel Grandin
7e1bb64f14 loplugin:mergeclasses OOXMLPropertyImpl into OOXMLProperty
Change-Id: I1447cfc76c529332450c90a21b6525d3103fe852
2015-12-07 11:01:59 +02:00
Noel Grandin
9f0f30fa35 loplugin:mergeclasses, merge OOXMLPropertyImpl into OOXMLProperty
Change-Id: I73eb7e664c0a53f135c06c3d8ea450bd9493c780
2015-12-07 11:01:58 +02:00
Stephan Bergmann
0e54605e61 loplugin:stringconcat: Also look through O[U]String ctors
Change-Id: I4f07c7c61d324a85f9f5dee0f25a7358facebd41
2015-12-02 14:01:56 +01:00
Stephan Bergmann
f540e9264c loplugin:stringconcat: Handle base case of recursion into left arg
Change-Id: I9ed8586e8b77b009d55e411fdaa863eefc38b1c2
2015-12-02 14:01:55 +01:00
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Noel Grandin
25120e73f9 loplugin:mergeclasses, OOXMLTableImpl into OOXMLTable
Change-Id: I28f6d317ca02cf23341358f9520de273af603bd7
2015-11-30 10:04:03 +02:00
Noel Grandin
abc6071b7a loplugin:unusedfields various
Change-Id: I18f94269a1172cf195ee402384f7144610e1e82d
2015-11-26 13:26:25 +02:00
Miklos Vajna
16677bbdb8 compilerplugins: adapt comment
...after 49c2b9808df8a6b197dec666dfc0cda6321a4306
"bin/rename-sw-abbreviations.sh"

Change-Id: Ibd74246403bead8100d181b335f9145013f31e5e
2015-11-26 10:18:52 +01:00
Stephan Bergmann
8830956414 Adapt whitelisted names
...after 49c2b9808df8a6b197dec666dfc0cda6321a4306
"bin/rename-sw-abbreviations.sh"

Change-Id: I90cec551bdc52ea4d76dd9e32b45692e8a3be70f
2015-11-26 09:58:15 +01:00
Noel Grandin
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
Noel Grandin
234884c09d loplugin:unusedfields in include/sot,include/svl,include/svtools
Change-Id: Ia2dd13c2c48b127ab85311a668fa1f37608d360a
2015-11-25 08:25:09 +02:00
Noel Grandin
f273676325 update unusedfields plugin to use new clang warn_unused attribute support
Change-Id: I7b84de29b672e40cbf3c3d340d235f334d2be8cb
2015-11-24 11:04:33 +02:00
Noel Grandin
dd351dd728 loplugin:unusedfields in vcl/
and remove the unused SALEVENT_MOUSEACTIVATE stuff

Change-Id: Ieb85872eca68621c6a7be47ff5dbea12f7690507
Reviewed-on: https://gerrit.libreoffice.org/20140
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-24 08:17:55 +00:00
Noel Grandin
acc4acb9ca loplugin:unusedfields in tools/
Change-Id: Ic460bf42cbcf356cdcebbd5060a0dad3d3caa4ef
2015-11-24 08:09:24 +02:00
Noel Grandin
8770cd3894 loplugin:unusedfields in sw/
Change-Id: I323a038e5581b00cd3a4ea2f362c66540377759e
2015-11-24 08:05:02 +02:00
Noel Grandin
05eda0dc19 loplugin:unusedfields in sc
Change-Id: If5123e676a27302f3e11475309bc748977c6f430
2015-11-23 08:55:53 +02:00
Noel Grandin
3aff028b8f loplugin:unusedfields in dbaccess
Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8
2015-11-20 14:06:49 +02:00
Noel Grandin
ad278c2b3a loplugin:unusedfields in basctl
and improve the plugin to search for only WARN_UNUSED and fundamental
types

Change-Id: Ic06207758e28d44d64d76d8119fd76b5b098bb05
2015-11-20 11:48:48 +02:00
Noel Grandin
1d5c39192e new loplugin:unusedfields
run it over the framework module

Change-Id: I1220a4be0936ba30136ce22ffd78633c8a7b9d35
2015-11-20 10:12:58 +02:00
Stephan Bergmann
b0339005b8 loplugin:sallogareas
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19 16:05:35 +01:00
Stephan Bergmann
526bbbbd2f isLookupContext already available in Clang 3.7.0
Change-Id: Ia17a116b1f7605b5a8d572c6a6f4ef64adea8f94
2015-11-19 10:12:17 +01:00
Stephan Bergmann
4a6268f0d3 Adapt compilerplugins to old Clang versions
Change-Id: I91335f1e81e251f0578792517dded9fae239fb61
2015-11-19 09:19:30 +01:00
Michael Stahl
526bfba0a0 vcl, sd: rename some overly generic static variables
Change-Id: I89159df36361f9ceff3401ef379c8230465617b7
2015-11-17 23:49:50 +01:00
Stephan Bergmann
6e6c095187 Fix check for std::weak_ptr (that may be in an inline namespace)
Change-Id: I048aef08df43d07544aafc69b711d258dc40bc21
2015-11-17 21:50:45 +01:00
Stephan Bergmann
27b45cc23c Work around loplguins:badstatics
Change-Id: I597dbc3e4288acb5b71f7a344ae78ba568451614
2015-11-17 21:31:46 +01:00
Stephan Bergmann
60c51ac007 Work around loplguins:badstatics
Change-Id: I9d8d0f6cc001de09d8d3f96d8ad7e243e07f426d
2015-11-17 19:38:41 +01:00
Stephan Bergmann
b0526e291d Work around loplguins:badstatics
Change-Id: I243dcb86cc1a99550b26962daf47c19eb62aa8df
2015-11-17 16:41:40 +01:00
Stephan Bergmann
b45aef86fa Improve comment
Change-Id: I25931d59fc1b4feb1fd1eaa036a64a28a269f409
2015-11-17 16:28:33 +01:00
Stephan Bergmann
097f8d6dbc Work around loplugin:badstatics
...about

  static ImplImageTree instance;

in ImplImageTree::get (vcl/source/gdi/impimagetree.cxx) due to

  StyleIconSet ImplImageTree::maIconSet;

(of type std::unordered_map<OUString, IconSet, OUStringHash>) due to

  IconCache ImplImageTree::IconSet::maIconCache;

(of type std::unordered_map<OUString, std::pair<bool, BitmapEx>, OUStringHash>),
reported at least when building against Mac libc++.  This is a false positive,
as ImplImageTree::shutDown cleans this up.

Change-Id: Idb1a99aa33f71286e57b31b7adb833e3ee8b5f5a
2015-11-17 16:21:51 +01:00
Stephan Bergmann
530bc021eb Improve loplugin:badstatics diagnostic output
Change-Id: Ia2f088a79b03ff866429e1cae73edccd36a01b4f
2015-11-17 15:05:34 +01:00
Stephan Bergmann
8312d2816a Use a DiagnosticsEngine::Note
...a Remark prints the whole stack of includes leading up to the source

Change-Id: I41e5bd2855b4a55b54e63432703f2e65b4c44249
2015-11-17 14:27:05 +01:00
Noel Grandin
d9e6270392 loplugin:unnecessaryvirtual
update the plugin with lessons learned from the mergeclasses plugin and
re-run it

Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711
Reviewed-on: https://gerrit.libreoffice.org/20015
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17 12:26:32 +00:00
Michael Stahl
2ee802245e compilerplugins: enhance badstatics plugin to follow pointers
.... and references. This gives numerous false positives as pointers may
be re-set prior to shutdown, so needs a white-list.

Change-Id: I19a011c6f19501cc31b3d9ae76b599296f132478
Reviewed-on: https://gerrit.libreoffice.org/19949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-17 09:19:24 +00:00
Samuel Mehrbrodt
40fa83871e Move CommandInfoProvider to vcl and use it from there
Change-Id: If7e3ef81cad8974bc54f359096e3ecc700fa62d6
Reviewed-on: https://gerrit.libreoffice.org/19984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-16 14:48:47 +00:00
Samuel Mehrbrodt
099f1016fa Cleanup: Consolidate the different ways to get command labels/tooltips
Change-Id: Ieab809a3122c9d592894b84ec2e68195a4e02dde
2015-11-16 08:08:09 +01:00
Noel Grandin
3bdd176731 cppcheck:stlIfStrFind
"Inefficient usage of string::find() in condition; string::compare() would be faster."

Change-Id: I90403b1d05eff6499c10be33068e5fd4fed30b62
Reviewed-on: https://gerrit.libreoffice.org/19966
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 06:46:07 +00:00
Noel Grandin
f73284fb86 new loplugin ptrvector - find bad comparison of container<unique_ptr>
Change-Id: Idb18ae1ca2f7c644680703dc3b7dd3cd6000e040
2015-11-13 15:18:06 +02:00
Michael Stahl
5fe6606901 sc: loplugin:badstatics: remove pActiveEdWnd global variable
Just use a Link, or rather std::function to set a member in the tab
page.  Unfortunately loplugin:vclwidgets complains about the new member.

Change-Id: Ie2f9cb73c38292d02057d43b12694c6609fa0db8
2015-11-13 12:25:25 +01:00
Stephan Bergmann
ba8a957bfa Generalize COM_GCC_IS_CLANG -> COM_IS_CLANG
...in anticipation of building with clang-cl.exe on Windows

Change-Id: I1d723c9d3b5ca8a2bc6b27ef0189a7b053581398
Reviewed-on: https://gerrit.libreoffice.org/19928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-12 17:37:11 +00:00
Noel Grandin
5c142dd31d loplugin:mergeclass, fix and update results
Change-Id: I0660833db69604c5c4dd3c5826f1baac3086e052
2015-11-11 13:48:34 +02:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Noel Grandin
0521461eee disable loplugin memoryvar for now
seems to be crashing with latest(trunk) clang sometimes

Change-Id: Ice92b35deb6cb4610dbd53f570d0b43e9d2a2834
2015-11-11 11:35:43 +02:00
Noel Grandin
db17d3c17c new loplugin: memoryvar
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr

Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 07:16:20 +00:00
Stephan Bergmann
986c495052 Missing isInLokIncludeFile check
Change-Id: I6577987f3f3717337e6607ffbe38397f229978f0
2015-11-10 11:26:03 +01:00
Stephan Bergmann
1cd6e2e08e Keep LibreOfficeKit.hxx compatible with C++03
Change-Id: Ic2f123c9b341dbb421b766c3bba1fc56c1bfb41d
2015-11-10 11:08:30 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Michael Stahl
10afa00c8c compilerplugins: enhance "badstatics" plugin to find members
Finds static variables of types that have bad non-static members.

Change-Id: I81ee940580c0f043feb543840ea4d3dd27734202
2015-11-06 20:37:38 +01:00
Michael Stahl
22fb58a6fa compilerplugins: getAsTagDecl doesn't exist in clang 3.5
Change-Id: If7277820227486e2eb578a167e0fd9f05c8f74ae
Reviewed-on: https://gerrit.libreoffice.org/19823
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-06 19:38:13 +00:00
Stephan Bergmann
938f670928 loplugin:stringconstant: elide explicit ctor usage
Change-Id: I962db9583ef9cada42a61b6a95eeea818fceeead
2015-11-06 12:33:41 +01:00
Noel Grandin
609b227873 fix tdf#95488, crash in report wizard
This reverts commit bb76b8f10697f3d5ca1f9a2f19902b043bd61cd7
"loplugin:mergeclasses"

Change-Id: Ib65459ab45cd4cefa859ed75f9ddc4f070879b1d
2015-11-05 12:02:00 +02:00