[Libreoffice-commits] core.git: cui/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 22 06:55:19 UTC 2020
cui/source/options/optjava.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 3935a0bd3bcf747aa9bede59b045d23ab598f2d4
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Oct 21 10:23:30 2020 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Thu Oct 22 08:54:38 2020 +0200
Properly (un)tick Java checkbox in Java options in direct mode
While the Java settings cannot be changed when the direct mode
of the Java framework is used
(s. Change-ID Ife017f9b5c6c6488f84201dd78b23305c67bec1b,
"Gray out Java options when framework's direct mode is used"),
it still makes sense to (un)tick the (grayed out) checkbox which
indicates whether a JRE is used or not, which depends on whether
the JRE that is set (e.g. via env variable
'UNO_JAVA_JFW_JREHOME') is usable or not.
Change-Id: I13822bb7535e3f05cbc6ef83b3c82e2739c45ad6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104064
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 6a54ab6e0fdf..53c10ce1aa80 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -568,6 +568,10 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
{
// direct mode disregards Java settings made here, so gray them out
m_xJavaFrame->set_sensitive(false);
+ // check whether a usable JRE was set
+ std::unique_ptr<JavaInfo> pSelectedJava;
+ eErr = jfw_getSelectedJRE( &pSelectedJava );
+ bEnabled = (eErr == JFW_E_NONE);
}
else if ( eErr != JFW_E_NONE )
bEnabled = false;
More information about the Libreoffice-commits
mailing list