301 Commits

Author SHA1 Message Date
Noel Grandin
c5df32e5cb loplugin: unnecessary destructor jvmfwk..lotuswordpro
Change-Id: Iaa4f9b178ab265342255066af7fff09f5b33ab37
Reviewed-on: https://gerrit.libreoffice.org/33496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-24 15:56:31 +00:00
Noel Grandin
90df5ee107 new loplugin: useuniqueptr: jvmfwk..sax
Change-Id: I732e2e22c6f953f0982fbc8833453e7c23cf9d49
Reviewed-on: https://gerrit.libreoffice.org/33166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 06:41:54 +00:00
Stephan Bergmann
884437ef2e New loplugin:externvar: jvmfwk
Change-Id: I0fee834ba07ecdc713e0e066935773f49a109665
2017-01-09 15:42:37 +01:00
tamsil1amani3
7a07610588 tdf#95416 Fix include file
Moved elements.hxx and fwkutil.hxx to jvmfwk/inc and changed the #include line in vendorplugin.hxx

Change-Id: Ida7395e952c482af92c0561a7756be7cd0578b9f
Reviewed-on: https://gerrit.libreoffice.org/32415
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-12-25 07:35:12 +00:00
Stephan Bergmann
36c8fd8995 Clean up jfw_findAllJREs return value computation
Change-Id: Iace2281ec4b5cfaa6e1de44b58a6705ca3a18c58
2016-11-16 23:47:09 +01:00
Noel Grandin
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
Stephan Bergmann
1ccc7c425b clang-cl loplugin: jvmfwk
Change-Id: I4ae0795469e70d6be3d2052d96a2f0dad3920d8b
Reviewed-on: https://gerrit.libreoffice.org/29860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:18:35 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Stephan Bergmann
1b2a4dd785 loplugin:redundantcast: redundant static_casts in jvmfwk
Change-Id: I6aef36bd21043460e74b5e3d478665a35213bb1a
2016-07-08 16:47:31 +02:00
Noel Grandin
57ef4457be Convert javaPluginError to scoped enum
Change-Id: Ib3a32227d50fa9e0f9cc4106ce40a4c3e840f8c7
Reviewed-on: https://gerrit.libreoffice.org/25206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22 17:52:41 +00:00
Stephan Bergmann
f43b89b7ed loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I65fdd933e2a3973053359024d8d9c733f79a6477
2016-04-20 17:25:43 +02:00
Stephan Bergmann
6858d559fe Values read from the Windows registry shouldn't be assert'ed
Change-Id: I1a6cc78025790fa22e91ae91dda5644bdc384ca3
2016-04-05 17:05:34 +02:00
Rohan Kumar
20efe5ebcb tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I replaced OSL_ASSERT() with standard C++ assert

Change-Id: I92e07d62f3dfe2ad914c49e2b596aef28c35e225
Reviewed-on: https://gerrit.libreoffice.org/23231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-15 00:18:50 +00:00
Stephan Bergmann
8e9a7cac42 No more need for jfw_freeJavaInfo
Change-Id: I2426a76936b4099a243ce8c102da867e7868aac3
2016-03-10 21:42:31 +01:00
Stephan Bergmann
8546831b3b Turn JavaInfo sal_Sequence* member into rtl::ByteSequence
Change-Id: Iecd476970b0b7a46afe223f71e95b0010048d7b1
2016-03-10 21:41:24 +01:00
Stephan Bergmann
5dcdb35ab1 Turn JavaInfo rtl_uString* members into OUString
Change-Id: Ieb23b0c36ef56a4793a56cdb450df34e4d9bce1d
2016-03-10 21:41:24 +01:00
Stephan Bergmann
81dd7115e8 Manage JavaInfo instances via new/delete
Change-Id: I10a113718e525b646c51aa8a19f9f2b75a36714a
2016-03-10 21:41:23 +01:00
Stephan Bergmann
bf6c5c9b0f No need to repeat SAL_CALL in definitions
Change-Id: Ief75af9d08d9b7e31d821773db2363fa201f3038
2016-03-10 21:41:23 +01:00
Stephan Bergmann
8471ba7b97 No need for extern "C" here
...and fix resulting loplugin:salbool fallout

Change-Id: I5ae1497608d31c20b0d10676450a7673dee1c651
2016-03-10 21:41:22 +01:00
Stephan Bergmann
220d9c24d0 include/jvmfwk/*.h -> .hxx (only ever included from C++ code)
Change-Id: Ia912e937d5a48afb6f8f5345b20bb7bd517fc4f1
2016-03-09 19:08:29 +01: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
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
Caolán McNamara
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00: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
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02: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
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
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
a52ad6b1cc loplugin:simplifybool
Change-Id: Iaa3c04ba936512f511de238f5a3ca5b0f9afc06d
2015-07-16 14:00:18 +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
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
Stephan Bergmann
f9d2bfec02 fprintf -> SAL_INFO
Change-Id: I4808e89cf5b90c99df3d4c4474c578a8c8f611a6
2015-05-27 17:24:02 +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
ba868c28a3 Clean up C-style casts from pointers to void
Change-Id: I302d313f2d14d908672d4534aad1818e820eaae4
2015-03-28 19:09:22 +01:00
Noel Grandin
1a08ce7078 loplugin:staticfunction
Change-Id: I10c30ef28e7321882a720d1e7869a75a89febfc5
2015-03-27 10:51:08 +02:00
Stephan Bergmann
d3b69645d8 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I81dc70639a866368b9a6c69afffdfd42464e9138
2015-03-26 15:33:32 +01:00
Stephan Bergmann
b3934e4afc loplugin:deletedspecial
Change-Id: I6827530316561e600b760a2620f859b28c6c91e6
2015-02-07 12:35:59 +01:00
Stephan Bergmann
9c0cb45562 Some more loplugin:cstylecast: jvmfwk
Change-Id: Iaa1be4b338b75c340555eb4bf0760cadca16713f
2015-01-20 09:06:49 +01:00
Stephan Bergmann
f582ad2c69 jvmfwk: Use appropriate OUString functions on string constants
Change-Id: I3e0b70c61c4e92f2cbd27ce7c45e67ae04dfe14c
2014-12-16 17:29:29 +01:00
Stephan Bergmann
5e9a2e9b0f Check each potential JRE location only once
i.e., after recent "fdo#83753: consider JAVA_HOME and PATH when selecting JRE"
fix, if jfw_findAndSelectJRE found no suitable JRE in
jfw_plugin_getJavaInfoFromJavaHome or jfw_plugin_getJavaInfosFromPath, do not
re-check those locations in jfw_plugin_getAllJavaInfos.

Change-Id: If4e085b4fceff5b2494c7b7b84ac51691dbc78cc
2014-12-15 16:45:51 +01:00
Michael Weghorn
40138cee6b fdo#83753: consider JAVA_HOME and PATH when selecting JRE
adapted algorithm that selects the Java runtime to be used so that
Java installations associated with the JAVA_HOME and PATH
environment variables are preferred over others

Java installations are now analysed in the following order:
* installation that the JAVA_HOME environment
    variable refers to (if it is set)
* Java installations in PATH
* other Java installation (algorithm that was used before)

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>

Conflicts:
	jvmfwk/source/framework.cxx

Change-Id: I3a3ade25322def0c0432b369848f13a6b82034a1
2014-12-15 16:45:51 +01:00