1314 Commits

Author SHA1 Message Date
Noel Grandin
902d87147d loplugin:constparams in sw part3
Change-Id: I05ad3204af4e6ec3c832b185a1b35fdb75a229b2
Reviewed-on: https://gerrit.libreoffice.org/40760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04 11:55:27 +02:00
Noel Grandin
98d7b40986 loplugin:constparams in sw part2
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7
Reviewed-on: https://gerrit.libreoffice.org/40735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 21:32:05 +02:00
Noel Grandin
5176c1dd60 loplugin:constparams in sw part1
Change-Id: Id8d8afe268a82585ec2d3699411073dfb905d6ba
Reviewed-on: https://gerrit.libreoffice.org/40734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 20:49:15 +02:00
Noel Grandin
d5630adf33 loplugin:checkunusedparams in various
Change-Id: I4f54940a9ebdcd47776b2a5f7bae6e49b633ee44
Reviewed-on: https://gerrit.libreoffice.org/40706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 13:13:17 +02:00
Noel Grandin
dafae0fe31 loplugin:constparams in sd
Change-Id: I833c6da99d5ccb8f6a8b5c905bee73b75fde0a89
Reviewed-on: https://gerrit.libreoffice.org/40700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 11:06:54 +02:00
Noel Grandin
fb8b0585d9 loplugin:checkunusedparams in sw
Change-Id: I8a6b2647375a54720cd9fd765cc51c9ff43c8190
Reviewed-on: https://gerrit.libreoffice.org/40682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 20:52:47 +02:00
Noel Grandin
3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Caolán McNamara
13fac4894f normalize resource locale ctor construction mechanisms
make them all the same and share std::locales more

various OModuleClient, etc, classes go away

Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5
Reviewed-on: https://gerrit.libreoffice.org/40634
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02 10:36:07 +02:00
Caolán McNamara
b1d829e52e move resmgr to unotools
and the vast majority of translations is to the ui language so default
ctor with that arg

and now drop OModuleResourceClient

Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01 13:42:21 +01:00
Noel Grandin
612b489d3e loplugin:checkunusedparams
the "check for taking address of function" part was generating false+

Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f
Reviewed-on: https://gerrit.libreoffice.org/40613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01 11:06:26 +02:00
Noel Grandin
c394363c84 loplugin:constparams in basctl
Change-Id: If6c2b980a2916c4ee8ac108fbb84b006a35f49c5
Reviewed-on: https://gerrit.libreoffice.org/40570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 08:25:37 +02:00
Noel Grandin
c9253818ec loplugin:oncevar
extend oncevar to any POD type

Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0
Reviewed-on: https://gerrit.libreoffice.org/40564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 08:25:07 +02:00
Noel Grandin
b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
Noel Grandin
a63e17c6c4 loplugin:checkunusedparams more part3
Change-Id: I621fcf7ceb27238ca86d2299dfb2b8ed03c270fd
Reviewed-on: https://gerrit.libreoffice.org/40509
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 10:46:26 +02:00
Noel Grandin
b32ead5dd2 loplugin:checkunusedparams more part1
seems I got one of the checks wrong, and was missing a bunch of stuff

Change-Id: I2c662fc4e735f8d6cbe56c6f82906a60a580331b
Reviewed-on: https://gerrit.libreoffice.org/40481
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 07:17:51 +02:00
Noel Grandin
620d032b18 loplugin:constparams in chart2
Change-Id: Ic325b79f04e04aa19e08a60db30b982d90f04c80
Reviewed-on: https://gerrit.libreoffice.org/40480
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 13:23:25 +02:00
Noel Grandin
370c71f5b1 simplify unusedfields plugin
using some wrappers around callee and caller AST nodes

Change-Id: I599a04a18caa3ada70bcb266e228208b7a81f1a1
2017-07-27 12:39:38 +02:00
Noel Grandin
8ce64dbb3d loplugin:constparams in svx
and fix a bug in the plugin itself when calling operator's like the one
on std::function<>

Change-Id: I1617607107eeff06785c1841f69e13ad2926218e
Reviewed-on: https://gerrit.libreoffice.org/40446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 08:03:26 +02:00
Noel Grandin
9878293228 loplugin:unusedmethods
Change-Id: I7f26ee112ed89ee3e69c56930260565f66ff145b
Reviewed-on: https://gerrit.libreoffice.org/40442
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-26 12:25:56 +02:00
Noel Grandin
4ed70b89aa loplugin:unusedfields
Change-Id: I21e538b8e9c7a5f0fb233019efac37a3555e3c93
Reviewed-on: https://gerrit.libreoffice.org/40438
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-26 11:15:52 +02:00
Noel Grandin
2fffaf6f05 loplugin:unusedmethods
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb
Reviewed-on: https://gerrit.libreoffice.org/40391
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:03:50 +02:00
Noel Grandin
8045cef05c improve unusedfields loplugin readonly analysis
(*) better analysis of init-list-expressions
(*) fix analysis of calls to members, turns out there is no parameter
offset after all
(*) check for passing arrays to functions, need to check
  if the parameter is T* or T const *
(*) check for assigning field to a T& variable

Change-Id: Ie6f07f970310c3854e74619fe4fd02a299bf6879
2017-07-24 08:39:55 +02:00
Noel Grandin
c24d293661 loplugin:unnecessaryvirtual
Change-Id: Id3f0bbcae731d777ac7c1fbc9f020ff35833864b
Reviewed-on: https://gerrit.libreoffice.org/40323
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-23 21:12:41 +02:00
Julien Nabet
1cf7a4c39e Typo: "disposeAndClear", not "clearAndDispose"
Change-Id: I9f7f30fce9324f7ccb79e9a8ef0c13e091d7c3a3
Reviewed-on: https://gerrit.libreoffice.org/40304
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 14:16:03 +02:00
Noel Grandin
2b4cb88c02 loplugin:unusedfields in basctl..connectivity
Change-Id: I2f10daadb84e48eaf96f6cc63899b2f4fce7326e
Reviewed-on: https://gerrit.libreoffice.org/40295
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 14:07:49 +02:00
Noel Grandin
939f9bd0b5 loplugin:unusedfields in cppcanvas..cui
Change-Id: I1cf1f7919e03d863c6f7756e1caf3b9313777479
Reviewed-on: https://gerrit.libreoffice.org/40294
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 14:04:39 +02:00
Noel Grandin
5fad6eb1b3 loplugin:unusedfields in editeng
Change-Id: I61ddd2ce8ded65251fdf1903e6cb67f0d18c9451
Reviewed-on: https://gerrit.libreoffice.org/40293
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:51:32 +02:00
Noel Grandin
3ff8ecb53e loplugin:unusedfields in extensions..framework
Change-Id: I687c67c8f3c0e03c6ab2da0a93a9e62f0caf12cd
Reviewed-on: https://gerrit.libreoffice.org/40292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:50:41 +02:00
Noel Grandin
760a7791a2 loplugin:unusedfields in io
Change-Id: I8be28fa2ed1e005c76eafc60746620338c8a49ac
Reviewed-on: https://gerrit.libreoffice.org/40291
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:49:43 +02:00
Noel Grandin
e5ee29737e loplugin:unusedfields in oox,reportdesign
Change-Id: I0201d76cb3d4605bdc00c81cfa9d91f98341c7f3
Reviewed-on: https://gerrit.libreoffice.org/40290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:47:34 +02:00
Noel Grandin
0281b18775 make oncevar plugin ignore methods with #ifdef-ery
Change-Id: I8a9cf2c4b81b95bf654f7e90306328d72e3d3408
Reviewed-on: https://gerrit.libreoffice.org/40280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 08:46:34 +02:00
Noel Grandin
ec340697d6 loplugin:constparams in soltools and various
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 17:11:15 +02:00
Noel Grandin
cf530f290d loplugin:unusedfields in sd
Change-Id: I7f89e038f3d9bd0da658c7d3b8faec23d8a593db
Reviewed-on: https://gerrit.libreoffice.org/40257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 10:06:51 +02:00
Noel Grandin
5e4b4eecb1 loplugin:unusedfields in sfx2
Change-Id: Id6666065bf3b27388d87aa2605229e83f1aed79a
Reviewed-on: https://gerrit.libreoffice.org/40255
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 09:39:21 +02:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin
8e7cb95888 loplugin:unusedfields in svtools
Change-Id: I5484fe5ee449e72919591bd374366aa60f792e28
Reviewed-on: https://gerrit.libreoffice.org/40254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 08:40:03 +02:00
Noel Grandin
7b59273c6c loplugin:unusedfields in svx
Change-Id: I7fc5bf55b01d464815771220914f21d8e85b5a36
Reviewed-on: https://gerrit.libreoffice.org/40253
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 08:38:06 +02:00
Noel Grandin
5b5995c05a loplugin:unusedfields in writerfilter
Change-Id: I7831da8cccfa730c8615ef770d0add95cbde396b
Reviewed-on: https://gerrit.libreoffice.org/40215
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 15:47:54 +02:00
Noel Grandin
4f75a93101 loplugin:unusedfields in tools
Change-Id: I4e26c4750f6ff6c246a25507cfed1a0b4e3c6b81
Reviewed-on: https://gerrit.libreoffice.org/40225
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 15:09:55 +02:00
Noel Grandin
85f08e3e34 remove some "optimisation" insanity in ScriptEventContainer
I can only imagine the weird bugs that must have periodically resulted
when we had a hash value collision.
In the process, fix hasElements() to return a useful value

Change-Id: I1d9a052e73332b4b2bbc9c1fd8142c13eb22f1be
Reviewed-on: https://gerrit.libreoffice.org/40226
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 15:09:20 +02:00
Noel Grandin
f24b46c272 loplugin:unusedfields in vcl
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6
Reviewed-on: https://gerrit.libreoffice.org/40217
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 13:02:31 +02:00
Noel Grandin
6d829ae4f2 loplugin:constparams in basic
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60
Reviewed-on: https://gerrit.libreoffice.org/40214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 12:01:08 +02:00
Noel Grandin
a976fa5f00 mxStatusIndicator is unused
ever since
    commit 8dc268058690337459bc38862c1532c34f171a48
    Author: Björn Milcke <bm@openoffice.org>
    Date:   Fri Feb 9 15:48:29 2001 +0000
    Req. change Load/SaveAs for XML format - removed deprecated CTOR

Change-Id: I772123e89391fea3578c7ed0986e1bc2d2a42a97
2017-07-20 09:36:58 +02:00
Noel Grandin
1802cfca17 mxStatusIndicator is unused
ever since
    commit eaefa688bfff0f73992c84496d4ce89e16ac3550
    Author: Caolán McNamara <caolanm@redhat.com>
    Date:   Wed Nov 2 22:33:34 2011 +0000
    callcatcher: ditch some unused code

Change-Id: Ifca9734ad29257d0d692cf36e709837cbe02af29
2017-07-20 09:36:57 +02:00
Noel Grandin
bd5a91f5a3 m_xExtHandler is unused
ever since it was added in
commit eb4b36c6e797e5eda511422c48ff0a210e2cc460
Date:   Tue Jul 13 08:00:42 2004 +0000
INTEGRATION: CWS oasis (1.1.2); FILE ADDED

Change-Id: If4375c6e57dbe635f53ca0395cb7bdc02de81b18
2017-07-20 09:36:57 +02:00
Noel Grandin
30f7ce30c9 loplugin:constparams in connectivity
Change-Id: I9b81c6227fb3c89a832640058a11444f72019694
Reviewed-on: https://gerrit.libreoffice.org/40155
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19 09:35:59 +02:00
Noel Grandin
0f7e64f3ed loplugin:constparams in desktop
Change-Id: Idba3acbd1e6ad5e1ce1cae9f80f764906ab8b143
Reviewed-on: https://gerrit.libreoffice.org/40157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19 09:28:00 +02:00
Noel Grandin
32878b6857 enhance unusedfields plugin to find readonly fields
Change-Id: I4da97443fc7eb14fd94959a026ab45a9256c055f
Reviewed-on: https://gerrit.libreoffice.org/40158
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19 09:25:52 +02:00
Caolán McNamara
eff84b958c remove unused CntWallpaperItem
Change-Id: I47cf9fc37bb64a80a21ed805bff2bb3ac3eb6da5
Reviewed-on: https://gerrit.libreoffice.org/40148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-18 22:14:07 +02:00
Noel Grandin
3964408f7f loplugin:constparams in sdext
Change-Id: Ia5d2c00b02bf1758f7502065dd109f0f54fda2d3
Reviewed-on: https://gerrit.libreoffice.org/40124
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18 14:59:47 +02:00