office-gobmx/winaccessibility
Michael Stahl 3b86569fcb winaccessibility: replace CoCreateInstance with direct instantiation
This is an alternative (to 732ec36edf)
solution to the "CoCreateInstance does not work" problem:
replace all CoCreateInstance calls with equivalent calls to create
the components directly.

Since the only reason why this COM stuff needs to be registered
at all is that AccObject uses CoCreateInstance() to create its
COM objects, another possible solution appears to be to simply link
the libraries and instantiate the COM objects directly, without COM.

The only difference appears to be that CoCreateInstance would
automatically add proxy objects in case the COM objects reside in a
single-threaded appartment; not sure if that is relevant here.

Change-Id: I8ffb8af501f6084f3145fa4d4f53366a070e1691
Reviewed-on: https://gerrit.libreoffice.org/6792
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2013-11-25 03:21:30 -06:00
..
inc winaccessibility: replace CoCreateInstance with direct instantiation 2013-11-25 03:21:30 -06:00
source winaccessibility: replace CoCreateInstance with direct instantiation 2013-11-25 03:21:30 -06:00
CustomTarget_ia2_idl.mk winaccessibility: remove executable bits 2013-11-19 12:58:26 +01:00
Library_uacccom.mk winaccessibility: replace CoCreateInstance with direct instantiation 2013-11-25 03:21:30 -06:00
Library_winaccessibility.mk winaccessibility: replace CoCreateInstance with direct instantiation 2013-11-25 03:21:30 -06:00
Makefile Add custom target to process IA2 COM idl files 2013-11-19 10:02:23 +00:00
Module_winaccessibility.mk winaccessibility: remove executable bits 2013-11-19 12:58:26 +01:00
README uia: add some possibly helpful overview documentation. 2013-11-19 10:02:28 +00:00
WinResTarget_uacccom.mk winaccessibility: remove executable bits 2013-11-19 12:58:26 +01:00

Windows Accessibility Bridge.

This code provides a bridge between our internal Accessibility
interfaces (implemented on all visible 'things' in the suite: eg.
windows, buttons, entry boxes etc.) - and the Windows MSAA /
IAccessible2 COM interfaces that are familiar to windows users and
Accessible Technologies (ATs) such as the NVDA screen reader.

The code breaks into three bits:

source/service/
	+ the UNO service providing the accessibility bridge.
	  It essentially listens to events from the LibreOffice
	  core and creates and synchronises COM peers for our
	  internal accessibilty objects when events arrive.

source/UAccCom/
	+ implementations of the MSAA / IAccessible2 interfaces
	  to provide native peers for the accessbility code.

source/UAccCOMIDL/
	+ COM Interface Definition Language (IDL) for UAccCom.

Here is one way of visualising the code / control flow

VCL <-> UNO toolkit <-> UNO a11y <-> win a11y <-> COM / IAccessible2
vcl/ <-> toolkit/ <-> accessibility/ <-> winaccessibility/ <-> UAccCom/


Debugging / playing with winaccessibility

First you need to ensure that UAccCOM.dll is registered, if this did
not happen at install time use:

regsvr32 /absolute/path/to/program/UAccCOM.dll

Next you need to enable 'experiemental mode' in Tools->Options. After
that NVDA should work as expected. In order to use 'accprobe' to debug
it is necessary to override the check for whether an AT (like NVDA) is
running; to do that use:

SAL_FORCE_IACCESSIBLE2=1 soffice.exe -writer

Then you can use accprobe to introspect the accessibility hierarchy
remotely, checkout:

http://accessibility.linuxfoundation.org/a11yweb/util/accprobe/