Commit Graph

414 Commits

Author SHA1 Message Date
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
a27f2397f0 unused Picture::Type()
and removed unused TxtBox::Type(), too

Change-Id: I4a1d7f1cbbc5bb4d929fe7420db8f827dd8b142d
Reviewed-on: https://gerrit.libreoffice.org/20424
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2015-12-07 14:15:49 +00:00
bc2fe2249b Adapt to true wchar_t in clang-cl
Change-Id: Id127668e6786665b819b7c0b1c0cd424ebff96bf
2015-11-28 08:44:52 +01:00
708ef6a08d '#pragma setlocale("C")' is probably no longer necessary
...as in both files the direct use of non-ASCII characters in ordinary string
literals has since been changed to use \xXX escapes instead

Change-Id: Ic3e17a9849288a02dc69d7702782fefccb7026ee
Reviewed-on: https://gerrit.libreoffice.org/20148
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-24 15:44:26 +00:00
295c7827e0 Translate Korean comments
...via translate.google.com, to make file plain ASCII

Change-Id: Icbf25074bd92eb1f0fb453f9887b1f1f1ca82b57
2015-11-24 13:05:52 +01:00
41dbbdcc8b Remove non-ASCII U+0086 PARAGRAPH SIGN from comment
Change-Id: Ifcbb2a61c662f135badc01b7beaef10fa3d75515
2015-11-24 13:02:40 +01:00
f42d03f3e9 Replace non-ASCII content in ordinary string literals with UTF-8 bytes
Change-Id: Ib92221527550beb35e2263b150a509b3ef68545f
2015-11-24 13:01:10 +01:00
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00:00
21c5ff1287 use unique_ptr for pImpl in extensions,hwpfilter/
Change-Id: I476ba7ec2ebee8c61bf9bb6ff0309cc40affb275
2015-11-18 08:35:35 +02:00
1acbdc6bbd Don't assume sal_Unicode is unsigned short
Change-Id: I72b0f9956e866afd22f7335a57d7dca0297e3b8a
2015-11-17 10:37:39 +01:00
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
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
c3dcdeb1d2 loplugin:nullptr (automatic rewrite)
Change-Id: Idec97093ca48c14b825c7b87ec050cc99aadc526
2015-11-10 10:31:27 +01:00
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
0e6544903b no need to be so verbose in constructing uno::Reference
Change-Id: I187a26e200e9ecaff2adaf53a2ba3f6e87346030
Reviewed-on: https://gerrit.libreoffice.org/19724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:26:10 +00:00
e26c4b4f09 com::sun::star->css in hwpfilter/
Change-Id: I2ec12da777d04855d34233d5781f2304e181bbbd
2015-10-19 15:33:26 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
f9e5b678ec Reduce variable scope
Change-Id: I5d2d7e7991c3727ed6367fe22ebddd5c2e2e9265
2015-10-07 11:32:44 +02:00
41e2f34548 clang-analyzer-deadcode.DeadStores
The code had been like this ever since 16cba77220efab8204eeecb49ccd3ec033efca38
"#112673# initial checkin of HWP filter."  Assuming that the second line should
rather read

  angle = 1800 - angle * 10;

instead of

  angle = 1800 - prop->angle * 10;

does not look too plausible:  It would keep mapping

   -1  ->  181
    0  ->  180
    1  ->  179
       :
  179  ->    1

but then would discontinuously map

  180  ->  180
  181  ->  179
       :

instead of continuously mapping

  180  ->    0
  181  ->   -1
       :

Change-Id: I8cf97eeb53409b18bda6777b09a20331f3c8132a
2015-10-07 11:32:43 +02:00
58aea3f36c loplugin:unusedmethods
- improvements to the plugin to find more method calls
- improvements to python script to remove more false+
- fix the FORCE_COMPILE_ALL build flag to include code in
  the $WORKDIR

Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836
Reviewed-on: https://gerrit.libreoffice.org/19064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 10:43:24 +00:00
a50539e2aa Fix typos
Change-Id: Iab78219aff60a7a45a319a96f326e27a6e8e25b8
Reviewed-on: https://gerrit.libreoffice.org/18953
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 12:41:09 +00:00
34180700b2 loplugin:removeunusedmethods, remove unused stuff
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29 15:08:43 +02:00
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
22b80ac8e2 boost->std
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 12:54:25 +00:00
42e379a542 clang-tidy clang-analyzer-deadcode.DeadStores
...ever since its inception in 16cba77220efab8204eeecb49ccd3ec033efca38
"#112673# initial checkin of HWP filter" (but curr is needed as a local scratch
pad in the STARTT macro)

Change-Id: I7233bf99b7d6f9ac0d3d3384ba4508f84ba8fa38
2015-09-03 11:43:57 +02:00
25accda781 tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad
Reviewed-on: https://gerrit.libreoffice.org/17920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-22 13:02:08 +00:00
5684fbce64 add hwp to fftester
Change-Id: Ibf819307905295580cb6a813f6d003a7dabc86b5
2015-08-21 16:17:26 +01:00
370a26f780 hwpfilter: tdf#88206 replace cppu::WeakImplHelper*
with the variadic variants.

Change-Id: Ibfe59dc7631cf499f42ff998066ed73d1eb257b3
Reviewed-on: https://gerrit.libreoffice.org/17767
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-18 07:11:34 +00:00
403c13487c loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 09:39:22 +00:00
a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
e963a88912 formatting of public/private/protected section qualifiers
make it consistent across the codebase, no space between keyword
and the colon

Change-Id: Idca61ddfc74ad2460fb05fe417499324b05e5de5
Reviewed-on: https://gerrit.libreoffice.org/17148
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-17 09:49:35 +00:00
188208d93a tdf#91067: Translate Korean comments
Change-Id: Idbee9cb5a1745bb2cc3c4cb1238773da7ff2a0a3
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2015-07-16 05:35:30 -05:00
593206bda7 loplugin:unusedmethods hwpfilter,i18npool
Change-Id: Ied85d93019d0f6c01c14045758b405f2ac316676
Reviewed-on: https://gerrit.libreoffice.org/16783
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06 11:54:54 +00:00
420923ba76 Fix typos
Change-Id: Ie2bbe020fc6e3a4a4f913208c245f395849bb9ee
Reviewed-on: https://gerrit.libreoffice.org/16708
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-07-03 09:32:26 +00:00
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
3c7a66a031 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8a8ba86dd78e30146f7b9dd7071f5641d496a67a
2015-06-08 16:25:38 +02:00
34c2adbdfb loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ia48650597a4854cbb92ef203b3c1338b4f47becc
2015-06-02 11:26:43 +02:00
35f8f29395 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I10dfaab18f39df8766718370d0bee6c9e41d1a42
2015-05-11 12:49:47 +02:00
24736e724e cppcheck: memleakOnRealloc
Change-Id: Ibdf762b0d397f798372d9bf882aa82a6e5fd0229
2015-05-04 20:13:53 +01:00
90911df79e hstream.h->hstream.hxx
Change-Id: Icc4a3d3661c3d40f9e71215bdc875c6a25f40ac1
2015-05-04 20:13:53 +01:00
e0380df3ee sequence operator twaddle + silly cast
Change-Id: I8804bfb39d8306762cbe39ac4b6df9128a8e0069
2015-04-29 10:12:49 +01:00
626fe1669f redundant cast
Change-Id: Ib812a7cafabc4820946da67fb3f8896b6aad1461
2015-04-29 10:12:49 +01:00
e58fccdadb More loplugin:simplifybool
Change-Id: I64ec8a0525b935d12455f7ed236ffd367f47c070
2015-04-27 15:30:57 +02:00
691197bff7 loplugin:simplifybool
Change-Id: Ic42cf05f9eddb0cd7724d16cc73a8d6495c193f2
2015-04-24 12:36:22 +02:00
028769528d cppcheck: silence assertWithSideEffect
Change-Id: Iaaf69ea5e8d5eeaa3a61660c3abe04ff3e83d061
2015-04-23 21:08:21 +01:00
720dff2545 cppcheck: unsignedLessThanZero
Change-Id: I1043e24fdf0350e38b587f11a2916bd54e8f718f
2015-04-23 09:51:58 +01:00
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
26ec80f47d loplugin:staticmethods
Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c
2015-04-13 09:37:12 +02:00
9ad3eafb03 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I75514fe3a3c55691ca9adfa136bfcd5ff9a2b706
2015-03-31 13:14:19 +02:00
33815ec449 Clean up C-style casts from pointers to void
Change-Id: Ifbdbd2bb8a21afa76271728c46f88c11a887fc5a
2015-03-28 19:09:21 +01:00