[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - cui/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 23 15:09:39 UTC 2020


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

New commits:
commit 6180c80560605826757b35d37c1e651468f817b0
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: Fri Oct 23 17:09:07 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.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104064
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 3935a0bd3bcf747aa9bede59b045d23ab598f2d4)
    
     Conflicts:
            cui/source/options/optjava.cxx
    
    Change-Id: I13822bb7535e3f05cbc6ef83b3c82e2739c45ad6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104666
    Tested-by: Michael Weghorn <m.weghorn at posteo.de>
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f6eb32bb01af..210903fb3c85 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -675,6 +675,10 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
     {
         // direct mode disregards Java settings made here, so gray them out
         get<vcl::Window>("javaframe")->Disable();
+        // 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