836 Commits

Author SHA1 Message Date
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
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Noel Grandin
b14224fe97 loplugin:unusedmethods
using an idea from dtardon:

<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.

Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08 06:08:14 +00: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
Douglas Mencken
b3afc03bcc jvmfwk/plugins: clean-up in util.cxx
These are some remnants from the-good-old-days of Mac OS X 10.4 support
and 2005's commit b8871d23ea14d72ba1a22376e7812ea5840d1084

Change-Id: I9a14aaac94e4a6e4961a2fa9a5020d9cf3a07c9d
Reviewed-on: https://gerrit.libreoffice.org/21124
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-06 13:32:12 +00:00
Caolán McNamara
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00:00
Stephan Bergmann
be59130fa4 Don't assume sal_Unicode is unsigned short
Change-Id: I0439e40b0843ba9a0939eb47e339f396d26f3c64
2015-11-17 10:39:20 +01:00
Stephan Bergmann
63aec6c7aa loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: Iee5d66a1c14e1583edb0945d23cec9986ce7a830
2015-11-10 16:20:36 +01:00
Stephan Bergmann
8980565881 loplugin:nullptr (automatic rewrite)
Change-Id: I9dfcec9488b2a25e32d3934766d6d4b208a8c2dc
2015-11-10 10:31: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
Noel Grandin
b73db446ac java: combine nested if statements
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
2015-11-05 14:55:15 +02:00
Stephan Bergmann
55d64bd472 Avoid using reserved identifiers, add missing includes
Change-Id: I23b548de1f07a4ec5acfeef7c553030a1f098311
2015-11-04 14:51:11 +01:00
Stephan Bergmann
fa6504066e Add mode lines
Change-Id: I4026040cfa2cd34c3a33a0a3dd4651caeb11c76f
2015-11-04 14:51:10 +01:00
Stephan Bergmann
c3b48b26a0 loplugin:passstuffbyref
Change-Id: If6e877b326bb630f1b4631a60241a93a6e6cbaca
2015-11-04 13:52:43 +01:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Patrick Luby
32bc8ddbf3 tdf#94716 allow Oracle's JDK to be used on OS X 10.10 and 10.11
Change-Id: Ide9b4beebb407e4ceee30f1d99f29d028c848d8c
Reviewed-on: https://gerrit.libreoffice.org/19131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-11-04 09:29:22 +00:00
Noel Grandin
644487a115 loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27 08:20:43 +00:00
Serge Krot
0b018d202d tdf#39440: fix several warnings reported by cppcheck
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae
Reviewed-on: https://gerrit.libreoffice.org/19587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-25 22:31:44 +00: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
Noel Grandin
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
Andrea Gelmini
9956b99e68 Fix typos
Change-Id: I44bdb63bef76e9686e995661a24a3bef7cd50ab7
Reviewed-on: https://gerrit.libreoffice.org/18959
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 11:03:11 +00:00
Stephan Bergmann
aa80dcf534 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I09552b4ddd8900952f499c8b9c44933c7240c866
2015-08-31 08:02:57 +02:00
Stephan Bergmann
9c8fd7d1c5 Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
2015-08-27 08:00:32 +02:00
Stephan Bergmann
c571bcd775 loplugin:defaultparams
Change-Id: I797b986b227381bc066ea3aa305c0abf78cd156a
2015-08-23 21:55:05 +02:00
Michael Weghorn
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
Noel Grandin
c85cda1eb4 loplugin: defaultparams
Change-Id: I5afe7f9f5caa1f5e55c6218bdb3771571ff0dafa
2015-08-11 09:48:17 +02:00
Stephan Bergmann
a52ad6b1cc loplugin:simplifybool
Change-Id: Iaa3c04ba936512f511de238f5a3ca5b0f9afc06d
2015-07-16 14:00:18 +02:00
Christian Lohmaier
1b4d27a3ba tdf#92483 fix initializing JRE on Win 64bit (load java's msvcr100.dll)
problem is that the offsets/sizes are of different type than ptrdiff_t,
and when using without casting, the resulting address is way off...

Change-Id: I7b1cdd611c8c4b317cd33ca8fbbda2e7e8f5f4fc
Reviewed-on: https://gerrit.libreoffice.org/16938
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: Jenkins <ci@libreoffice.org>
2015-07-11 14:53:01 +00:00
Heiher
0f6edce22b jvmfwk: pluginlib: Add support for mips64.
Change-Id: I525266468ae2ef04976d7835cc22c930293a0dc3
Reviewed-on: https://gerrit.libreoffice.org/16911
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-10 19:50:12 +00:00
Andrea Gelmini
7f73bb5b44 Fix typos
Change-Id: I8e429d1f03aac7c7cdb7ff4b43b3f46d40292510
Reviewed-on: https://gerrit.libreoffice.org/16709
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 08:19:04 +00:00
Andrea Gelmini
1a8915ef83 Fix typos
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
Reviewed-on: https://gerrit.libreoffice.org/16582
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30 15:57:12 +00:00
Michael Stahl
bb63999372 jvmfwk: pass along -Xss to JVM on AMD64 too
The PythonTest_dbacces_python in a clang ASAN build on F21 started to
fail with StackOverflowError in JNI_CreateJavaVM on the main thread,
and this fixes the problem.

Seen with java-1.8.0-openjdk-1.8.0.45-39.b14.fc21.x86_64

Change-Id: I87dfb4b62d547b334c19261aad88b4856489776f
2015-06-24 15:09:49 +02:00
Michael Stahl
004ddbe666 jvmfwk: slighly misleading error message
Change-Id: I64165a03c16d852781173fe2de952e6b803efaf7
2015-06-24 15:09:49 +02: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
Noel Grandin
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
Noel Grandin
efd4bfa818 java:regulatize the order of 'final' and public/private
Make the order be 'public static' or 'private static'
Just makes the code nicer to read.

Change-Id: I182424bda45a2d68642e5d04c6091d268ace1fe2
Reviewed-on: https://gerrit.libreoffice.org/16202
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-11 09:34:00 +00:00
Stephan Bergmann
62ee548b8c loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I62a6714749eba8226ba3a5416ee81f2d76cf0afc
2015-06-08 16:25:58 +02:00
Stephan Bergmann
863bfb2811 loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ie8e3bde0eeeec6cd35a7f73f9a29c28cdd03ad02
2015-06-02 11:27:11 +02:00
Noel Grandin
55bc128636 loplugin:loopvartoosmall
Change-Id: I86ff38a90018a2ddfb2db3babf67168b0e6257a5
2015-06-01 09:58:56 +02:00
Stephan Bergmann
8541b178f4 Support Azul Zulu JRE on Linux and Mac OS X, too
Change-Id: I317506319b91daf006a0ba79874ff265ba6ed4da
2015-05-29 14:25:55 +02:00
Stephan Bergmann
0f95f8ffd7 Support Azul Zulu JRE (at least on Windows)
(<http://www.azulsystems.com/products/zulu/downloads> also offers it for Linux
and Mac OS X, so it could be added to more javavendors_*.xml if need be; I only
checked it actually works with a Windows 64-bit LO build)

Change-Id: If549a0d5bf1459eba2f6ba2bd545cfd55a20cea6
2015-05-27 17:29:39 +02:00
Stephan Bergmann
f9d2bfec02 fprintf -> SAL_INFO
Change-Id: I4808e89cf5b90c99df3d4c4474c578a8c8f611a6
2015-05-27 17:24:02 +02:00
David Tardon
d8eee8e4d1 java dir for powepc64 and powepc64le can differ
E.g., RHEL >= 7.1 uses ppc64le for reasons listed in
https://bugs.openjdk.java.net/browse/JDK-8073139 .

This is a follow-up to commit 7a66dbe982623be620ad6ac426fe689a434e5f51.

Change-Id: I685f76d51e9775788a7fb225c6a5e2309a45ceb7
2015-05-12 12:14:54 +02:00
Stephan Bergmann
e4eea23ae0 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I21cac03d5100822ef99d4b7fb7c192c0d2adf1b2
2015-05-11 12:49:56 +02:00
Takeshi Abe
99e60d8d62 std::ptr_fun became deprecated since C++11
Change-Id: If93609d032c9864e0251230bf9ed76e6b6741a62
Reviewed-on: https://gerrit.libreoffice.org/15672
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-08 15:54:12 +00:00
Stephan Bergmann
3daf0c7e77 More loplugin:simplifybool
Change-Id: I51e7a11149676a8b5396d9eb993a509859cdf725
2015-04-27 15:30:58 +02:00
Stephan Bergmann
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02:00
Stephan Bergmann
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
Stephan Bergmann
ba868c28a3 Clean up C-style casts from pointers to void
Change-Id: I302d313f2d14d908672d4534aad1818e820eaae4
2015-03-28 19:09:22 +01:00