572 Commits

Author SHA1 Message Date
Noel Grandin
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
Andrea Gelmini
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
Noel Grandin
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
Stephan Bergmann
3c7a66a031 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8a8ba86dd78e30146f7b9dd7071f5641d496a67a
2015-06-08 16:25:38 +02:00
Stephan Bergmann
34c2adbdfb loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ia48650597a4854cbb92ef203b3c1338b4f47becc
2015-06-02 11:26:43 +02:00
Stephan Bergmann
35f8f29395 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I10dfaab18f39df8766718370d0bee6c9e41d1a42
2015-05-11 12:49:47 +02:00
Caolán McNamara
24736e724e cppcheck: memleakOnRealloc
Change-Id: Ibdf762b0d397f798372d9bf882aa82a6e5fd0229
2015-05-04 20:13:53 +01:00
Caolán McNamara
90911df79e hstream.h->hstream.hxx
Change-Id: Icc4a3d3661c3d40f9e71215bdc875c6a25f40ac1
2015-05-04 20:13:53 +01:00
Caolán McNamara
e0380df3ee sequence operator twaddle + silly cast
Change-Id: I8804bfb39d8306762cbe39ac4b6df9128a8e0069
2015-04-29 10:12:49 +01:00
Caolán McNamara
626fe1669f redundant cast
Change-Id: Ib812a7cafabc4820946da67fb3f8896b6aad1461
2015-04-29 10:12:49 +01:00
Stephan Bergmann
e58fccdadb More loplugin:simplifybool
Change-Id: I64ec8a0525b935d12455f7ed236ffd367f47c070
2015-04-27 15:30:57 +02:00
Stephan Bergmann
691197bff7 loplugin:simplifybool
Change-Id: Ic42cf05f9eddb0cd7724d16cc73a8d6495c193f2
2015-04-24 12:36:22 +02:00
Caolán McNamara
028769528d cppcheck: silence assertWithSideEffect
Change-Id: Iaaf69ea5e8d5eeaa3a61660c3abe04ff3e83d061
2015-04-23 21:08:21 +01:00
Caolán McNamara
720dff2545 cppcheck: unsignedLessThanZero
Change-Id: I1043e24fdf0350e38b587f11a2916bd54e8f718f
2015-04-23 09:51:58 +01:00
Noel Grandin
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
Noel Grandin
26ec80f47d loplugin:staticmethods
Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c
2015-04-13 09:37:12 +02:00
Stephan Bergmann
9ad3eafb03 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I75514fe3a3c55691ca9adfa136bfcd5ff9a2b706
2015-03-31 13:14:19 +02:00
Stephan Bergmann
33815ec449 Clean up C-style casts from pointers to void
Change-Id: Ifbdbd2bb8a21afa76271728c46f88c11a887fc5a
2015-03-28 19:09:21 +01:00
Stephan Bergmann
b98a8221c7 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I74898e791e17971a3105febe660a2140aafaece9
2015-03-26 15:33:31 +01:00
Noel Grandin
c3dc467232 loplugin:constantfunction: hwpfilter
Change-Id: I2504291e2167cbc4be91e01de654ca63f89dbd2a
2015-03-24 10:31:18 +02:00
Noel Grandin
48bb2913a7 convert SFX_FILTER_ constants to enum class
Change-Id: I7e53cfc90cefd9da7d6ecd795b09214bd44b1613
2015-03-19 08:25:03 +02:00
Noel Grandin
fb14be5f8f create new 'enum class' SotClipboardFormatId to unify types
of which there are several.

There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
  Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
   numeric values to the underlying code, but perhaps further fixing is necessary?

Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
2015-03-18 14:23:50 +02:00
Caolán McNamara
556373c41f V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
2015-03-11 09:58:36 +00:00
Caolán McNamara
d22519f62b V801: Decreased performance
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
2015-03-09 22:04:31 +00:00
Julien Nabet
5f6fcb4e7c Typos
Change-Id: Ibc378fa5f515de61bb768b4ef082638b40c94e00
2015-03-08 16:45:30 +01:00
Caolán McNamara
ab86a53623 V805: Decreased performance
Change-Id: I822c5ebc321ebda87c238a1781a31793c1623e34
2015-03-02 14:21:52 +00:00
Markus Mohrhard
d731835266 more efficient check for empty strings
Change-Id: Ibc2f7412b6bf8ef75f93d649812836c01224e43f
2015-03-01 18:58:43 +01:00
Caolán McNamara
b6336c9c67 wrong skip set here
Change-Id: I86bdd1c2603c984380b52b080504b7583155b0fb
2015-02-26 16:26:38 +00:00
Caolán McNamara
b1453e7fc7 fix bustage
Change-Id: I249fe09319d6e0995d9ffdc7e4396b9b1787ad28
2015-02-25 17:28:42 +00:00
Caolán McNamara
f974db5d89 check if reads were successful
Change-Id: I69ab0ca9c017c9a1c10d18fd850f32a92c641d12
Reviewed-on: https://gerrit.libreoffice.org/14631
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-25 17:05:31 +00:00
Noel Grandin
ba233e87ef remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'

Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-23 09:26:58 +02:00
Ashod Nakashian
de68bb8514 Updated all precompiled headers.
Change-Id: I955c8ac4dbe002d23531df7eb10fb4444d6b5157
Reviewed-on: https://gerrit.libreoffice.org/14292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-05 10:46:33 +00:00
Noel Grandin
fe480d8136 remove unused typedefs
found with some minor modifications to find/find-unused-defines.sh

Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd
Reviewed-on: https://gerrit.libreoffice.org/14194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-28 06:19:49 +00:00
Noel Grandin
f61dbc3029 followup code removal after changing virtual methods to non-virtual
This cleanups up indentation and removes dead classes.

This is a followup patch to commit
272b1dd55797aacf511fb4342b0054e3697243f6
"new loplugin: change virtual methods to non-virtual"

Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26 08:42:29 +02:00
Noel Grandin
b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
Stephan Bergmann
83853b9c86 Just use plain memcpy
Change-Id: I6f2014f3dfc650a61e8c0dc0bb7d7d4fdb88dbe9
2015-01-20 10:52:04 +01:00
Stephan Bergmann
552efce640 Some more loplugin:cstylecast: hwpfilter
Change-Id: I0ba3fe95ab6ef317166b286531a718287308f62f
2015-01-20 09:06:48 +01:00
Noel Grandin
45ec1d9b56 brute-force find-and-remove of unused #define constants.
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02:00
Stephan Bergmann
eab273cccd hwpfilter: Use appropriate OUString functions on string constants
Change-Id: Ib19462d2095ca46eace28e1d3170b559027a2acd
2014-12-18 14:12:27 +01:00
Michael Weghorn
e31657a1ea fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I9812658e8a96dd35d686c7ae7a8b829267c5c8bc
Reviewed-on: https://gerrit.libreoffice.org/13499
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-17 07:32:56 +00:00
Stephan Bergmann
73441b0b65 hwpfilter: Use appropriate OUString functions on string constants
Change-Id: I4e6b8077fd564be9508e5a08f2eb66032f5f3f40
2014-12-15 10:13:08 +01:00
Michael Stahl
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Caolán McNamara
2cfc625997 coverity#1209713 Dereference null return value
Change-Id: I8aba67ae5bf5ffb7530be8f6d5b2511b554717db
2014-11-03 20:44:53 +00:00
Noel Grandin
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00:00
Norbert Thiebaud
99ae57a92d hwfilter: fix misuse of strncpy
Change-Id: Ia52d6cd32aa3e3838d31ea2a994117e6820a503d
2014-10-04 08:58:13 -05:00
Noel Grandin
0a6f6cb091 fix indentation
Change-Id: Icd67d066eb72b951f3e4846d45d00e7863a6000e
2014-10-03 15:49:28 +02:00
Caolán McNamara
db5ed50cee coverity#1242961 Unused value
I'm guessing that this is what was meant. Though
hstr2ksstr and kstr2hstr still don't match, and I'm assuming
they are supposed to be mirror images of each other.

Change-Id: I0fccd086e16c043324af43a5c999c2fde7cf7505
2014-10-02 14:48:47 +01:00
Noel Grandin
e27ac011c3 loplugin: cstylecast
Change-Id: I9fca98995131358b3b112b11e0b28feb1a3267d1
2014-10-01 13:08:43 +02:00
Stephan Bergmann
9703cc63ce Remove o3tl/heap_ptr.hxx, use std::unique_ptr instead
Change-Id: Iac70c9be13892a36bfb5975f62e5345b88d4f144
2014-09-24 14:54:51 +02:00