cui/source/options/optjava.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 2091ead86c468d44089093110d643457a4eeefde
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Oct 21 10:23:30 2020 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Oct 22 13:42:03 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.wegh...@posteo.de>
    (cherry picked from commit 330b89c211fcf0f852fb55e51721b1d4f0bb853d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104607
    Tested-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index b6bca1746eaa..aef0675365fe 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -584,6 +584,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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to