summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-29 23:03:37 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-02 13:18:04 +0100
commitb44ed4c408d92f7a1a3f2390c056d518c137ddd0 (patch)
tree75c81d068b1bf71f8f984af1e8a34e46d2ef0e98 /vcl/source
parentfabca7370e22f96ae041dc179475b35c87ac53ec (diff)
vcl: check if AT is running before loading the library
... which should result in faster startup if it's disabled. Change-Id: I39774b0a56f186d08270c2f17b2b20a823f21dc2
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svdata.cxx33
1 files changed, 23 insertions, 10 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 97116d47f9d2..aa58484fb872 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -297,6 +297,9 @@ com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const OUStr
return ret;
}
+#ifdef _WIN32
+bool HasAtHook();
+#endif
bool ImplInitAccessBridge(bool bAllowCancel, bool &rCancelled)
{
@@ -324,25 +327,35 @@ bool ImplInitAccessBridge(bool bAllowCancel, bool &rCancelled)
{
css::uno::Reference< XComponentContext > xContext(comphelper::getProcessComponentContext());
+#ifdef _WIN32
bool bTryIAcc2 = ( officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) &&
!getenv ("SAL_DISABLE_IACCESSIBLE2") );
if ( bTryIAcc2 ) // Windows only really
{
- try {
- pSVData->mxAccessBridge
- = css::accessibility::MSAAService::create(xContext);
- SAL_INFO("vcl", "got IAccessible2 bridge");
- return true;
- } catch (css::uno::DeploymentException & e) {
- SAL_INFO(
- "vcl",
- "got no IAccessible2 bridge, \"" << e.Message
- << "\", falling back to java");
+ if (!HasAtHook() && !getenv("SAL_FORCE_IACCESSIBLE2"))
+ {
+ SAL_INFO("vcl", "Apparently no running AT -> "
+ "not enabling IAccessible2 integration");
+ }
+ else
+ {
+ try {
+ pSVData->mxAccessBridge
+ = css::accessibility::MSAAService::create(xContext);
+ SAL_INFO("vcl", "got IAccessible2 bridge");
+ return true;
+ } catch (css::uno::DeploymentException & e) {
+ SAL_INFO(
+ "vcl",
+ "got no IAccessible2 bridge, \"" << e.Message
+ << "\", falling back to java");
+ }
}
}
else
SAL_INFO( "vcl", "IAccessible2 disabled, falling back to java" );
+#endif
css::uno::Reference< XExtendedToolkit > xToolkit =
css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);