summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-15 20:09:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-15 23:29:36 +0200
commit3bc8b14bea3c11159bdbd6fc4f9658fce3ba252e (patch)
tree848417f74e6d7036101b039fd8d13ccdaf291666 /jvmfwk/plugins
parentdd372b444f1f1821048e197768d5095e6204a102 (diff)
Drop the JVM "feature" concept support
...now that 6ba74150866d71469827de9f4f19268dfa7db137 "jfw::isAccessibilitySupportDesired is obsolete" demonstrated that there is no more need for JFW_FEATURE_ACCESSBRIDGE, the sole feature that had been provided. * The javasettings_*.xml format still supports the <feature> tag, but it is ignored when reading and always written as "0". * There is no trace that "the bootstrap parameter JFW_PLUGIN_NO_NOT_CHECK_ACCESSIBILITY" whose mention gets removed from jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java had ever been supported. (The only mention was 6873b3be47d71f94c38262003101576081acd241 "INTEGRATION: CWS jre5issues (1.3.18); FILE MERGED: 2005/01/18 12:48:48 jl 1.3.18.1: #i40879# in build environment the JRE is not tested for accessibility, because of potential X server problems" introducing that comment.) * The "Features" column is removed from the JRE table on the "LibreOffice - Advance" options page. Change-Id: I332d34b60548e7f2f852241ea8edfbee0ffcf510 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94329 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java24
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx18
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx1
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx18
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx25
5 files changed, 11 insertions, 75 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
index dfb27e941b8b..0d3503af385f 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
+++ b/jvmfwk/plugins/sunmajor/pluginlib/JREProperties.java
@@ -35,30 +35,6 @@ public class JREProperties
{
try
{
- boolean bNoAccess = false;
- if(args.length > 0 && args[0].equals("noaccessibility")) {
- bNoAccess = true;
- }
-
- //We need to be able to switch this part off because
- //it causes an exception if the DISPLAY variable has
- //a false value. Setting the noaccessibility argument
- //can be done by providing a sunjavaplugin.ini with
- //the bootstrap parameter JFW_PLUGIN_NO_NOT_CHECK_ACCESSIBILITY
- //set to "1"
- if (!bNoAccess)
- {
- try{
- //This line is needed to get the accessibility properties
- java.awt.Toolkit.getDefaultToolkit();
- }
- catch(Throwable e)
- {
- System.err.println(e);
- }
- }
-
-
Properties p = System.getProperties();
Enumeration e = p.propertyNames();
while (e.hasMoreElements()) {
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index d9c0e7d5d25f..19cc9bf5d674 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -92,8 +92,8 @@ char const* const* GnuInfo::getLibraryPaths(int* /*size*/)
bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
{
- //get java.vendor, java.version, java.home,
- //javax.accessibility.assistive_technologies from system properties
+ //get java.vendor, java.version, java.home
+ //from system properties
OUString sJavaLibraryPath;
OUString const sVendorProperty("java.vendor");
@@ -101,14 +101,12 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
OUString const sJavaHomeProperty("java.home");
OUString const sJavaLibraryPathProperty("java.library.path");
OUString const sGNUHomeProperty("gnu.classpath.home.url");
- OUString const sAccessProperty("javax.accessibility.assistive_technologies");
bool bVersion = false;
bool bVendor = false;
bool bHome = false;
bool bJavaHome = false;
bool bJavaLibraryPath = false;
- bool bAccess = false;
for (auto const& prop : props)
{
@@ -149,17 +147,9 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
osl_getFileURLFromSystemPath(prop.second.getToken(0, ':', nIndex).pData, &sJavaLibraryPath.pData);
bJavaLibraryPath = true;
}
- else if (!bAccess && sAccessProperty == prop.first)
- {
- if (!prop.second.isEmpty())
- {
- m_bAccessibility = true;
- bAccess = true;
- }
+ if (bVendor && bVersion && bHome && bJavaHome && bJavaLibraryPath) {
+ break;
}
- // the javax.accessibility.xxx property may not be set. Therefore we
- //must search through all properties.
-
}
if (!bVersion || !bVendor || !bHome)
return false;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 46f5cfba1281..1d3667988cf9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -168,7 +168,6 @@ std::unique_ptr<JavaInfo> createJavaInfo(
return std::unique_ptr<JavaInfo>(
new JavaInfo{
info->getVendor(), info->getHome(), info->getVersion(),
- sal_uInt64(info->supportsAccessibility() ? JFW_FEATURE_ACCESSBRIDGE : 0),
sal_uInt64(info->needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0),
rtl::ByteSequence(
reinterpret_cast<sal_Int8*>(sVendorData.pData->buffer),
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index db855d9ce4f4..3b7a2beb2314 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -383,26 +383,12 @@ bool getJavaProps(const OUString & exePath,
sClassPath += "/../Resources/java";
#endif
-#ifdef UNX
- // Java is no longer required for a11y - we use atk directly.
- bool bNoAccessibility = true;
-#else
- bool bNoAccessibility = false;
-#endif
-
//prepare the arguments
- sal_Int32 cArgs = 3;
+ sal_Int32 const cArgs = 3;
OUString arg1 = "-classpath";// + sClassPath;
OUString arg2 = sClassPath;
OUString arg3("JREProperties");
- OUString arg4 = "noaccessibility";
- rtl_uString *args[4] = {arg1.pData, arg2.pData, arg3.pData};
- // Only add the fourth param if the bootstrap parameter is set.
- if (bNoAccessibility)
- {
- args[3] = arg4.pData;
- cArgs = 4;
- }
+ rtl_uString *args[cArgs] = {arg1.pData, arg2.pData, arg3.pData};
oslProcess javaProcess= nullptr;
oslFileHandle fileOut= nullptr;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index c4e70d1df27b..4bfc1fd90af0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -32,19 +32,18 @@ namespace jfw_plugin
MalformedVersionException::~MalformedVersionException() = default;
-VendorBase::VendorBase(): m_bAccessibility(false)
+VendorBase::VendorBase()
{
}
bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
{
- //get java.vendor, java.version, java.home,
- //javax.accessibility.assistive_technologies from system properties
+ //get java.vendor, java.version, java.home
+ //from system properties
bool bVersion = false;
bool bVendor = false;
bool bHome = false;
- bool bAccess = false;
bool bArch = false;
for (auto const& prop : props)
@@ -85,18 +84,9 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
m_sArch = prop.second;
bArch = true;
}
- else if (!bAccess
- && prop.first == "javax.accessibility.assistive_technologies")
- {
- if (!prop.second.isEmpty())
- {
- m_bAccessibility = true;
- bAccess = true;
- }
+ if (bVendor && bVersion && bHome && bArch) {
+ break;
}
- // the javax.accessibility.xxx property may not be set. Therefore we
- //must search through all properties.
-
}
if (!bVersion || !bVendor || !bHome || !bArch)
return false;
@@ -196,11 +186,6 @@ bool VendorBase::isValidArch() const
#endif
}
-bool VendorBase::supportsAccessibility() const
-{
- return m_bAccessibility;
-}
-
bool VendorBase::needsRestart() const
{
return !getLibraryPath().isEmpty();