Commit Graph

100 Commits

Author SHA1 Message Date
Stephan Bergmann
36c8fd8995 Clean up jfw_findAllJREs return value computation
Change-Id: Iace2281ec4b5cfaa6e1de44b58a6705ca3a18c58
2016-11-16 23:47:09 +01: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
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
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
Stephan Bergmann
8980565881 loplugin:nullptr (automatic rewrite)
Change-Id: I9dfcec9488b2a25e32d3934766d6d4b208a8c2dc
2015-11-10 10:31:30 +01: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
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
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
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
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
Stephan Bergmann
8814eb4770 Remove unused cModule leftovers
Change-Id: Id08194460e9a42896591047e36b3a95e5fbc47be
2014-12-15 13:18:56 +01:00
Caolán McNamara
f4d03933dc callcatcher: update unused code
Change-Id: Ia25b857738bb7b6c3baf18c68ef0d1bc0b3e142e
2014-12-04 10:44:36 +00:00
Michael Weghorn
772a36932e changed type of parameters from rtl_uString to OUString
changed type of several parameters of the functions
jfw_plugin_getAllJavaInfos and jfw_plugin_getJavaInfoByPath
from rtl_uString to OUString

Change-Id: I80feb311542e6ccded9f9924f800c75a7e14a1e7
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-19 09:09:59 +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
1156d11ef0 coverity#1066164 Resource leak
Change-Id: I152f22728a8eeea65114fe102511940bccf40478
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-10-13 17:45:13 +02:00
Stephan Bergmann
04a290b107 vendorplugin.h is jvmfwk-internal (and no need for extern "C")
Change-Id: I954f789d5850e8016f5900812f9aa99be2416ce4
2014-10-09 18:09:41 +02:00
Stephan Bergmann
2ceeee914e Remove jvmfwk plugin feature
...which was effectively unused; there only ever was a single sunjavaplugin that
is now folded directly into jvmfwk.  Leaves room for further clean up.

Change-Id: I14dd2a3a09bd1ce9a8c3f5c156628ec11d954a0b
2014-10-09 17:27:20 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Stephan Bergmann
5a8b1b16de Remove unused jfw_setJRELocations
Change-Id: If71cc5052f7ddfbc2d69ba01aa0cd3be2a4def8e
2014-05-08 12:58:01 +02:00
Stephan Bergmann
f2529fc744 jvmfwk: sal_Bool -> bool
Change-Id: I35f302006cb9ef6e98a041dea811818b98c0e876
2014-02-18 12:17:37 +01:00
Stephan Bergmann
471cbb0522 bool improvements
Change-Id: I418611622b4b47ed5a4fa2ab99afb25371b186f6
2014-01-28 20:26:26 +01:00
Stephan Bergmann
65191cda81 bool improvements
Change-Id: I757e19313576d2c3d13af1cb720f182f0de91613
2014-01-27 10:47:32 +01:00
Stephan Bergmann
e3133ae237 Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx).  This change should be
transparent to client code.

Missing overloads of insert() for bool have been added to OStringBuffer and
OUStringBuffer (which required dropping one !VALID_CONVERSION check that would
now pick that overload, but would be flagged by
compilerplugins/clang/pointertobool.cxx).

Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-23 18:43:53 +01:00
Stephan Bergmann
e7f7b1d09c bool improvements
Change-Id: Ic4572480d48e341c8fa611a3283efc351f530eb5
2014-01-21 13:24:30 +01:00
Stephan Bergmann
2acc9da9e1 -Werror=unused-macros (MinGW, USE_ACCESSIBILITY_FILE)
...dead at least since c58b07c958 "#i20020#," if
not even since the beginning, 49614181e5 "#i20052#
plugin lib for java framework."

Change-Id: Ic0b35341cb8038ccfe0a2f4f5b758341b9ab13b9
2013-04-17 11:51:12 +02:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Tor Lillqvist
b7525f1f1d Drop jvmaccess and jvmfwk when no SOLAR_JAVA
Just sprinkle #ifdef SOLAR_JAVA into the code instead.

In the source for jvmaccess and jvmfwk such ifdefs can be removed as
it isn't compiled unless SOLAR_JAVA.

Change-Id: Ia8614f8bd6d833582d3b79b5fb75f9153fa79606
2013-04-05 00:18:50 +03:00
Stephan Bergmann
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
Tor Lillqvist
55e95d1dcb warning: unknown log area 'jvmfwk' [loplugin]
This is not a warning that would stop an --enable-werror build, but still
worth fixing.

Change-Id: I6c47fd636f57f55cbe406f51e2f24e015924ce14
2013-03-22 08:57:58 +02:00
Thomas Arnhold
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
Thomas Arnhold
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
Stephan Bergmann
e5546342cb Let JavaVirtualMachine::getJavaVm start the VM it already found
Since b699519969 "Drop support for /etc/opt/ure
and ~/.ure from LibreOffice 4" there is no place any more where a plain URE will
store information about a selected JVM, so JavaVirtualMachine::getJavaVM will
go into an endless loop of jfw_startVM -> JFW_E_NO_SELECT ->
jfw_findAndSelectJRE -> jfw_startVM -> ...  The solution is to pass the JavaInfo
determined by jfw_findAndSelectJRE into the second invocation of jfw_startVM
(for which the parameter list of the latter needed to be changed), instead of
relying on jfw_findAndSelectJRE and jfw_startVM implicitly communicating that
information via user configuration files.

Change-Id: I5799f04c457e8a849c67ed827dc5e134c6563362
2012-12-18 12:47:39 +01:00
Tor Lillqvist
3237a3772b Typo
Change-Id: I6ec48d3156f11c4ecb5f24a70a5c83603a86f834
2012-10-08 12:07:10 +03:00
Tor Lillqvist
ce3ac48c3a Fix for !SOLAR_JAVA
Change-Id: I43d8680304ef11f2b5f5e3edafcc6af6eca8d601
2012-10-08 11:40:48 +03:00
Tor Lillqvist
c56600dfbe Move the #ifndef DISABLE_DYNLOADING a bit earlier
Change-Id: I1777d6304b2ebb218c0f85c778f1a66d05c4f454
2012-10-07 10:43:07 +03:00