[Libreoffice-commits] core.git: include/jvmfwk jvmfwk/plugins jvmfwk/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 14 11:46:10 UTC 2019


 include/jvmfwk/framework.hxx               |   15 -------
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   58 +----------------------------
 jvmfwk/plugins/sunmajor/pluginlib/util.hxx |    3 -
 jvmfwk/source/fwkutil.cxx                  |    8 ----
 4 files changed, 3 insertions(+), 81 deletions(-)

New commits:
commit c0ac7ae73480cd2b01f24e88c01bee507e8638f9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Dec 14 11:48:27 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Dec 14 12:45:15 2019 +0100

    Remove JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY, JFW_PLUGIN_FORCE_ACCESSIBILITY
    
    JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY is no longer set anywhere since
    6dcb3d4ef46312729bb6f16c473b433474863f68 "Related fdo#51252: No more prereg, no
    more unopkg sync" in 2012.  JFW_PLUGIN_FORCE_ACCESSIBILITY had been introduced
    with 72b954df59d64fa47f6380e4322243401afb683f "Avoid using gconftool. Atk
    provides a11y not Java on Unix" in 2013, as a means for users on Unix-like
    systems to still force a JVM with a11y support, even though that should no
    longer be necessary for LO a11y.
    
    Both environment variables were documented as "unofficial", with the warning
    that the "may be removed in the future."  Theoretically, they could still be set
    by some users, but the likelihood of their relevance today is considered low.
    
    Change-Id: Ib718fb275b67a6de7fd7bc88ae428fd60168f4f4
    Reviewed-on: https://gerrit.libreoffice.org/85140
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins

diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index abcc059b3966..42f9fbc37181 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -157,21 +157,6 @@
     <p>
     All settings made by this API are done for the current user if not
     mentioned differently.</p>
-
-    <h2>Other bootstrap variables</h2>
-    <dl>
-    <dt>JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY</dt>
-    <dd>This is an unofficial variable which was introduced to workaround external issues.
-    It may be removed in the future. By setting it to 1, the framework will not try to
-    find out if the system is configured to use accessibility tools or if a JRE has an
-    accessible bridge installed</dd>
-    <dt>JFW_PLUGIN_FORCE_ACCESSIBILITY</dt>
-    <dd>This is an unofficial variable which was introduced to workaround external issues.
-    It may be removed in the future. By setting it to 1, the framework will override a
-    platform's desire not to probe each java backend to determine if it has an accessibility
-    bridge installed. If the JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY is set this variable has
-    no effect, and is Unix specific.</dd>
-    </dl>
 */
 
 /** indicates that a JRE has an accessibility bridge installed.
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3afa7fcbbd07..d630a84dd904 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -26,9 +26,7 @@
 #include <osl/module.hxx>
 #include <osl/diagnose.h>
 #include <osl/getglobalmutex.hxx>
-#include <rtl/bootstrap.hxx>
 #include <rtl/ustrbuf.hxx>
-#include <rtl/instance.hxx>
 #include <sal/log.hxx>
 #include <salhelper/linkhelper.hxx>
 #include <salhelper/thread.hxx>
@@ -150,47 +148,6 @@ bool getAndAddJREInfoByPath(
     }
 }
 
-    OUString getLibraryLocation()
-    {
-        OUString libraryFileUrl;
-        OSL_VERIFY(osl::Module::getUrlFromAddress(reinterpret_cast<void *>(getLibraryLocation), libraryFileUrl));
-        return getDirFromFile(libraryFileUrl);
-    }
-
-    struct InitBootstrap
-    {
-        rtl::Bootstrap * operator()(const OUString& sIni)
-        {
-            static rtl::Bootstrap aInstance(sIni);
-            return & aInstance;
-
-        }
-   };
-
-   struct InitBootstrapData
-   {
-       OUString const & operator()()
-       {
-            static OUString sIni;
-            OUStringBuffer buf( 255);
-            buf.append( getLibraryLocation());
-#ifdef MACOSX
-            buf.append( "/../" LIBO_ETC_FOLDER );
-#endif
-            buf.append( SAL_CONFIGFILE("/sunjavaplugin") );
-            sIni = buf.makeStringAndClear();
-            JFW_TRACE2("Using configuration file " << sIni);
-            return sIni;
-        }
-   };
-}
-
-rtl::Bootstrap * getBootstrap()
-{
-    return rtl_Instance< rtl::Bootstrap, InitBootstrap,
-        ::osl::MutexGuard, ::osl::GetGlobalMutex,
-        OUString, InitBootstrapData >::create(
-            InitBootstrap(), ::osl::GetGlobalMutex(), InitBootstrapData());
 }
 
 namespace {
@@ -389,13 +346,6 @@ void AsynchReader::execute()
     }
 }
 
-static bool isEnvVarSetToOne(const OUString &aVar)
-{
-    OUString aValue;
-    getBootstrap()->getFrom(aVar, aValue);
-    return aValue == "1";
-}
-
 bool getJavaProps(const OUString & exePath,
 #ifdef JVM_ONE_PATH_CHECK
                   const OUString & homePath,
@@ -436,13 +386,9 @@ bool getJavaProps(const OUString & exePath,
 
 #ifdef UNX
     // Java is no longer required for a11y - we use atk directly.
-    bool bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
+    bool bNoAccessibility = true;
 #else
-    //check if we shall examine a Java for accessibility support
-    //If the bootstrap variable is "1" then we pass the argument
-    //"noaccessibility" to JREProperties.class. This will prevent
-    //that it calls   java.awt.Toolkit.getDefaultToolkit();
-    bool bNoAccessibility = isEnvVarSetToOne("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY");
+    bool bNoAccessibility = false;
 #endif
 
     //prepare the arguments
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
index 7f10e2748f7a..78df074f9de3 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
@@ -23,8 +23,6 @@
 #include <vector>
 #include <vendorbase.hxx>
 
-namespace rtl { class Bootstrap; }
-
 namespace jfw_plugin
 {
 
@@ -111,7 +109,6 @@ bool getJavaProps(
 
 void bubbleSortVersion(std::vector<rtl::Reference<VendorBase> >& vec);
 
-rtl::Bootstrap* getBootstrap();
 }
 
 #endif
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index a52013871340..fad1268feee1 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -28,7 +28,6 @@
 
 #include <osl/module.hxx>
 #include <rtl/ustring.hxx>
-#include <rtl/bootstrap.hxx>
 #include <osl/file.hxx>
 #include <sal/log.hxx>
 
@@ -44,11 +43,6 @@ namespace jfw
 
 bool isAccessibilitySupportDesired()
 {
-    OUString sValue;
-    if (::rtl::Bootstrap::get( "JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY", sValue) &&
-        sValue == "1" )
-        return false;
-
 #ifdef _WIN32
     bool retVal = false;
     HKEY    hKey = nullptr;
@@ -89,7 +83,7 @@ bool isAccessibilitySupportDesired()
     }
 #elif defined UNX
     // Java is no longer required for a11y - we use atk directly.
-    bool retVal = ::rtl::Bootstrap::get( "JFW_PLUGIN_FORCE_ACCESSIBILITY", sValue) && sValue == "1";
+    bool retVal = false;
 #endif
 
     return retVal;


More information about the Libreoffice-commits mailing list