summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2013-10-23 19:59:23 +0100
committerMichael Meeks <michael.meeks@collabora.com>2013-10-30 11:09:55 +0000
commit72b954df59d64fa47f6380e4322243401afb683f (patch)
tree38fb4c8f97499daeeb825941086a34b9387af665 /jvmfwk/plugins
parent1dac69edef6f2b7632dc3be002ba7d3075c70b96 (diff)
Avoid using gconftool. Atk provides a11y not Java on Unix.
cf. comment in framework header. Should have no impact on real run-time Java a11y, which would be enabled later as-needed; only on JRE selection. For extreme corner-cases, where your auto-selected JRE has no a11y support either select another JRE in the UI or: $ export JFW_PLUGIN_FORCE_ACCESSIBILITY=1 to override. Change-Id: I59a6428e5a11664b75c29580cad76eb9500db45a
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 75c34129a4c7..832616f42e6c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -364,6 +364,12 @@ 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
@@ -393,8 +399,7 @@ bool getJavaProps(const OUString & exePath,
//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();
- OUString sValue;
- getBootstrap()->getFrom("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY", sValue);
+ bool bNoAccessibility = isEnvVarSetToOne("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY");
//prepare the arguments
sal_Int32 cArgs = 3;
@@ -404,8 +409,13 @@ bool getJavaProps(const OUString & exePath,
OUString arg4 = "noaccessibility";
rtl_uString *args[4] = {arg1.pData, arg2.pData, arg3.pData};
+#ifdef UNX
+ // Java is no longer required for a11y - we use atk directly.
+ bNoAccessibility = !isEnvVarSetToOne("JFW_PLUGIN_FORCE_ACCESSIBILITY");
+#endif
+
// Only add the fourth param if the bootstrap parameter is set.
- if (sValue.equals(OUString::number( 1)))
+ if (bNoAccessibility)
{
args[3] = arg4.pData;
cArgs = 4;