summaryrefslogtreecommitdiff
path: root/vcl/source/app/svdata.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2013-11-18 15:41:26 +0000
committerMichael Meeks <michael.meeks@collabora.com>2013-11-19 10:02:27 +0000
commit448727e598ca0c35ee9cd6f2c25a847c8147943b (patch)
tree7379fabae33030487350fc58286e2aa95f5c9349 /vcl/source/app/svdata.cxx
parentfd035fe61604042609c21aba06eb2d8ffed32dda (diff)
uia: merge VCL pieces of IAccessible2 work.
Original code from: Author: Steve Yin <steve_y@apache.org> Date: Sat Nov 16 23:58:19 2013 +0100 Integrate branch of IAccessible2 With these improvements: Make IAccessible2 an experimental feature, with fallback to Java a11y. Move initial setup of windows into the bridge and clean, remove conditionals Check for presence of AT in the bridge as well to clean. Merge VCL events extensions and their handling. Clean and split WB_GETOBJECT handling out to it's own method. Add component prefix namespacing. Cleanup msaa service info, and implement XComponent to share mxAccessBridge. Add suitable debugging output, remove VCL dependency from UAccCOM causing registration issues. Change-Id: Ib19e38ddca71182018df438df27dcdb555d91402
Diffstat (limited to 'vcl/source/app/svdata.cxx')
-rw-r--r--vcl/source/app/svdata.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b42eeea45e45..cb24f027108f 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -52,6 +52,8 @@
#include "com/sun/star/java/MissingJavaRuntimeException.hpp"
#include "com/sun/star/java/JavaDisabledException.hpp"
+#include "officecfg/Office/Common.hxx"
+
#include <stdio.h>
using namespace com::sun::star::uno;
@@ -321,6 +323,20 @@ bool ImplInitAccessBridge(bool bAllowCancel, bool &rCancelled)
{
css::uno::Reference< XComponentContext > xContext(comphelper::getProcessComponentContext());
+ bool bTryIAcc2 = ( officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) &&
+ !getenv ("SAL_DISABLE_IACCESSIBLE2") );
+
+ if ( bTryIAcc2 ) // Windows only really
+ {
+ // FIXME: convert to service ... pSVData->mxAccessBridge = css::accessibility::MSAAService::create( xContext );
+ pSVData->mxAccessBridge = Reference< XComponent >( xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.accessibility.MSAAService", xContext ), UNO_QUERY );
+
+ SAL_INFO( "vcl", "IAccessible2 bridge is: " << (int)(pSVData->mxAccessBridge.is()) );
+ return pSVData->mxAccessBridge.is();
+ }
+ else
+ SAL_INFO( "vcl", "IAccessible2 disabled, falling back to java" );
+
css::uno::Reference< XExtendedToolkit > xToolkit =
css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);