Commit Graph

650 Commits

Author SHA1 Message Date
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
0274246d08 Support OpenJDK "-internal" version suffix
...as e.g. produced by java-1.8.0-openjdk.fc20

(Sorting Rel_INTERNAL < Rel_EA is somewhat arbitrary.)

Change-Id: I25449ec4da63243fc1044aae366f8fa6c5ef1eb5
2014-02-18 16:41:22 +01:00
Stephan Bergmann
f2529fc744 jvmfwk: sal_Bool -> bool
Change-Id: I35f302006cb9ef6e98a041dea811818b98c0e876
2014-02-18 12:17:37 +01:00
Stephan Bergmann
237d2c923b Don't set JAVA_HOME on Mac OS X
...for one, it doesn't appear necessary there ("needed for awt"), and for
another setting it according to Oracle's JRE 7 would prevent a subsequent
visit to the Advanced preferences pane from listing Apple's JRE 6, as launching
that java and reading its system properties would be fooled by the JAVA_HOME and
report the Oracle system properties instead.

Change-Id: I02d82de6113b44b3cae3fb55cd83177fe852d769
2014-02-12 08:12:53 +01:00
Stephan Bergmann
ba826a22c6 Simplify string handling
Change-Id: I1b79bfd7e7e92fc8f4937e6b9ae9ec9468839ea6
2014-02-12 08:07:48 +01:00
Stephan Bergmann
6c697a99c9 Related fdo#74597: Java on Mac doesn't use javaldx/library path fiddling
...so no need to return non-empty SunInfo::getLibraryPaths (for the Oracle JRE,
cf. how this had always returned an empty set for the Apple JRE in
otherjre.cxx).

This fixes the bug that selecting the Oracle JRE in the Advanced options pane
didn't stick, because jfw_areEqualJavaInfo was called on a JavaInfo read back
from XML where nRequirements had been cleared (in CNodeJavaInfo::loadFromNode)
and a JavaInfo where non-empty SunInfo::getLibraryPaths ->
VendorBase::needsRestart() == true -> nRequirements == JFW_REQUIRE_NEEDRESTART,
so always returned false.

(There's multiple errors here.  It is questionable whether jfw_areEqualJavaInfo
should take nRequirements into account, at least when used from
SvxJavaOptionsPage.  And VendorBase::getLibraryPaths appears to be only used to
compute VendorBase::needsRestart, ignoring the actual path data.  But leave that
for future clean-up.)

Change-Id: I5f004434b1cb7e909a153c43c474a2317f24b0c1
2014-02-11 14:21:07 +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
Caolán McNamara
def94cc40e coverity#705670 Resource leak
Change-Id: Ib89a580127d91e9d7a23b998df3cd100246bf289
2014-01-24 15:09:41 +00: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
Noel Grandin
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +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
Michael Stahl
bf0e30f9cd jvmfwk: remove Package_*solver
Change-Id: I5784f3c060680c366053334db8a879250bfdbbbe
2013-10-28 20:17:26 +01:00
Michael Stahl
8df17a3409 gbuild: set Package default target to INSTDIR
Change-Id: I2bc45e4ba63f5faaee7389bcd9d7b3f563503186
2013-10-28 20:17:26 +01:00
Michael Stahl
176782e303 jvmfwk: rewrite odd conditional
Change-Id: I69f8e44b0845ac2d6db5a32298de1b561be61f2c
2013-10-28 20:17:25 +01:00
Stephan Bergmann
658e88c59d Improve debug output (and some clean up)
Change-Id: Ibce90b4eeab679d526f0e0b1e9a8ab3b14255622
2013-10-28 16:09:06 +01:00
Markus Mohrhard
4badcfda55 Revert "Related: #i119525# List only JREs whose jvm library can be loaded"
This reverts commit 37ca14359b.

This breaks the loading of the jvm.dll on Windows if the msvcr*.dll is
not in the system path.
2013-10-14 06:10:15 +02: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
Tor Lillqvist
4c63fd10a5 Try to fix cross-compilation
Add more FOO_FOR_BUILD variables and some gb_Foo_for_build functions.

Get rid of gb_INSTROOT and gb_DEVINSTALLROOT, just use INSTROOT.

Change-Id: Iee531b02d14fae41edb68ad589a5dec829a60255
2013-09-23 00:54:43 +03:00
Stephan Bergmann
a041f518af Still copy jvmfwk support files to solver
...instead of only to instdir, as happened after
2e47462d07 "jvmfwk: install also into instdir," so
that CppunitTests (which still run against solver) can use jvmfwk.  This will
become moot when solver is eventually dropped.

Change-Id: Ic2cdbf32e20a79f8cc6ac2088e4bc47dcd6f5cc5
2013-09-16 11:39:24 +02:00
Stephan Bergmann
5397b49f4d Towards a working instdir for Mac OS X
Introduced gb_INSTROOT, which is the same as $(INSTDIR) except for Mac OS X,
where it is $(INSTDIR)/LibreOffice.app/Contents.  Most stuff ends up there (so
most occurrences of $(INSTDIR) have been replaced with $(gb_INSTROOT)), but SDK-
related stuff goes to $(INSTDIR)/$(gb_Package_SDKDIRNAME).  (And
GeneratedPackage needed to be made more flexible, to allow for packages that go
into either of those two places.)

For Android and iOS, gb_INSTROOT probably still needs to be set.

The most obvious missing thing yet to make instdir work for Mac OS X is the
instdir/*/LibreOffice.app/Contents/ure/ vs.
instdir/*/LibreOffice.app/Contents/ure-link/ split.

Change-Id: I4478edd27b14c92c96d92d5169bdca3ec50d78f5
2013-09-11 00:50:54 +02:00
Matúš Kukan
2e47462d07 jvmfwk: install also into instdir
Change-Id: I4004361a85af4e6aed9dd0951d1154a2d99f97e7
2013-09-09 22:09:00 +02:00
Stephan Bergmann
644c33a857 fdo#67313: Use "lo" suffix for private URE libs
...(like is done for most of LO's non-URE libs already) to reduce likelihood of
name clashes, esp. on Windows where URE libs are found via PATH.

This introduces PRIVATELIBS_URE, and removes now-unused UNOLIBS_URE.

Change-Id: Ib95dd45f18de140a54e62d632dbf2239f83c232e
2013-08-27 14:03:36 +02: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
08452f1208 Rename SOLAR_JAVA to ENABLE_JAVA and HAVE_FEATURE_JAVA
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
2013-08-19 10:29:04 +03: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
Thomas Arnhold
318f2b64cc remove some createFromAscii usage
there are a lot more of them:

git grep 'createFromAscii[^)]*"'

Change-Id: Ibc2e9cae208d8b9c91667bb3b177c6bd6d3a9424
2013-06-29 16:23:23 +02: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
Matúš Kukan
74f5df9bac gbuild: rework AutoInstallLibs and autoinstall ure executables
Change-Id: I7312d94f90758d450a69410819c5e8c142756a47
2013-06-10 20:03:01 +02:00
Michael Stahl
1ff01d207d jvmfwk: de-Pascalize do_msvcr71_magic
The uninitialized Module variable causes the smoketest to fail when
built with MSVC 2012 (assinging to it raises some weird exception).

Change-Id: I77b3b591a94f4dfbb373938e3787f75e6a8e09c5
2013-06-02 20:37:57 +02:00
Ariel Constenla-Haile
37ca14359b Related: #i119525# List only JREs whose jvm library can be loaded
(cherry picked from commit 0b31fa19e50d8259d3cbe695723ea02e2c5ff711)

Change-Id: I1f96c6239d7278c4eb0c17b69f9d35e08eb8260b
2013-05-29 12:58:47 +01:00
Herbert Dürr
b828a6f494 Related: #i121715# find official JRE>=7 on OSX
(cherry picked from commit a3eded9728647bde4af68b9f3c75a51dc0676fc7)

Conflicts:
	jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml
	jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx

Change-Id: I5ec6aa62147f9b3fb3e5142fbc2658c0b54f21b8
2013-05-28 17:20:07 +01:00
Ariel Constenla-Haile
c0b455a664 Clearer javaldx message
(cherry picked from commit fdebe4193ae0f3f8a8281dfc0a2f053e578cf1b9)

Conflicts:
	jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx

Change-Id: I4c26c704ce85a273d7022260bb721e295041c260
2013-05-18 14:36:05 +01:00
Pedro Giffuni
cb5000280e Add Oracle as a Java vendor for Solaris.
Conflicts:
	jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml

Change-Id: Ifaa60fafb0db62ed60ba4080b6bb3713d8d9e3be
2013-05-18 00:54:56 +02:00
Tor Lillqvist
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03: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
Luboš Luňák
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02:00
David Tardon
e64e85b221 copy more rc files to instdir
Change-Id: Ia4cc2b8e504f46734ea7bfaade60bf27509cce32
2013-05-05 15:02:50 +02:00
Ariel Constenla-Haile
55d2d982d0 Resolves: #i66923# Add support for JRockit JVM
(cherry picked from commit cb38ee0da6fa928118fbc1da118a707d7799cb40)

Conflicts:
	jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml
	jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml
	jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx

Change-Id: Iffd413ba1d74ae3b7da58df7b092c43c4f64a7c9
2013-05-02 13:37:26 +01:00
David Tardon
1cc9bbfd57 gbuild: drop empty use_packages calls
Change-Id: I8e9f70eb5d929c98b4379416c2259a74e31d587f
Reviewed-on: https://gerrit.libreoffice.org/3503
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-24 05:18:15 +00:00
David Tardon
c042cd05e9 gbuild: drop uses of removed packages
Change-Id: I400fad08c0ae7b6b34bad63693f54856867e4dac
Reviewed-on: https://gerrit.libreoffice.org/3502
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-24 05:18:03 +00:00
Bjoern Michaelsen
b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00
Michael Meeks
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Stephan Bergmann
598215cb41 -Werror=unused-macros (MinGW, jvmfwk)
Change-Id: I860939930c43cac89c4ab745bf129922be1f1511
2013-04-17 11:51:12 +02: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