Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Ica8b3c8c5476f2f0f3bebf0cfcd80b08090c6119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167556
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ie21df5b25d15a15ba7a1660970ff7064bb8ec1d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167385
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
the check is only done for windows & mac since the property can have
arbitrary values - in OpenJDK it is hardcoded for windows, but for other
platforms it can come from autoconf. For a more detailed explanation
see f05a42ef8c8192186f91a169047742e5c3ae9b9e
Change-Id: I8555ef3b7153a9b744b45cf07deae3c3a1d48ae3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150119
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
when applying my upcoming patch to also consider O[U]StringBuffer
Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
That check had been added with 32bc8ddbf335dd26019edcf12758643b4cff9913
"tdf#94716 allow Oracle's JDK to be used on OS X 10.10 and 10.11", back at a
time when there was substantial trouble with installations of Apple's own Java
and Oracle JREs. One consequence of that commit and its
JvmfwkUtil_isLoadableJVM check was that on macOS we only supported JDKs (with a
surrounding Contents directory containing an appropriate Info.plist files), not
plain JREs (cf. <https://wiki.documentfoundation.org/ReleaseNotes/5.1#macOS>
"Prior work arounds of having both an Apple JRE 6 and an Oracle JRE 8 are no
longer sufficient. Use of the JDK is now hard coded, see tdf#74877, tdf#94716
and core commit 32bc8ddbf335dd26019edcf12758643b4cff9913.")
However, Apple's own Java is long since deprecated (cf.
<https://support.apple.com/en-us/HT204036> "You can also download legacy Java SE
6 from Apple if you’re using an app that specifically requires this unsupported,
out-of-date version."), and presumably of no practical concern at least on
contemporary Aarch64-based macOS.
And there is e.g. SDKMAN! (<https://sdkman.io/>), which installs JDKs in a way
that they are not surrounded by Contents directories containing appropriate
Info.plist files, so JvmfwkUtil_isLoadableJVM returned false for them and you
couldn't add them on the LibreOffice Advanced Options tab.
So at least for Aarch64-based macOS, drop that presumably-legacy
JvmfwkUtil_isLoadableJVM check (but keep it for x86-64--based macOS at least for
now, just to be safe). (That implies that for Aarch64-based macOS, it should
now work again to also use plain JREs.)
Change-Id: I3bcbb3c14e3a9e9dde39fd6f4572b632e05df9e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141508
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...introduced in 655b6c2f46a73d9893ba8e6b572731a5890a4f72
"loplugin:stringviewparam". Unlike its O[U]String lastIndexOf(x, n)
counterpart (which looks for the last x whose end position, exclusive, is <= n),
string_view rfind(x, n) looks for the last x whose start position, inclusive, is
<= n. (So here would have left slash unchanged.) (And the seemingly simpler
jvm_dll.rfind('\\', slash - 1)
would fail when slash is zero, as in that case it would call rfind with a second
argument of npos, i.e., search for the last '\\' in the complete jvm_dll.)
Change-Id: I148a5db860d4b9e9d58a4a8847880a7a7020c5a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140486
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6e19d4d03957c35caa79a231927eae04ae630442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found by inspecting call sites of OUString::getToken
Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...which had been removed in 18bdf78e156f3cd1e6ccbb3ae28e919583bac70c "Azul is
just another OpenJDK variant", when fixing the previously mis-classified Azul
JRE from "uses OtherInfo" to "uses SunInfo". But the IBM Semeru Runtime
(<https://developer.ibm.com/languages/java/semeru-runtimes/downloads/>) is
another arguably mis-classified case due to its java.vendor of "IBM Corporation"
(and where the
VENDOR_MAP_ENTRY<OtherInfo>("IBM Corporation"),
line in jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx might be relevant for
some other JRE from IBM; at least, that entry is present ever since the
introduction of vendorlist.cxx in 738e9b77b9d181b376188e405e1eb353cf93c597
"INTEGRATION: CWS jl8").
So just generally support the bin/server/jvm.dll path here for "uses OtherInfo",
even though it should actually only be necessary for "uses SunInfo".
(See the mail thread starting at
<https://listarchives.libreoffice.org/global/users/2022/msg00246.html>
"[libreoffice-users] LibreOffice 7.3.3.2 Windows 64 bit seems not detect
AdoptOpenJdk JRE Windows 64 bit runtime".)
Change-Id: I3a4d02309b7c833c3cd32dc2dda4f4cb7b216693
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133827
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I05f3b171578b8fef5b15dcbbf10ae9b7cf2d1b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
for which we have o3tl:: equivalents
Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I62a7534844006a7bf3c2ece5e5d2f8b739a15b9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...like "11.0.14.1" reported now by
java-11-openjdk-headless-11.0.14.1.1-5.fc35.x86_64, and which caused
> warn:jfw:274674:274674:jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx:100: [Java framework] sunjavaplugin.so does not know the version: 11.0.14.1 as valid for a SUN/Oracle JRE.
(For simplicity, cover it with the same code block that already covers a
potential "_01" etc. part following the official(?) three dotted segments.)
Change-Id: Id98235d3be59653ab412f9b6c1ffbf3b0470bd6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131586
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
look for potentially trivial destructors that can then be elided
Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3f31f223b6e906c6b40415a8d5c66c27e3c7cff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130338
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...that had been added in 811de66d7fd8c93c43d8e4e2dc73720033ba939b "First
attempt at getting access to the Java VM on Android", together with another
fprintf(stderr, "Got lo_get_javavm = %p", lo_get_javavm);
that had meanwhile been removed again in
5510127e89d6971a219ce3664e4631d6c6dda2b1 "Android code refactorig and hacking"
Change-Id: I1a50563e2af1ea5a0ecbd2cc9d49d70c6e5bbbd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130337
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Idcfe7321077b60381c0273910b1faeb444ef1fd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130242
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
See tdf#42949 for motivation
Change-Id: I758bb27e93779e3df21c463714e49354748f446f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
...ever since 61c4f96d6ae6a80370774e53287edb27cbce8067 "Support AdoptOpenJDK":
At least the old AdoptOpenJDK 1.8.0_275 I had lying around on macOS reported it
as "AdoptOpenJDK", not "AdoptOpenJdk". But instead of fixing all occurences of
"AdoptOpenJdk", we can just as well get rid of that vendor listing completely
now after 3d27b2fa9c5a03f78e5145377402f8a88e3da1be "tdf#124503: Support JRE
installations with unknown java.vendor property" and
3460c16d7f749d8d2a59d8b927df5ec31f64a083 "Make getVersionInformation always
return a VersionInfo ...even for JREs not listed in javavendors.xml, making it
default to a VersionInfo with sMinVersion = "1.8.0". (For a rationale for not
updating the <updated> elements of the modified
jvmfwk/distributions/OpenOfficeorg/javavendors_*.xml see the commit message of
95c38f6d77f1cb6ff3dc229c5e7130b2e732891d "Drop support for dead GNU Java".)
Change-Id: Iea34914201f604a0665a86dd07724628fa021c90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125402
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Lets extend it only to macOS (where there is some confusion now with Rosetta-
translated vs. native processes on Apple M1 machines), not to all Unix-like OSs:
The comment that it "is not defined what the exact [os.arch] values are" is
still relevant. At least for OpenJDK, while Windows has a hardcoded list of
possible values in GetJavaProperties at
<https://github.com/openjdk/jdk/blob/9604ee82690f89320614b37bfef4178abc869777/src/java.base/windows/native/libjava/java_props_md.c#L568>,
the corresponding non-Windows code in GetJavaProperties at
<https://github.com/openjdk/jdk/blob/319a3b994703aac84df7bcde272adfcb3cdbbbf0/jdk/src/solaris/native/java/lang/java_props_md.c#L175>
uses ARCHPROPNAME which, via
> -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
at
<https://github.com/openjdk/jdk/blob/c363db8ed00ff27eadf06294364d908d6a7d03a6/jdk/makefiles/CompileNativeLibraries.gmk#L185>,
appears to somehow come out of Autoconf at
<https://github.com/openjdk/jdk/blob/228c21635b011fbf956b83a0b07fc297e9a34c46/common/autoconf/spec.gmk.in#L93>,
so probably can show some variance in actual values being used.
Change-Id: I16725cd9365f6bd034372c653aa43ab84d487b98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125401
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I049148d82eb306e8ba7fdc9f0cc650f45b05da0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125257
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...even for JREs not listed in javavendors.xml, making it default to a
VersionInfo with sMinVersion = "1.8.0".
3d27b2fa9c5a03f78e5145377402f8a88e3da1be "tdf#124503: Support JRE installations
with unknown java.vendor property", which had changed getVersionInformation to
return an optional<VersionInfo>, said in the commit message: "For simplicity,
assume that any versions of such JREs are supported. Our baseline is Java 6,
and there are unlikely any older versions of JREs from unknown vendors out
there." Our baseline is Java 8 by now, and there are still unlikely any older
JREs out there, but for macOS ARM64 we may want to restrict to at least Java 17
implementing <http://openjdk.java.net/jeps/391> "JEP 391: macOS/AArch64 Port",
and this commit is a prerequisite for such a change (where we would then e.g.
change the hardcoded "1.8.0" to "17" for just that one platform).
(OtherInfo::compareVersions in jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
unconditionally returns 0, meaning "versions compare equal", so introducing a
default version of "1.8.0" should have no negative effect on any JREs that use
OtherInfo.)
Change-Id: I34dc5f2b755c2254a91d42c262786ceec70c746e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123958
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...which no longer worked anyway at least since
aafc10c9edb61e13ac557c7e43c8d4a31dce4f37 "Bump Java baseline to Java 8":
According to <https://en.wikipedia.org/wiki/GNU_Compiler_for_Java>, the last
version of GCC providing Java was GCC 6.5. But trying to add a build of that
("Tools - Options... - LibreOffice - Advanced - Java Options - Add...") would
already have failed before this commit due to a java.lang.ClassFormatError
("JREProperties (unrecognized class file version)") when executing the
JREProperties code compiled with --release 8. (Whereas now it fails because it
cannot even determine a JRE installation there according to the SunInfo rather
than GnuInfo rules used for the now-unknown vendor.)
The <updated> elements of the modified
jvmfwk/distributions/OpenOfficeorg/javavendors_*.xml have not been updated in
line with the rules documented at the end of jvmfwk/README.md: As mentioned
above, a GNU Java JRE cannot have been selected prior to this commit anyway, so
even though this is nominally an incompatible change of the xml files,
actually updating <updated> would only have negative ("just annoying if an
already selected JRE is still supported") but no positive consequences.
Change-Id: Ica245677dae977360bdb3c6544897eb060c3f844
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123906
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...so there was no good reason for 0f95f8ffd7a3685ca53876005a9c96f2e2e7bc99
"Support Azul Zulu JRE (at least on Windows)" to map it to OtherInfo rather than
SunInfo. (That way, it benefits from SunInfo::compareVersions's proper
implementation, unlike OtherInfo::compareVersions which always returns 0.
Although trying to add e.g. the too-old Java 7
<https://cdn.azul.com/zulu/bin/zulu7.50.0.11-ca-jdk7.0.322-linux_x64.tar.gz>
would already have failed before this commit due to a
java.lang.UnsupportedClassVersionError when executing the JREProperties code.)
This also reverts all the "needed by Azul" additions in
OtherInfo::getRuntimePaths; it is unlikely that any of the other JREs using
OtherInfo silently also benefited from them, and JREs of unknown vendor use
SunInfo (which does have those two paths already, as they are not only needed by
Azul there).
Change-Id: I4af9b4b9e65cd2346011522c105cfc62ec59f552
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123874
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I78970269bfd3eb7ad6b069ac99eeee707619d3e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123416
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3c28651779f17e1a410505ffaa863b4773037ccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123119
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
mostly by doing
$ git grep -l '#define.*\"' -- *.cxx
| xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'
Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iae559ca8bee9650c01167a4d1b918e18cbf03c28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118660
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...and move "10.0", "10.10", and "1.5.0_010" from badVersions[] to good
versions[] to make the test succeed (assuming these shall indeed be classified
as good by now, presumably due to changes to the SunVersion implementation in
the meantime)
Change-Id: Ia7cf9b0e607743a5e0534078c0221c1423f6cfb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118570
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This reverts commit b3541dea4889b9d0039554f87bd16e55189cf8b1.
Reason for revert: The code did not just deal with text encoding differences, but also with properties whose value contains line breaks.
For example, OpenJ9 has line breaks in "java.vm.info" and "java.fullversion", which now trigger asserts; also there is "line.separator" but this one happened not to cause problems so far.
Change-Id: I3ded8e824e96b6fcf21677dd9ba72cbf58c1d261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118495
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
My previous attempts of `make check` and running a --with-java build against
various Azul JDK 13--17 have always crashed with SIGBUS that smelled like our
uses of pthread_jit_write_protect_np in
bridges/source/cpp_uno/shared/vtablefactory.cxx colided with corresponding calls
in the in-process JVM, randomly(?) causing some attempts of running generated
code to SIGBUS. (See the email thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2020-December/086490.html>
"Using Java on macOS ARM64".)
But at least with the recent
<https://cdn.azul.com/zulu/bin/zulu17.0.63-ea-jdk17.0.0-ea.27-macosx_aarch64.zip>
on macOS 11.4, this appears to work reliably now: Multiple `make check
screenshot` as well as some manual use of LibreOffice did not run into any such
issues.
Change-Id: I2b1327e7e877ed71420c174c1d88e68a96b3532e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118114
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for
operator call arguments. (The "rather than copy, pass subView()" diagnostic is
already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly
for operator call arguments.)
(And many call sites don't even require an explicit [u16]string_view, esp. with
the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator
+= overloads". Just some test code in sal/qa/ that explicitly tests the
O[U]String functionality had to be excluded.)
Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
... and so possibly can rely on -Dfile.encoding=UTF8 now.
This reverts 79ac0685de0b19d856db70a208a8372cb589646c
and 3428bace79d64a10cfcabb79e4caa608ee5db233.
Change-Id: Ia9e09025691b200c0f79427e0f4efe500f9c81f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115272
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Fix these kinds:
/home/pi/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:103:10: error:
externally available entity 'is_complex_struct' is not previously declared in an included file
(if it is only used in this translation unit, make it static; otherwise, provide a declaration of it in an included file) [loplugin:external]
bool is_complex_struct(const typelib_TypeDescription * type)
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:129:10: error:
externally available entity 'is_float_only_struct' is not previously declared in an included file
(if it is only used in this translation unit, make it static; otherwise, provide a declaration of it in an included file) [loplugin:external]
bool is_float_only_struct(const typelib_TypeDescription * type)
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:168:6: error:
externally available entity 'MapReturn' is not previously declared in an included file
(if it is only used in this translation unit, make it static; otherwise, provide a declaration of it in an included file) [loplugin:external]
void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionReference * pReturnType, sal_uInt32* pRegisterReturn)
/home/pi/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:446:32: error:
static_cast from 'void **' to 'sal_Int32 *' (aka 'long *') is not allowed
sal_Int32 * pTempIndices = static_cast<sal_Int32 *>(pCppArgs + nParams);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
or some of these:
In file included from
/home/pi/lo/libreoffice/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c:26:
/usr/lib/jvm/java-11-openjdk-armhf/include/jni.h:1945:1: error: unknown
attribute 'externally_visible' ignored [-Werror,-Wunknown-attributes]
_JNI_IMPORT_OR_EXPORT_ jint JNICALL
^
/usr/lib/jvm/java-11-openjdk-armhf/include/jni.h:1943:32: note: expanded
from macro '_JNI_IMPORT_OR_EXPORT_'
define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
^
/usr/lib/jvm/java-11-openjdk-armhf/include/linux/jni_md.h:35:42: note:
expanded from macro 'JNIIMPORT'
define JNIIMPORT
__attribute__((externally_visible,visibility("default")))
Change-Id: I7cae1c52ee10306da666c9c234b9af7248efd04e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108567
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...for LIBO_INTERNAL_ONLY. These had been missed by
1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).
This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).
The improvement to loplugin:stringadd became necessary to fix
> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.
Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I47b44c80b2a5e3c9d84f5d7257efe17f138a1067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106563
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie643402fbf10ac837c975d29068b7973e9dd6210
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105685
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
32bc8ddbf335dd26019edcf12758643b4cff9913 "tdf#94716 allow Oracle's JDK to be
used on OS X 10.10 and 10.11" had restricted both addJavaInfosDirScan
(jvmfwk/plugins/sunmajor/pluginlib/util.cxx, relevant when LO scans for
available Java runtimes) and JvmfwkUtil_isLoadableJVM (which is more central and
also relevant when manually adding a Java installation on the Advanced options
page) to JDK installations under /Library/Java/JavaVirtualMachines.
Recent versions of OpenJDK for macOS are provided as *.tar.gz files (e.g.,
<https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL
/openjdk-15_osx-x64_bin.tar.gz> avaiable at <http://jdk.java.net/15/>) that can
potentially be installed anywhere, so it looks useful to remove the
/Library/Java/JavaVirtualMachines restriction from JvmfwkUtil_isLoadableJVM.
I'm not sure whether that would have any nagative impact, esp. for any scenario
that would still be relevant today. When I unpacked the above
openjdk-15_osx-x64_bin.tar.gz to ~/OpenJDK/ on my macOS 10.15.6, and manually
added /Users/stephan/OpenJDK/jdk-15.jdk/Contents/Home on the Advanced options
page, everything appeared to work fine.
Change-Id: I15545cc786a4a423f3bfe22ba477a45d6ef7fdf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103212
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...from which an OUString can cheaply be instantiated. This is the OUString
equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into
a consteval'ed, static-refcound rtl_String". Most remarks about that commit
apply here too (this commit is just substantially bigger and a bit more
complicated because there were so much more uses of OUStringLiteral than of
OStringLiteral):
The one downside is that OUStringLiteral now needs to be a template abstracting
over the string length. But any uses for which that is a problem (e.g., as the
element type of a container that would no longer be homogeneous, or in the
signature of a function that shall not be turned into a template for one reason
or another) can be replaced with std::u16string_view, without loss of efficiency
compared to the original OUStringLiteral, and without loss of expressivity.
The new OUStringLiteral ctor code would probably not be very efficient if it
were ever executed at runtime, but it is intended to be only executed at compile
time. Where available, C++20 "consteval" is used to statically ensure that.
The intended use of the new OUStringLiteral is in all cases where an
object that shall itself not be an OUString (e.g., because it shall be a
global static variable for which the OUString ctor/dtor would be detrimental at
library load/unload) must be converted to an OUString instance in at least one
place. Other string literal abstractions could use std::u16string_view (or just
plain char16_t const[N]), but interestingly OUStringLiteral might be more
efficient than constexpr std::u16string_view even for such cases, as it should
not need any relocations at library load time. For now, no existing uses of
OUStringLiteral have been changed to some other abstraction (unless technically
necessary as discussed above), and no additional places that would benefit from
OUStringLiteral have been changed to use it.
Global constexpr OUStringLiteral variables defined in an included file would be
somewhat suboptimal, as each translation unit that uses them would create its
own, unshared instance. The envisioned solution is to turn them into static
data members of some class (and there may be a loplugin coming to find and fix
affected places). Another approach that has been taken here in a few cases
where such variables were only used in one .cxx anyway is to move their
definitions from the .hxx into that one .cxx (in turn causing some files to
become empty and get removed completely)---which also silenced some GCC
-Werror=unused-variable if a variable from a .hxx was not used in some .cxx
including it.
To keep individual commits reasonably manageable, some consumers of
OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat
odd state for now, where they don't take advantage of OUStringLiteral's
equivalence to rtl_uString, but just keep extracting its contents and copy it
elsewhere. In follow-up commits, those consumers should be changed
appropriately, making them treat OUStringLiteral like an rtl_uString or
dropping the OUStringLiteral overload in favor of an existing (and cheap to use
now) OUString overload, etc.
In a similar vein, comparison operators between OUString and std::u16string_view
have been added to the existing plethora of comparison operator overloads. It
would be nice to eventually consolidate them, esp. with the overloads taking
OUStringLiteral and/or char16_t const[N] string literals, but that appears
tricky to get right without introducing new ambiguities. Also, a handful of
places across the code base use comparisons between OUString and OUStringNumber,
which are now ambiguous (converting the OUStringNumber to either OUString or
std::u16string_view). For simplicity, those few places have manually been fixed
for now by adding explicit conversion to std::u16string_view.
Also some compilerplugins code needed to be adapted, and some of the
compilerplugins/test cases have become irrelevant (and have been removed), as
the tested code would no longer compile in the first place.
sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template
argument deduction in unevaluated, parenthesized context". That place, as well
as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and
i18npool/source/localedata/localedata.cxx, which have been replaced with
OUString::Concat (and which is arguably a better choice, anyway), also caused
failures with at least Clang 5.0.2 (but would not have caused failures with at
least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile
been fixed).
Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).
For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.
In most places just a u"..." string literal prefix had to be added. In some
places
char const a[] = "...";
variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).
For all uses of macros expanding to string literals, the relevant uses have been
rewritten as
u"" MACRO
instead of changing the macro definitions. It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.
Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I4be46342b24a5993df74dbd047d88842a8df0412
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100901
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
"suspicious concatenation of string literals in an array initialization; did you
mean to separate the elements with a comma?"
Change-Id: I83828d8cc6f8ab9b0c1ca8a1c3fb528592c46504
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100897
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...where "do not use a JRE" (implying that the printed line consists of just a
terminating newline) is a sufficient condition for a successful execution, too.
(Also, it appears that extend_library_path in desktop/unx/source/start.c would
have introduced unwanted empty segments into the path environment variable when
the line printed by javaldx consisted of just a terminating newline.)
Change-Id: Ic2f86de8a829b3dea51c0e4da1ac236298e16366
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97756
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
The C standard (and thus by reference also the C++ standard) has very picky
constraints how invocations of the setjmp macro need to appear to not cause
undefined behavior.
Change-Id: I09418de340a044e4309261bae9816ca746700858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94474
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
After recent cleanups, android build fails with
sunjavaplugin.cxx:204:5: error: unused function 'createJvm'
[-Werror,-Wunused-function]
Change-Id: Idc9a97673debdd5da798fbdc729b8d90b6b7af9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94371
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
...now that 6ba74150866d71469827de9f4f19268dfa7db137
"jfw::isAccessibilitySupportDesired is obsolete" demonstrated that there is no
more need for JFW_FEATURE_ACCESSBRIDGE, the sole feature that had been provided.
* The javasettings_*.xml format still supports the <feature> tag, but it is
ignored when reading and always written as "0".
* There is no trace that "the bootstrap parameter
JFW_PLUGIN_NO_NOT_CHECK_ACCESSIBILITY" whose mention gets removed from
jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java had ever been supported.
(The only mention was 6873b3be47d71f94c38262003101576081acd241 "INTEGRATION:
CWS jre5issues (1.3.18); FILE MERGED: 2005/01/18 12:48:48 jl 1.3.18.1:
#i40879# in build environment the JRE is not tested for accessibility, because
of potential X server problems" introducing that comment.)
* The "Features" column is removed from the JRE table on the "LibreOffice -
Advance" options page.
Change-Id: I332d34b60548e7f2f852241ea8edfbee0ffcf510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94329
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...by moving the code that calls JNI_CreateJavaVM and the setjmp that it may
longjmp to (from abort_handler that may be called from within JNI_CreateJavaVM)
into its own small function. That way, no local variables in
jfw_plugin_startJavaVirtualMachine should produce any such false "variable might
be clobbered by ‘longjmp’ or ‘vfork’" GCC warnings any longer, and all the
workarounds to silence such warnings can be removed.
Change-Id: I6de134628e8efbf2d67fcd83a9cc2623b55762a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94330
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
(unclear why 43cc8abfb0a41878c4e78fd3b868b1d4f344c610 "#i20052# plugin lib for
java framework" hadn't done so from the start, when
2b24c46035657a8a43c6552328f7b4dda1622ce5 "#i20052# java framework" had already
introduced the macro)
Change-Id: I7f83e5ee68300438bcf7b49bdd12512ca0cbea42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94286
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|