Commit Graph

351 Commits

Author SHA1 Message Date
Stephan Bergmann
6ec4109f73 Keep strings alive again as necessary
...fixing regression introduced with 49eb02f07a
"new loplugin:unusedvariablemore"

Change-Id: Ib598d67add50031937c9c9f3e23ea16d0a1da107
2018-04-12 08:26:34 +02:00
Noel Grandin
49eb02f07a new loplugin:unusedvariablemore
collection of heuristics to look for local variables that are never read
from i.e. do not contribute to the surrounding logic

This is an expensive plugin, since it walks up the parent tree,
so it is off by default.

Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06
Reviewed-on: https://gerrit.libreoffice.org/52450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-11 09:48:10 +02:00
Stephan Bergmann
19d2ec6539 Don't pass empty option to JNI_CreateJavaVM
sUserClassPath may be empty (instead of containing "-Djava.class.path=...")
here, which older versions of Java have apparently silently ignored.  But
Java 10 now fails with JNI_EINVAL (-6).  (Happens e.g. during
CppunitTest_dbaccess_hsqldb_test.)

Change-Id: Ifd13222f0d0ae69547bd1a9fe0fd5eae47917d0a
Reviewed-on: https://gerrit.libreoffice.org/51949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-28 08:13:57 +02:00
Mike Kaganski
94a5665ef3 jvmfwk: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: Ibb69ba9c994e44c162318e40c4469c311309f326
Reviewed-on: https://gerrit.libreoffice.org/48996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 17:56:41 +01:00
Noel Grandin
4de9091c62 loplugin:flatten loosen condition
the description in the comment was right, but the code was not

Change-Id: I7c038e7453f4387d33ec6423c0c55446d6d0df47
Reviewed-on: https://gerrit.libreoffice.org/44680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-14 06:43:21 +01:00
Noel Grandin
eb5d232342 loplugin:constantparam in i18nlangtag
Change-Id: I148a47a9b63b78651ec18cd947f45b8f4dbb9345
Reviewed-on: https://gerrit.libreoffice.org/44094
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31 13:09:29 +01:00
Noel Grandin
b9fd0d1c42 loplugin:constmethod in svl
Change-Id: If92869e19c413e11f1f299a97f96b9637aaba65d
Reviewed-on: https://gerrit.libreoffice.org/43864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26 11:43:40 +02:00
Stephan Bergmann
0a938e7859 loplugin:includeform: jvmfwk
Change-Id: I7292ced23647692fdc85a3c234fb1469a91ad0ea
2017-10-23 22:46:03 +02:00
Julien Nabet
2ea531c057 Use loop ranges in jvmfwk
to simplify and avoid all the typedefs

Change-Id: Ia14337dd71b55fc24f162b5436af76aeeb8d2575
Reviewed-on: https://gerrit.libreoffice.org/43346
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-13 00:19:34 +02:00
Mike Kaganski
362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.

We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.

Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 11:23:41 +02:00
Mike Kaganski
aaa26a58ba Some more WIN32_LEAN_AND_MEAN
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874
Reviewed-on: https://gerrit.libreoffice.org/42419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 19:24:31 +02:00
Noel Grandin
7ca4ea54b4 clang-tidy modernize-use-emplace in hwpfilter..lotuswordpro
Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70
Reviewed-on: https://gerrit.libreoffice.org/42156
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 13:50:50 +02:00
Noel Grandin
9881bea8d4 remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:55:13 +02:00
Noel Grandin
c9253818ec loplugin:oncevar
extend oncevar to any POD type

Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0
Reviewed-on: https://gerrit.libreoffice.org/40564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 08:25:07 +02:00
Stephan Bergmann
46e6f92615 loplugin:oncevar: empty strings: jvmfwk
Change-Id: Ic021968b648359d94e7e44d59606b25a6f6ce8c3
2017-07-13 11:45:53 +02:00
Noel Grandin
8c77b5670e use OString::operator== in preference to ::equals
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf
Reviewed-on: https://gerrit.libreoffice.org/39646
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06 20:23:09 +02:00
Jochen Nitschke
a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Noel Grandin
4d162d8222 cleanup some OString stuff in jvmfwk
Change-Id: I80d221a348c4bd5fcec82cafc455a051237ae95d
Reviewed-on: https://gerrit.libreoffice.org/38131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 08:56:39 +02:00
Stephan Bergmann
0bebf37bac Revert "loplugin:stringcopy"
This reverts commit 9578741684.  It wasn't really
necessary (see commit message of 8b1fcedcd1
"...and re-eanble loplugin:stringcopy again") and reportedly causes issues with
older Boost (see
<https://lists.freedesktop.org/archives/libreoffice/2017-May/077786.html>
"[Libreoffice-commits] core.git: jvmfwk/source").
2017-05-29 11:25:37 +02:00
Stephan Bergmann
9578741684 loplugin:stringcopy
Change-Id: I04e3faf18cd6dae39d948cfb3dd0834dd96751b1
2017-05-19 22:10:19 +02:00
Chris Sherlock
97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock
3cf126d701 tdf#43157: convert jvmfwk from OSL_ASSERT to assert
Change-Id: Ie06633dd6a49ed9fc51dfb5e6066529020dcf268
2017-05-07 08:18:25 +10:00
Noel Grandin
a975225678 clang-tidy readability-simplify-boolean-expr in hwpfilter..lotuswordpro
Change-Id: I945d3fe6af5f88937b341dfc3696bf1d36344862
Reviewed-on: https://gerrit.libreoffice.org/36874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-24 10:05:54 +02:00
Stephan Bergmann
f276171835 Use std::unique_ptr<JavaInfo> in jfw_plugin_getAllJavaInfos
Change-Id: I2beb95c42c666a788a87a45f59bc15ccfcf25aa6
2017-04-13 17:32:44 +02:00
Stephan Bergmann
8d475bb13f Use std::unique_ptr<JavaInfo> in jfw_plugin_getJavaInfoByPath
Change-Id: I3511eaa12bb689a374a775204a3480d7c667a915
2017-04-13 17:32:43 +02:00
Stephan Bergmann
74315cbccf Use std::unique_ptr<JavaInfo> in jfw_plugin_getJavaInfoFromJavaHome
Change-Id: I8be48d1eec799f347a5edaa67837cf1bbf4d2cc3
2017-04-13 17:32:43 +02:00
Stephan Bergmann
626dec44e3 Use std::unique_ptr<JavaInfo> in jfw_plugin_getJavaInfosFromPath
...thereby fixing a memory leak

Change-Id: I1aa91eeb407987abcdaa5221f4abd447f881c5d2
2017-04-13 17:32:43 +02:00
Stephan Bergmann
6925007c2a Simplify jfw_findAllJREs
...dropping remaining uses of CJavaInfo

Change-Id: I76afd5af927233712181f58b14fe6f4c1a9c15c2
2017-04-13 17:32:43 +02:00
Stephan Bergmann
77e5a6d857 Replace a use of CJavaInfo with std::unique_ptr<JavaInfo>
Change-Id: Ib659d6edf362901a95cfb50ac008520805ad0fb0
2017-04-13 17:32:43 +02:00
Stephan Bergmann
2767dcc7b2 Replace a use of CJavaInfo with std::unique_ptr<JavaInfo>
Change-Id: I89cb19969285200a61c47d29e819a50845fa692b
2017-04-13 17:32:43 +02:00
Stephan Bergmann
41a20d3b37 More std::unique_ptr<JavaInfo> lifecycle management
Change-Id: If53347633ec4b2f8c2b221ba2057e0c38fa97b67
2017-04-13 17:32:42 +02:00
Stephan Bergmann
1a2afa01c9 Simplify passing options to jfw_startVM
Change-Id: Idac31e282fe4df69449298a03d491473e460c742
Reviewed-on: https://gerrit.libreoffice.org/36495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-13 07:47:48 +02:00
Andrea Gelmini
3c3f7d784e Removed duplicated includes
No automatic tools. Manual checked and tested.

Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754
Reviewed-on: https://gerrit.libreoffice.org/36371
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-13 07:46:16 +02:00
Stephan Bergmann
9b157d37f1 Remove unused jfw::VendorSettings instantiations
Change-Id: I0af90fbb9eb77e5e65b29a79cc3b37af8cfc75e6
2017-04-12 09:36:20 +02:00
Stephan Bergmann
598f788116 Remove unnecessary copy
Change-Id: Ib350999ddf3ed2753b9e615a07b963c459dc714b
2017-04-12 09:36:20 +02:00
Stephan Bergmann
331f0e0c1e Remove unused function pointer typedefs
Change-Id: I51ee45dba007e5709b1516c36b029f940ea7153e
2017-04-12 09:36:20 +02:00
Stephan Bergmann
f1bbafc584 Convert rtl_uString -> OUString in jfw_get/setVMParameters
Change-Id: I55f96873661f686cd9625d69523718ccb54659dc
2017-04-12 09:36:20 +02:00
Stephan Bergmann
61f43d0327 Simplify jfw::VersionInfo
Change-Id: I2cc1071bbaf9c68fbd621d6c0c6953b7646b1a62
2017-04-12 09:36:20 +02:00
Stephan Bergmann
346b5cfd90 Convert some rtl_uString -> OUString in jvmfwk
Change-Id: I08de5cab29dabc6fd824d5df8bac12c8520a05ae
2017-04-12 09:36:20 +02:00
Stephan Bergmann
59fddf430f Calls to jvmfwk/framework.hxx must not pass in null, drop JFW_E_INVALID_ARG
Change-Id: Iff4b8ccc79e194f645791ac73818e3b677ae32a6
2017-04-11 19:10:48 +02:00
Stephan Bergmann
40677a2909 Fix missing deref
...lacking since recent f0454e72c1 "Use
std::unique_ptr<JavaInfo> for lifecycle management in jvmfwk/framework.hxx"

Change-Id: Ied39be52ccc8cbef48cdfb4933e4ac1914fd0fd3
2017-04-11 18:59:13 +02:00
Stephan Bergmann
7635e0c1c7 sal_Bool -> bool
Change-Id: If632eb547aa5082ad13eac8c2ad39a1742309fc7
2017-04-11 18:38:51 +02:00
Stephan Bergmann
33cf2b6613 Let jfw_isVMRunning return the result; there are no error conditions
Change-Id: I004b3d6f6b7b32d1bb41072d7fdd4a66f944d992
2017-04-11 18:33:31 +02:00
Stephan Bergmann
16f29aa720 sal_Bool -> bool
Change-Id: Iec70d6726e36af607a0a5b5a0f6dc86d05322435
2017-04-11 18:28:43 +02:00
Stephan Bergmann
15c98f1740 jfw_existJRE requires non-null args, never returns JFW_E_INVALID_ARG
Change-Id: I2067b77393427a5a6a4273c2f609ff8d335f436a
2017-04-11 18:25:04 +02:00
Stephan Bergmann
583508ced2 sal_Bool -> bool
Change-Id: I8df49f349308cc17d684d5c0e8215aa628dfaeda
2017-04-11 18:18:42 +02:00
Stephan Bergmann
f0454e72c1 Use std::unique_ptr<JavaInfo> for lifecycle management in jvmfwk/framework.hxx
Change-Id: Ie604c75e92c407ff3118aaa58155648d956c91fb
2017-04-11 18:04:54 +02:00
Stephan Bergmann
a730dc1b56 Remove unnecessary jfw::CJavaInfo::cloneJavaInfo
Change-Id: Ia9e807c0d1e5b0664d711c551a5e70afccbcc564
2017-04-11 15:07:42 +02:00
Julien Nabet
0a57e51f41 Fix typo for "expression"
Change-Id: Iad0728fe53912d85ee40ef1b39d476a47aaad2d2
Reviewed-on: https://gerrit.libreoffice.org/35433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 17:25:49 +00:00
Samuel Mehrbrodt
64a50fc271 Typo: requirments -> requirements
Change-Id: I02c5846eb51071e1a958c3d65e150fb7cbc7d58a
Reviewed-on: https://gerrit.libreoffice.org/34873
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-03 16:43:59 +00:00