Commit Graph

259 Commits

Author SHA1 Message Date
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
Stephan Bergmann
8814eb4770 Remove unused cModule leftovers
Change-Id: Id08194460e9a42896591047e36b3a95e5fbc47be
2014-12-15 13:18:56 +01:00
Caolán McNamara
6d8b06224c callcatcher: update unused code
Change-Id: I3cd65d112339fa9c67ed462fe39acbbef91d4d8d
2014-12-08 10:09:01 +00:00
Caolán McNamara
f4d03933dc callcatcher: update unused code
Change-Id: Ia25b857738bb7b6c3baf18c68ef0d1bc0b3e142e
2014-12-04 10:44:36 +00:00
Stephan Bergmann
45ca1bfc22 Fold URE: Linux ure/lib/* -> program/
The ../../../program/ links in the URE jar Class-Paths are a temporary kludge
(and juh.jar had lacked adaption for Mac OS X).

Change-Id: I2542d8a582866485dd61c05df3fc6b4b39a8403d
2014-11-28 11:57:28 +01: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
Brij Mohan Lal Srivastava
d32be3ace8 fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.

Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14 09:20:38 +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
Stephan Bergmann
fc0d57b7af Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06 17:24:13 +01:00
Noel Grandin
05050cdb23 use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-06 13:51:10 +02: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
Tor Lillqvist
6492c8576e Make the "Mac-like" or "canonical" app bundle structure always used on OS X
In other words, only executable files go in the MacOS folder. Dynamic
libraries and bundled frameworks (i.e., LibreOfficePython), and
nothing else, go in the Frameworks folder, and all other files go in
the Resources folder.

Especially, note that Java class files and rc (.ini) files also go in
Resources.

Such an app bundle structure is what Apple strongly suggests one
should use, and it has been hinted that future versions of code
signing and/or Gatekeeper will require such a structure.

There is still some ugliness thanks to traces of the historical
separation of URE from "the office". Like there are two separate
"unorc" files, one for URE, one for the LibreOffice application. IMHO,
this should be cleaned up, but is probably controversial.

(Eek! I now see there are actually *three* unorc files in the app
bundle. Not intentional. Need to fix that later.)

Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
2014-09-09 13:55:23 +03:00
Stephan Bergmann
07dbd2076b Nothrow dtor
Change-Id: I1793d2eab568f4a65813fca7257c74e1a85a0090
2014-09-03 10:20:31 +02:00
Caolán McNamara
d1c18edd3f coverity#707200 Uncaught exception
Change-Id: Iaf115f1f11aef69ef5dba7023f4126c22d1f49ff
2014-09-02 15:30:54 +01:00
Markus Mohrhard
c76b5ace20 this code is redundant and leaks memory
Change-Id: Ib57f44c203ead68102d712ef29ab7362b0cea8db
2014-08-25 13:06:01 +02:00
Caolán McNamara
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
Stephan Bergmann
e4b7da8da8 Dead declarations
Change-Id: I43e388df118b9e08ab8c05cad31871ef0af35164
2014-06-27 08:59:59 +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
Thomas Arnhold
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
Stephan Bergmann
5a8b1b16de Remove unused jfw_setJRELocations
Change-Id: If71cc5052f7ddfbc2d69ba01aa0cd3be2a4def8e
2014-05-08 12:58:01 +02:00
Takeshi Abe
1a5457a11c Avoid possible memory leaks in case of exceptions
Change-Id: I4b2b439615db0ff4598f405d1e339eebbff7ae91
2014-04-21 22:29:09 +09:00
Thomas Arnhold
fa1f7d27c1 typo: attribut -> attribute 2014-04-14 12:32:59 +02:00
Noel Grandin
86a32589e9 Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.

So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.

Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
Alexander Wilms
132d7941e0 Remove visual noise from jvmfwk
Change-Id: Ie9ad9478532b395bd6a2bddd54bbe0d10b1b5eb2
Reviewed-on: https://gerrit.libreoffice.org/8277
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 09:11:54 -06: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
Noel Grandin
08fe82e59c Remove unnecessary use of OUString constructor in + expressions
Convert code like
  aFilename =  OUString::number(nFilePostfixCount) + OUString(".bmp");
to
  aFilename =  OUString::number(nFilePostfixCount) + ".bmp";

Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +02:00
Noel Grandin
73342dbb82 remove unnecessary RTL_CONSTASCII_STRINGPARAM
A final pass through the code, converting code to use the new
OUString and OString methods that can detect string literals.

Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
2013-11-22 08:07:19 +02:00
Noel Grandin
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
Michael Meeks
72b954df59 Avoid using gconftool. Atk provides a11y not Java on Unix.
cf. comment in framework header. Should have no impact on real
run-time Java a11y, which would be enabled later as-needed; only
on JRE selection. For extreme corner-cases, where your auto-selected
JRE has no a11y support either select another JRE in the UI or:

$ export JFW_PLUGIN_FORCE_ACCESSIBILITY=1

to override.

Change-Id: I59a6428e5a11664b75c29580cad76eb9500db45a
2013-10-30 11:09:55 +00:00
Stephan Bergmann
658e88c59d Improve debug output (and some clean up)
Change-Id: Ibce90b4eeab679d526f0e0b1e9a8ab3b14255622
2013-10-28 16:09:06 +01:00
Tor Lillqvist
01e1a2465e URE folder path fixes for the HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE case
Change-Id: I5019cce2172db7b3ac74e25f5ea9dc62e9fd03f8
2013-10-05 21:10:42 +03:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Tor Lillqvist
c6a7300974 Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.

Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-18 21:11:16 +03:00
Takeshi Abe
57931a7cf7 Mark as const
Change-Id: Ib78b25641ae20a3eb23545649f08b963e34c74ff
2013-07-29 17:39:30 +09:00
Stephan Bergmann
3af0114a29 Introduce O[U]String::toUInt32
...which has become necessary since bd60d41176
"Handle oveflow in O(U)String::toInt() functions" reduces values in the range
(SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied
on getting a correct (unsigned) value for the whole input range ["0" ..
"FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3
"Revert overflow checks in O[U]String::toInt{32,64} again").

Audited all uses of toInt32/64 with non-decimal radix.  (There is still a TODO
comment in oox/source/helper/attributelist.cxx, and
stoc/source/typeconv/convert.cxx will still need some love and test code.)

Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95
2013-06-13 17:08:36 +02:00
Philipp Riemer
e8eab43eeb cleanup whitespaces due to RTL_CONSTASCII_USTRINGPARAM removal
In e2e2cc6114 the method was removed
automatically leaving several line breaks etc. as visual noise.
2013-05-06 19:21:07 +02:00