Commit Graph

530 Commits

Author SHA1 Message Date
Stephan Bergmann
29840e6769 loplugin:salbool
Change-Id: I186376ceeb53126bc31d63d00a988be6cb7a5637
2016-04-22 09:31:15 +02:00
Noel Grandin
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
0f1e032431 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ia4afa4cc65215053ac44cc0b48e528064837c49e
2016-04-20 17:25:44 +02:00
Caolán McNamara
072b32442e try next hunspell 1.4.0 prerelease milestone
try using reverse iterators here then

and remove dictmgr which we don't seem to use or need

Change-Id: I981fccc4ca7562d5ab707dc2f605e409169dec07
2016-04-18 09:32:39 +01:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Jochen Nitschke
d84ef731d8 tdf#94306 replace boost::noncopyable ...
... in modules editeng to oox.
Replace with C++11 delete copy-constructur and
copy-assignment.
Remove boost/noncopyable.hpp includes and
one unused boost/checked_delete.hpp include in linguistic.

Change-Id: I5a38d8e5ac1b4286bdeb3858d56490a53d13fe80
Reviewed-on: https://gerrit.libreoffice.org/23928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11 07:22:50 +00:00
Jochen Nitschke
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
Noel Grandin
2087484c65 use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

In this stage we focus on replacing usage of the WIN macro

Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17 11:33:57 +00:00
Noel Grandin
0f8ec3036f [API CHANGE] add operator==/!= to UNO structs
this is useful now that we are storing UNO structs in std::vector

Change-Id: Ic558bcd669bd2b3cdf9eb8393269eb906ac52369
Reviewed-on: https://gerrit.libreoffice.org/22257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-11 06:22:28 +00:00
Stephan Bergmann
3c51c3db18 Attempted fix for "Resolves: #i126762# Ignore dictionary not in specified...
...location."  Caused many crashed during "make check", when aLocaleNames is a
sequence of 17 ("ar-SA", "ar-DZ", ...), but aLcoations merely a sequence of 2
(".../dict-ar/ar.aff", ".../dict-ar/ar.dic").

From comments further down below, it looks like aLocations will always contain
exactly two entries ("also both files have to be in the same directory and the
file names must only differ in the extension (.aff/.dic)"), and that all the
aLocaleNames members share the same set of aLocations ("Thus here we work-around
this by adding the same dictionary several times. Once for each of its supported
locales"), so that it would appear to be OK to just check once for the existenceof aLocations[0].

(There is a check for

    if (aDictIt->aLocaleNames.getLength() > 0 &&
        aDictIt->aLocations.getLength() > 0)

below, so it might be that these can be empty, or it might just be "defensive
programming."  Play it safe, and check here that aLocations is not empty.)

Change-Id: I82bea6571983e397a9e164b294a5ba656b511a67
2016-02-02 12:40:06 +01:00
Kay Schenk
6691d78f1d Resolves: #i126762# Ignore dictionary not in specified location.
Damaged "registrymodifications.xcu" causing problems with backups and spell checker

(cherry picked from commit 983e71fa37e12fbae29eddc2b855ddaf6280cc0e)

Change-Id: I279275e11fb2ee6a223c7905652165d1b7a2e0ac
2016-02-02 09:35:29 +00:00
Noel Grandin
752cd07d08 InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.

Switch all our internal use-sites to the new class.

Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
Noel Grandin
a7f6efc68b loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af
Reviewed-on: https://gerrit.libreoffice.org/21571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18 12:50:09 +00:00
Noel Grandin
602a64939d loplugin:unusedmethods unused return value in l10ntools,linguistic
Change-Id: I11571c25e527787a2054bc8106a27c44b8a96116
2016-01-15 09:36:41 +02:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Noel Grandin
1b80ad7246 loplugin:unusedfields in lingu,lotuswordpro,mysqlc
Change-Id: I5866c8d95e04714e81a45e73bf00a430859a4327
2015-12-22 10:16:36 +02:00
Caolán McNamara
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00:00
Stephan Bergmann
8f7e5633b1 Don't assume sal_Unicode is unsigned short
Change-Id: Ia93c541ea21be89578789d58f642109184a18685
2015-11-17 10:39:42 +01:00
Noel Grandin
21a9bc8716 no need to take a mutex when only dealing with stack-local data
Change-Id: Ie45e626aad55a8174a53b769a98601bf54dedf65
Reviewed-on: https://gerrit.libreoffice.org/19979
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-16 11:37:11 +00:00
Noel Grandin
8569c6d0ad use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
Reviewed-on: https://gerrit.libreoffice.org/19978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-16 08:35:42 +00:00
Noel Grandin
54d22957bc use initialiser for Sequence<OUString>
performed using:
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: I4da56c80fa09bfc1e8f868794001e9921431e09f
Reviewed-on: https://gerrit.libreoffice.org/19968
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 11:31:23 +00:00
Stephan Bergmann
2e8f27167d loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: I48e80668c76b7fb94dfa2876ae8ca5e895cea3be
2015-11-10 16:20:36 +01:00
Stephan Bergmann
64d1b574ad loplugin:nullptr (automatic rewrite)
Change-Id: I1aa63ce279fe3914e0f5153b7d8559880a3fccc3
2015-11-10 10:31:31 +01:00
Noel Grandin
fcb8df3bcf use uno::Reference::set method instead of assignment
Change-Id: I11822c50fa66d038a3d6f38054ab35c2e613f077
2015-11-04 14:20:51 +02:00
Noel Grandin
728f983031 com::sun::star->css in lingucomponent
Change-Id: Iceef10c51db88b3e85f118a366de45f0f70bbf21
2015-10-23 13:19:10 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Stephan Bergmann
236714e86c Clean up remaining utl::LocalFileHelper::Convert...
together with 58d68a1bc9
"ConvertURLToSystemPath->getSystemPathFromFileURL" and
28f3464a57
"ConvertSystemPathToURL->getFileURLFromSystemPath," this replaces all those
Convert... functionality with direct calls to the corresponding osl::FileBase
functions.

Change-Id: I2876171cd337a5eb939d25d8cf1e0c1253ff73a7
2015-08-19 10:48:42 +02:00
Takeshi Abe
e87c08babe lingucomponent: tdf#88206 replace cppu::WeakImplHelper*
with the variadic variants.

Change-Id: Ibe00b26512a4895a603a084f4e816c74b99894df
Reviewed-on: https://gerrit.libreoffice.org/17850
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-19 07:49:16 +00:00
Noel Grandin
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
Andrea Gelmini
9f27e5b0e0 Fix typos
Change-Id: I52cbaad71560d73f5e24f3de3cd62b00d678dd6c
Reviewed-on: https://gerrit.libreoffice.org/17187
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-07-19 19:45:07 +00:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
David Tardon
cc96b2738b I guess we can revert this "temporary check" now
On the other side, it has been in the code for only 2 years, so who
knows .-)

Revert "libexttextcat: fix the --with-system case too..."

This reverts commit a81f44c707.

Change-Id: I4e02ebe971f8a838bf2a1630ed38d4408245bf37
2015-06-15 21:16:26 +02:00
Stephan Bergmann
e12fa69f6e loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I617d55415aee923d0734f3f3b74948b26132611b
2015-06-08 16:26:18 +02:00
Stephan Bergmann
c984b76efc loplugin:loopvartoosmall
Change-Id: I33f4e74f97ba52b9240e6304d53eb256bd822060
2015-06-02 22:57:44 +02:00
Stephan Bergmann
1fb55375be loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I0730744b8424bc6dea5e8016199088f86e9570f5
2015-06-02 11:27:16 +02:00
Stephan Bergmann
cde4d4a208 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: Ic494c8e3b072adceca984a3ceec02088ac08e880
2015-05-11 12:50:06 +02:00
Noel Grandin
a880ec8131 loplugin:staticmethods
Change-Id: Id7fc12bc61c6e803f45cc60556d9cf54ac2e529f
2015-04-23 13:08:48 +02:00
Noel Grandin
79b2059fa8 convert CapType to scoped enum
Change-Id: I88fa3672a1f933ae818368c9bc400c6a845babb6
2015-04-08 11:40:15 +02:00
Stephan Bergmann
4d2923e187 loplugin:redundantcast
Change-Id: I3ef78881cfed8b66f067e9164efcccf425fb549c
2015-04-02 21:02:04 +02:00
Stephan Bergmann
bd482df17c Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I34dc9028a273b6a22395fe662dd071505989dc5c
2015-03-31 13:14:47 +02:00
Stephan Bergmann
9afd58e71a Clean up C-style casts from pointers to void
Change-Id: I76204cd86daa7b95f9c70276459d7dd112198135
2015-03-28 19:09:22 +01:00
Stephan Bergmann
3205a2ebb6 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Id916058c4a1483a7a050d93cce45926fbd0df9ed
2015-03-26 15:33:32 +01:00
Caolán McNamara
32f95a3551 V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
2015-03-04 13:07:40 +00:00
David Tardon
7914380242 use initializer list here too
Change-Id: I30e4374dc44a58cb1b7315e3d7bfbed99c77030a
2015-03-01 17:33:59 +01:00
David Tardon
c6ad44c180 initialize members
Change-Id: I907fdbb4ca12a25fbfa99c6fa345c3c07aea0833
2015-03-01 17:33:59 +01:00
Stephan Bergmann
a6f8766d35 loplugin:deletedspecial (Mac OS X)
Change-Id: Ia09e2e7b3e40bd04da64b52fe29258017b90b156
2015-02-07 17:24:43 +01:00
Stephan Bergmann
a5bf14ee46 loplugin:deletedspecial
Change-Id: I65d025fc465b9b1d11c43e01e2ff6796b72d6333
2015-02-07 12:35:59 +01:00