diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-10-21 10:23:30 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-10-22 08:54:38 +0200 |
commit | 3935a0bd3bcf747aa9bede59b045d23ab598f2d4 (patch) | |
tree | a6bf683f5f02dd4a6096833e1b6677bbd5129aa5 /cui/source/options | |
parent | 211ba118b3f99e2c785309403b81319bae7b1213 (diff) |
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@posteo.de>
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optjava.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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; |