[Libreoffice-commits] core.git: 16 commits - accessibility/Module_accessibility.mk config_host.mk.in configure.ac include/sal include/vcl offapi/com offapi/UnoApi_offapi.mk postprocess/Rdb_services.mk Repository.mk vcl/source vcl/win winaccessibility/CustomTarget_ia2_idl.mk winaccessibility/inc winaccessibility/Library_uacccom.mk winaccessibility/Library_winaccessibility.mk winaccessibility/Makefile winaccessibility/Module_winaccessibility.mk winaccessibility/README winaccessibility/source winaccessibility/WinResTarget_uacccom.mk
Michael Meeks
michael.meeks at collabora.com
Tue Nov 19 02:03:05 PST 2013
Repository.mk | 4
accessibility/Module_accessibility.mk | 2
config_host.mk.in | 1
configure.ac | 20
include/sal/log-areas.dox | 4
include/vcl/svapp.hxx | 2
include/vcl/vclevent.hxx | 33
offapi/UnoApi_offapi.mk | 6
offapi/com/sun/star/accessibility/AccessibleEventId.idl | 10
offapi/com/sun/star/accessibility/AccessibleRelationType.idl | 8
offapi/com/sun/star/accessibility/AccessibleStateType.idl | 21
offapi/com/sun/star/accessibility/MSAAService.idl | 39
offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl | 42
offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl | 45
offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl | 47
offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl | 60
offapi/com/sun/star/accessibility/XMSAAService.idl | 49
postprocess/Rdb_services.mk | 7
vcl/source/app/svdata.cxx | 16
vcl/source/window/window.cxx | 34
vcl/win/source/window/salframe.cxx | 58
winaccessibility/CustomTarget_ia2_idl.mk | 40
winaccessibility/Library_uacccom.mk | 85
winaccessibility/Library_winaccessibility.mk | 81
winaccessibility/Makefile | 14
winaccessibility/Module_winaccessibility.mk | 25
winaccessibility/README | 47
winaccessibility/WinResTarget_uacccom.mk | 31
winaccessibility/inc/AccComponentEventListener.hxx | 78
winaccessibility/inc/AccContainerEventListener.hxx | 98
winaccessibility/inc/AccDescendantManagerEventListener.hxx | 64
winaccessibility/inc/AccDialogEventListener.hxx | 63
winaccessibility/inc/AccEventListener.hxx | 90
winaccessibility/inc/AccFrameEventListener.hxx | 63
winaccessibility/inc/AccListEventListener.hxx | 54
winaccessibility/inc/AccMenuEventListener.hxx | 57
winaccessibility/inc/AccObject.hxx | 130
winaccessibility/inc/AccObjectContainerEventListener.hxx | 50
winaccessibility/inc/AccObjectManagerAgent.hxx | 102
winaccessibility/inc/AccObjectWinManager.hxx | 177
winaccessibility/inc/AccParagraphEventListener.hxx | 62
winaccessibility/inc/AccResource.hxx | 69
winaccessibility/inc/AccTableEventListener.hxx | 53
winaccessibility/inc/AccTextComponentEventListener.hxx | 48
winaccessibility/inc/AccTopWindowListener.hxx | 66
winaccessibility/inc/AccTreeEventListener.hxx | 50
winaccessibility/inc/AccWindowEventListener.hxx | 60
winaccessibility/inc/ResIDGenerator.hxx | 56
winaccessibility/inc/UAccCOM2.h | 30
winaccessibility/inc/accHelper.hxx | 145
winaccessibility/inc/act.hxx | 89
winaccessibility/inc/g_msacc.hxx | 31
winaccessibility/inc/unomsaaevent.hxx | 110
winaccessibility/source/UAccCOM/AccAction.cxx | 120
winaccessibility/source/UAccCOM/AccAction.h | 105
winaccessibility/source/UAccCOM/AccAction.rgs | 26
winaccessibility/source/UAccCOM/AccActionBase.cxx | 415
winaccessibility/source/UAccCOM/AccActionBase.h | 90
winaccessibility/source/UAccCOM/AccComponent.cxx | 72
winaccessibility/source/UAccCOM/AccComponent.h | 97
winaccessibility/source/UAccCOM/AccComponent.rgs | 23
winaccessibility/source/UAccCOM/AccComponentBase.cxx | 213
winaccessibility/source/UAccCOM/AccComponentBase.h | 76
winaccessibility/source/UAccCOM/AccContext.rgs | 23
winaccessibility/source/UAccCOM/AccEditableText.cxx | 508
winaccessibility/source/UAccCOM/AccEditableText.h | 115
winaccessibility/source/UAccCOM/AccEditableText.rgs | 23
winaccessibility/source/UAccCOM/AccExtendedComponent.rgs | 23
winaccessibility/source/UAccCOM/AccFont.rgs | 23
winaccessibility/source/UAccCOM/AccHyperLink.cxx | 296
winaccessibility/source/UAccCOM/AccHyperLink.h | 140
winaccessibility/source/UAccCOM/AccHyperLink.rgs | 23
winaccessibility/source/UAccCOM/AccHypertext.cxx | 409
winaccessibility/source/UAccCOM/AccHypertext.h | 161
winaccessibility/source/UAccCOM/AccHypertext.rgs | 23
winaccessibility/source/UAccCOM/AccImage.cxx | 102
winaccessibility/source/UAccCOM/AccImage.h | 101
winaccessibility/source/UAccCOM/AccImage.rgs | 23
winaccessibility/source/UAccCOM/AccKeyBinding.rgs | 23
winaccessibility/source/UAccCOM/AccRelation.cxx | 214
winaccessibility/source/UAccCOM/AccRelation.h | 88
winaccessibility/source/UAccCOM/AccRelation.rgs | 25
winaccessibility/source/UAccCOM/AccSelection.rgs | 23
winaccessibility/source/UAccCOM/AccTable.cxx | 1069 +
winaccessibility/source/UAccCOM/AccTable.h | 175
winaccessibility/source/UAccCOM/AccTable.rgs | 23
winaccessibility/source/UAccCOM/AccText.cxx | 281
winaccessibility/source/UAccCOM/AccText.h | 140
winaccessibility/source/UAccCOM/AccText.rgs | 23
winaccessibility/source/UAccCOM/AccTextBase.cxx | 994 +
winaccessibility/source/UAccCOM/AccTextBase.h | 120
winaccessibility/source/UAccCOM/AccValue.cxx | 224
winaccessibility/source/UAccCOM/AccValue.h | 104
winaccessibility/source/UAccCOM/AccValue.rgs | 23
winaccessibility/source/UAccCOM/AccessibleKeyStroke.h | 157
winaccessibility/source/UAccCOM/CheckEnableAccessible.h | 30
winaccessibility/source/UAccCOM/EnumVariant.cxx | 227
winaccessibility/source/UAccCOM/EnumVariant.h | 104
winaccessibility/source/UAccCOM/EnumVariant.rgs | 26
winaccessibility/source/UAccCOM/MAccessible.cxx | 3266 +++++
winaccessibility/source/UAccCOM/MAccessible.h | 294
winaccessibility/source/UAccCOM/MAccessible.rgs | 26
winaccessibility/source/UAccCOM/Resource.h | 69
winaccessibility/source/UAccCOM/StdAfx.cxx | 26
winaccessibility/source/UAccCOM/UAccCOM.cxx | 109
winaccessibility/source/UAccCOM/UAccCOM.def | 7
winaccessibility/source/UAccCOM/UAccCOM.rc | 146
winaccessibility/source/UAccCOM/UNOXWrapper.cxx | 27
winaccessibility/source/UAccCOM/UNOXWrapper.h | 70
winaccessibility/source/UAccCOM/UNOXWrapper.rgs | 26
winaccessibility/source/UAccCOM/acccommon.h | 95
winaccessibility/source/UAccCOM/stdafx.h | 61
winaccessibility/source/UAccCOMIDL/AccessibleKeyBinding.idl | 63
winaccessibility/source/UAccCOMIDL/AccessibleKeyStroke.idl | 146
winaccessibility/source/UAccCOMIDL/Charset.idl | 30
winaccessibility/source/UAccCOMIDL/UAccCOM.idl | 206
winaccessibility/source/UAccCOMIDL/defines.idl | 37
winaccessibility/source/UAccCOMIDL/ia2_api_all.idl | 5473 ++++++++++
winaccessibility/source/service/AccComponentEventListener.cxx | 336
winaccessibility/source/service/AccContainerEventListener.cxx | 573 +
winaccessibility/source/service/AccDescendantManagerEventListener.cxx | 225
winaccessibility/source/service/AccDialogEventListener.cxx | 150
winaccessibility/source/service/AccEventListener.cxx | 309
winaccessibility/source/service/AccFrameEventListener.cxx | 162
winaccessibility/source/service/AccListEventListener.cxx | 123
winaccessibility/source/service/AccMenuEventListener.cxx | 151
winaccessibility/source/service/AccObject.cxx | 1110 ++
winaccessibility/source/service/AccObjectContainerEventListener.cxx | 72
winaccessibility/source/service/AccObjectManagerAgent.cxx | 386
winaccessibility/source/service/AccObjectWinManager.cxx | 1320 ++
winaccessibility/source/service/AccParagraphEventListener.cxx | 144
winaccessibility/source/service/AccResource.cxx | 84
winaccessibility/source/service/AccTableEventListener.cxx | 146
winaccessibility/source/service/AccTextComponentEventListener.cxx | 65
winaccessibility/source/service/AccTopWindowListener.cxx | 300
winaccessibility/source/service/AccTreeEventListener.cxx | 87
winaccessibility/source/service/AccWindowEventListener.cxx | 152
winaccessibility/source/service/ResIDGenerator.cxx | 54
winaccessibility/source/service/checkmt.cxx | 36
winaccessibility/source/service/checkmt.hxx | 28
winaccessibility/source/service/exports.dxp | 2
winaccessibility/source/service/msaaservice_impl.cxx | 351
winaccessibility/source/service/winaccessibility.component | 24
143 files changed, 26597 insertions(+), 19 deletions(-)
New commits:
commit ca99a47bf383faf265dd65d3e70a6f43096de76d
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon Nov 18 23:37:47 2013 +0000
uia: add some possibly helpful overview documentation.
Change-Id: I4163b587d82a0fd6403fdd124808ab895b4ed460
diff --git a/winaccessibility/README b/winaccessibility/README
new file mode 100644
index 0000000..45ec550
--- /dev/null
+++ b/winaccessibility/README
@@ -0,0 +1,47 @@
+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/
commit 448727e598ca0c35ee9cd6f2c25a847c8147943b
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon Nov 18 15:41:26 2013 +0000
uia: merge VCL pieces of IAccessible2 work.
Original code from:
Author: Steve Yin <steve_y at 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
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ca635c4..a6ffef9 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -346,6 +346,10 @@ certain functionality.
@li @c vcl.virdev
@li @c vcl.window
+ at section winaccessiblity
+
+ at li @c iacc2 - IAccessible2 bridge debug
+
@section Writer
@li @c sw
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index 1ce025f..92ffca9 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -151,6 +151,7 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_ITEM_EXPANDED 1174
#define VCLEVENT_ITEM_COLLAPSED 1175
#define VCLEVENT_DROPDOWN_PRE_OPEN 1176
+#define VCLEVENT_LISTBOX_FOCUSITEMCHANGED 1180
// VclMenuEvent
#define VCLEVENT_MENU_ACTIVATE 1200
@@ -169,23 +170,35 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_MENU_ITEMCHECKED 1213
#define VCLEVENT_MENU_ITEMUNCHECKED 1214
#define VCLEVENT_MENU_ACCESSIBLENAMECHANGED 1215
+#define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED 1216
+#define VCLEVENT_TOOLBOX_ITEMUPDATED 1217
#define VCLEVENT_MENU_SHOW 1250
#define VCLEVENT_MENU_HIDE 1251
#define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED 1216
+#define VCLEVENT_LISTBOX_TREEEXPAND 1218
+#define VCLEVENT_LISTBOX_TREECOLLAPSE 1219
+#define VCLEVENT_LISTBOX_TREEFOCUS 1220
+#define VCLEVENT_LISTBOX_TREESELECT 1221
+#define VCLEVENT_EDIT_CARETCHANGED 1222
+#define VCLEVENT_COMBOBOX_UPDATEVALUE 1223
+
+#define VCLEVENT_LISTBOX_FOCUS 1224
+#define VCLEVENT_LISTBOX_CLEAR 1225
// DockingWindow
-#define VCLEVENT_WINDOW_STARTDOCKING 1217 // pData = DockingData
-#define VCLEVENT_WINDOW_DOCKING 1218
-#define VCLEVENT_WINDOW_ENDDOCKING 1219 // pData = EndDockingData
-#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1220 // pData = sal_Bool
-#define VCLEVENT_WINDOW_TOGGLEFLOATING 1221
-#define VCLEVENT_WINDOW_ENDPOPUPMODE 1222 // pData = EndPopupModeData
-
-#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED 1223 // pData = itempos
-#define VCLEVENT_TABLECELL_NAMECHANGED 1224 // pData = struct(Entry, Column, oldText)
-#define VCLEVENT_TABLEROW_SELECT 1225
+#define VCLEVENT_WINDOW_STARTDOCKING 1227 // pData = DockingData
+#define VCLEVENT_WINDOW_DOCKING 1228
+#define VCLEVENT_WINDOW_ENDDOCKING 1229 // pData = EndDockingData
+#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1230 // pData = sal_Bool
+#define VCLEVENT_WINDOW_TOGGLEFLOATING 1231
+#define VCLEVENT_WINDOW_ENDPOPUPMODE 1232 // pData = EndPopupModeData
+
+#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED 1233 // pData = itempos
+#define VCLEVENT_TABLECELL_NAMECHANGED 1234 // pData = struct(Entry, Column, oldText)
+#define VCLEVENT_TABLEROW_SELECT 1235
+#define VCLEVENT_LISTBOX_STATEUPDATE 1236
class VCL_DLLPUBLIC VclSimpleEvent
{
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b42eeea..cb24f02 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);
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 64664b1..1ef62c1 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -8818,10 +8818,10 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WINDOW_CANCELBUTTON:
case WINDOW_HELPBUTTON:
case WINDOW_IMAGEBUTTON:
- case WINDOW_MENUBUTTON:
case WINDOW_MOREBUTTON:
case WINDOW_SPINBUTTON:
case WINDOW_BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
+ case WINDOW_MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
case WINDOW_PATHDIALOG: nRole = accessibility::AccessibleRole::DIRECTORY_PANE; break;
case WINDOW_FILEDIALOG: nRole = accessibility::AccessibleRole::FILE_CHOOSER; break;
@@ -8835,10 +8835,6 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WINDOW_MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
case WINDOW_PATTERNFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_LONGCURRENCYFIELD:
case WINDOW_CALCINPUTLINE:
case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
@@ -8855,7 +8851,13 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WINDOW_TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
- case WINDOW_FIXEDLINE: nRole = accessibility::AccessibleRole::SEPARATOR; break;
+ case WINDOW_FIXEDLINE:
+ if( !GetText().isEmpty() )
+ nRole = accessibility::AccessibleRole::LABEL;
+ else
+ nRole = accessibility::AccessibleRole::SEPARATOR;
+ break;
+
case WINDOW_FIXEDBITMAP:
case WINDOW_FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
case WINDOW_GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
@@ -8870,6 +8872,10 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WINDOW_DATEFIELD:
case WINDOW_TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
+ case WINDOW_NUMERICFIELD:
+ case WINDOW_METRICFIELD:
+ case WINDOW_CURRENCYFIELD:
+ case WINDOW_LONGCURRENCYFIELD:
case WINDOW_SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
case WINDOW_TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
@@ -8933,8 +8939,12 @@ void Window::SetAccessibleName( const OUString& rName )
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ OUString oldName = GetAccessibleName();
+
delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
mpWindowImpl->mpAccessibleInfos->pAccessibleName = new OUString( rName );
+
+ ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldName );
}
OUString Window::GetAccessibleName() const
@@ -8975,6 +8985,8 @@ OUString Window::getDefaultAccessibleName() const
Window *pLabel = GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != this )
aAccessibleName = pLabel->GetText();
+ if (aAccessibleName.isEmpty())
+ aAccessibleName = GetQuickHelpText();
}
break;
@@ -8989,6 +9001,16 @@ OUString Window::getDefaultAccessibleName() const
}
break;
+ case WINDOW_TOOLBOX:
+ aAccessibleName = GetText();
+ if( aAccessibleName.isEmpty() )
+ aAccessibleName = "Tool Bar";
+ break;
+
+ case WINDOW_MOREBUTTON:
+ aAccessibleName = mpWindowImpl->maText;
+ break;
+
default:
aAccessibleName = GetText();
break;
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 87e5c1a..8ee2cae 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -77,6 +77,12 @@ using ::std::max;
#include <com/sun/star/uno/Exception.hpp>
+#include <oleacc.h>
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#ifndef WM_GETOBJECT // TESTME does this ever happen ?
+# define WM_GETOBJECT 0x003D
+#endif
+
#include <time.h>
#if defined ( __MINGW32__ )
@@ -5178,7 +5184,7 @@ static sal_Bool ImplHandleIMEStartComposition( HWND hWnd )
// -----------------------------------------------------------------------
static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
- HIMC hIMC, LPARAM lParam )
+ HIMC hIMC, LPARAM lParam )
{
sal_Bool bDef = TRUE;
@@ -5478,6 +5484,46 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam )
// -----------------------------------------------------------------------
+static bool ImplHandleGetObject( HWND hWnd, LPARAM lParam, WPARAM wParam, long &nRet )
+{
+ // IA2 should be enabled automatically
+ AllSettings aSettings = Application::GetSettings();
+ MiscSettings aMisc = aSettings.GetMiscSettings();
+ aMisc.SetEnableATToolSupport( sal_True );
+ aSettings.SetMiscSettings( aMisc );
+ Application::SetSettings( aSettings );
+
+ if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ return false; // locked down somehow ?
+
+ ImplSVData* pSVData = ImplGetSVData();
+
+ // Make sure to launch Accessibiliity only the following criterias are satisfied
+ // to avoid RFT interrupts regular accessibility processing
+ if ( !pSVData->mxAccessBridge.is() )
+ {
+ bool bCancelled = false;
+ InitAccessBridge( false, bCancelled );
+ if( bCancelled )
+ return false;
+ }
+
+ uno::Reference< accessibility::XMSAAService > xMSAA( pSVData->mxAccessBridge, uno::UNO_QUERY );
+ if ( xMSAA.is() )
+ {
+ // mhOnSetTitleWnd not set to reasonable value anywhere...
+ if ( lParam == OBJID_CLIENT )
+ {
+ nRet = xMSAA->getAccObjectPtr( (long)hWnd, lParam, wParam );
+ if( nRet != 0 )
+ return true;
+ }
+ }
+ return false;
+}
+
+// -----------------------------------------------------------------------
+
static LRESULT ImplHandleIMEReconvertString( HWND hWnd, LPARAM lParam )
{
WinSalFrame* pFrame = GetWindowPtr( hWnd );
@@ -6005,6 +6051,16 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
case WM_IME_NOTIFY:
ImplHandleIMENotify( hWnd, wParam );
break;
+
+ case WM_GETOBJECT:
+ long nRet;
+ if ( ImplHandleGetObject( hWnd, lParam, wParam, nRet ) )
+ {
+ rDef = false;
+ return (HRESULT) nRet;
+ }
+ break;
+
case WM_APPCOMMAND:
if( ImplHandleAppCommand( hWnd, lParam ) )
{
diff --git a/winaccessibility/Library_uacccom.mk b/winaccessibility/Library_uacccom.mk
index b3b91ce..f481b40 100755
--- a/winaccessibility/Library_uacccom.mk
+++ b/winaccessibility/Library_uacccom.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_Library_add_exception_objects,UAccCOM,\
winaccessibility/source/UAccCOM/AccText \
winaccessibility/source/UAccCOM/AccTextBase \
winaccessibility/source/UAccCOM/AccValue \
- winaccessibility/source/UAccCOM/CheckEnableAccessible \
winaccessibility/source/UAccCOM/EnumVariant \
winaccessibility/source/UAccCOM/MAccessible \
winaccessibility/source/UAccCOM/StdAfx \
@@ -58,7 +57,6 @@ $(eval $(call gb_Library_add_ldflags,UAccCOM,\
$(eval $(call gb_Library_use_libraries,UAccCOM,\
cppu \
- vcl \
sal \
))
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx
index 1692064..ae63900 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -58,7 +58,7 @@ private:
::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleAction > m_xAccActionRef;
::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext > m_xAccContextRef;
- sal_Bool ImplInitilizeCreateObj();//create COM object
+ sal_Bool ImplInitializeCreateObj();//create COM object
void UpdateActionDesc();
void UpdateRole();
diff --git a/winaccessibility/inc/g_msacc.hxx b/winaccessibility/inc/g_msacc.hxx
index df6e4bd..d700249 100644
--- a/winaccessibility/inc/g_msacc.hxx
+++ b/winaccessibility/inc/g_msacc.hxx
@@ -20,6 +20,10 @@
#ifndef __G_MSACC_HXX
#define __G_MSACC_HXX
+extern void FreeTopWindowListener();
+extern void handleWindowOpened_impl( long pAcc );
+extern long GetMSComPtr( long hWnd, long lParam, long wParam );
+
extern AccTopWindowListener* g_pTop;
#endif
diff --git a/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx b/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx
deleted file mode 100755
index 128d2cb..0000000
--- a/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define _USE_NAMESPACE
-
-#ifndef _SV_SVAPP_HXX
-#include <vcl/svapp.hxx>
-#endif
-
-#include "CheckEnableAccessible.h"
-
-
-bool IsEnableAccessibleInterface()
-{
- return Application::IsEnableAccessInterface();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/UAccCOM/CheckEnableAccessible.h b/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
index 7170e9f..90099ac 100644
--- a/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
+++ b/winaccessibility/source/UAccCOM/CheckEnableAccessible.h
@@ -20,7 +20,7 @@
#ifndef _CHECKENABLEACCESSIBLE_HXX
#define _CHECKENABLEACCESSIBLE_HXX
-bool IsEnableAccessibleInterface();
+inline bool IsEnableAccessibleInterface() { return true; }
#define CHECK_ENABLE_INF if(!IsEnableAccessibleInterface()){ return S_FALSE; }
#define CHECK_ENABLE_INF_ZERO if(!IsEnableAccessibleInterface()){ return 0; }
diff --git a/winaccessibility/source/UAccCOM/stdafx.h b/winaccessibility/source/UAccCOM/stdafx.h
index b933b12..6b2ccdd 100644
--- a/winaccessibility/source/UAccCOM/stdafx.h
+++ b/winaccessibility/source/UAccCOM/stdafx.h
@@ -28,10 +28,6 @@
#pragma once
#endif // _MSC_VER > 1000
-//#define STRICT
-//#ifndef _WIN32_WINNT
-//#define _WIN32_WINNT 0x0400
-//#endif
//#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
@@ -56,6 +52,7 @@ extern CComModule _Module;
#include <windows.h>
#undef OPAQUE
#include "CheckEnableAccessible.h"
+
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx
index a57fc3c..81b81ff 100755
--- a/winaccessibility/source/service/AccFrameEventListener.cxx
+++ b/winaccessibility/source/service/AccFrameEventListener.cxx
@@ -32,20 +32,7 @@ using namespace com::sun::star::accessibility;
#include <vcl/window.hxx>
#include <toolkit/awt/Vclxwindow.hxx>
-
-//#ifndef _SV_SYSDATA_HXX
-#if 0
-#if defined( WIN ) || defined( WNT ) || defined( OS2 )
-typedef sal_Int32 HWND;
-typedef sal_Int32 HMENU;
-typedef sal_Int32 HDC;
-typedef void *PVOID;
-typedef PVOID HANDLE;
-typedef HANDLE HFONT;
-#endif
-#endif
#include <vcl/sysdata.hxx>
-//#endif
AccFrameEventListener::AccFrameEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent)
:AccEventListener(pAcc, Agent)
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 300ebce..ad6b181 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -53,7 +53,8 @@ using namespace com::sun::star::accessibility::AccessibleStateType;
* @param listener listener that registers in UNO system.
* @return.
*/
-AccObject::AccObject(XAccessible* pAcc,AccObjectManagerAgent* pAgent ,AccEventListener* listener) :
+AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
+ AccEventListener* listener) :
m_pIMAcc (NULL),
m_resID (NULL),
m_pParantID (NULL),
@@ -62,7 +63,7 @@ AccObject::AccObject(XAccessible* pAcc,AccObjectManagerAgent* pAgent ,AccEventLi
m_bShouldDestroy(sal_False),
m_xAccRef( pAcc )
{
- sal_Bool bRet = ImplInitilizeCreateObj();
+ sal_Bool bRet = ImplInitializeCreateObj();
m_xAccContextRef = m_xAccRef->getAccessibleContext();
m_xAccActionRef = Reference< XAccessibleAction > (m_xAccContextRef,UNO_QUERY);
@@ -150,12 +151,14 @@ void AccObject::UpdateValidWindow()
* @param
* @return If the method is correctly processed.
*/
-sal_Bool AccObject::ImplInitilizeCreateObj()
+sal_Bool AccObject::ImplInitializeCreateObj()
{
ActivateActContext();
- HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL ,
+ HRESULT hr = CoCreateInstance( CLSID_MAccessible, NULL, CLSCTX_ALL,
IID_IMAccessible,
(void **)&m_pIMAcc);
+ if( !m_pIMAcc )
+ SAL_WARN( "iacc2", "Failed to create IAccessible2 instance" );
DeactivateActContext();
if ( S_OK != hr )
@@ -312,7 +315,6 @@ void AccObject::SetValue( Any pAny )
m_pIMAcc->Put_XAccValue( val.getStr() );
break;
case TREE_ITEM:
- //IAccessibility2 Implementation 2009-----
//case CHECK_BOX: //Commented by Li Xing to disable the value for general checkbox
case COMBO_BOX:
case TABLE_CELL:
@@ -324,7 +326,6 @@ void AccObject::SetValue( Any pAny )
case CHECK_BOX:
if( ( m_pParentObj !=NULL ) && (TREE == m_pParentObj->m_accRole || TREE_ITEM == m_pParentObj->m_accRole ))
m_pIMAcc->Put_XAccValue( GetMAccessibleValueFromAny(pAny).getStr() );
- //-----IAccessibility2 Implementation 2009
break;
default:
break;
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
index 28d2b79..5c55cbd 100755
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -23,17 +23,6 @@
#include <vcl/window.hxx>
#include <toolkit/awt/Vclxwindow.hxx>
-//#ifndef _SV_SYSDATA_HXX
-#if 0
-#if defined( WIN ) || defined( WNT ) || defined( OS2 )
-typedef sal_Int32 HWND;
-typedef sal_Int32 HMENU;
-typedef sal_Int32 HDC;
-typedef void *PVOID;
-typedef PVOID HANDLE;
-typedef HANDLE HFONT;
-#endif
-#endif
#include <vcl/sysdata.hxx>
#include "AccTopWindowListener.hxx"
@@ -53,11 +42,9 @@ using namespace com::sun::star::bridge;
using namespace com::sun::star::awt;
using namespace rtl;
using namespace cppu;
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
AccTopWindowListener* g_pTop = NULL;
+
//when proccess exit, call FreeTopWindowListener() in svmain
void FreeTopWindowListener()
{
@@ -73,7 +60,7 @@ void FreeTopWindowListener()
*/
void handleWindowOpened_impl(long pAcc)
{
- if( g_pTop && pAcc != NULL )
+ if( g_pTop && pAcc != 0 )
g_pTop->handleWindowOpened( (com::sun::star::accessibility::XAccessible*)((void*)pAcc) );
}
@@ -99,14 +86,13 @@ void AccTopWindowListener::handleWindowOpened( com::sun::star::accessibility::XA
}
Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
if(!xContext.is())
- {
return;
- }
+
com::sun::star::accessibility::XAccessibleContext* pAccessibleContext = xContext.get();
//Only AccessibleContext exist, add all listeners
if(pAccessibleContext != NULL && systemdata != NULL)
{
- accManagerAgent.SaveTopWindowHandle((long)(HWND)systemdata->hWnd, pAccessible);
+ accManagerAgent.SaveTopWindowHandle((long)(HWND)systemdata->hWnd, pAccessible);
AddAllListeners(pAccessible,NULL,(HWND)systemdata->hWnd);
@@ -115,7 +101,6 @@ void AccTopWindowListener::handleWindowOpened( com::sun::star::accessibility::XA
short role = pAccessibleContext->getAccessibleRole();
-
if (role == com::sun::star::accessibility::AccessibleRole::POPUP_MENU ||
role == com::sun::star::accessibility::AccessibleRole::MENU )
{
@@ -147,20 +132,17 @@ AccTopWindowListener::~AccTopWindowListener()
*/
void AccTopWindowListener::windowOpened( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException)
{
+ SAL_INFO( "iacc2", "windowOpened triggered" );
+
if ( !e.Source.is())
- {
return;
- }
Reference< com::sun::star::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
com::sun::star::accessibility::XAccessible* pAccessible = xAccessible.get();
- if ( pAccessible == NULL)
- {
+ if ( !pAccessible )
return;
- }
-
- handleWindowOpened(pAccessible);
+ handleWindowOpened( pAccessible );
}
/**
@@ -213,16 +195,14 @@ void AccTopWindowListener::AddAllListeners(com::sun::star::accessibility::XAcces
= mpAccessible->getAccessibleContext();
com::sun::star::accessibility::XAccessibleContext* mpContext = mxAccessibleContext.get();
if(mpContext != NULL)
- {
- //fprintf(output, "go on add child's children event listener\n");
- AddAllListeners(mpAccessible,pAccessible,pWND);
- }
+ AddAllListeners( mpAccessible, pAccessible, pWND);
}
}
}
void AccTopWindowListener::windowClosing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
{
+ SAL_INFO( "iacc2", "windowClosing triggered" );
}
/**
@@ -232,17 +212,15 @@ void AccTopWindowListener::windowClosing( const ::com::sun::star::lang::EventObj
*/
void AccTopWindowListener::windowClosed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException)
{
+ SAL_INFO( "iacc2", "windowClosed triggered" );
+
if ( !e.Source.is())
- {
return;
- }
+
Reference< com::sun::star::accessibility::XAccessible > xAccessible ( e.Source, UNO_QUERY );
com::sun::star::accessibility::XAccessible* pAccessible = xAccessible.get();
if ( pAccessible == NULL)
- {
return;
- }
-
VCLXWindow* pvclwindow = (VCLXWindow*)pAccessible;
Window* window = pvclwindow->GetWindow();
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx
index ce720c3..82a67b3 100755
--- a/winaccessibility/source/service/msaaservice_impl.cxx
+++ b/winaccessibility/source/service/msaaservice_impl.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
@@ -25,9 +25,13 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/accessibility/XMSAAService.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/awt/XExtendedToolkit.hpp>
#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+
+#include <windows.h>
using namespace ::rtl; // for OUString
using namespace ::com::sun::star; // for odk interfaces
@@ -36,96 +40,53 @@ using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::awt;
-typedef sal_Int32 HWND;
-
#include "AccTopWindowListener.hxx"
#include "g_msacc.hxx"
-extern void FreeTopWindowListener();
-extern long GetMSComPtr(long hWnd, long lParam, long wParam);
-extern void handleWindowOpened_impl( long pAcc);
-
-
namespace my_sc_impl
{
- //extern Sequence< OUString > SAL_CALL getSupportedServiceNames_MSAAServiceImpl();
- //static OUString SAL_CALL getImplementationName_MSAAServiceImpl();
- //static Reference< XInterface > SAL_CALL create_MSAAServiceImpl(
- // Reference< XComponentContext > const & xContext )
- // SAL_THROW( () );
-/**
- * Method that returns the service name.
- * @param
- * @return Name sequence.
- */
static Sequence< OUString > getSupportedServiceNames_MSAAServiceImpl()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- // MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.MSAAService"));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = "com.sun.star.accessibility.MSAAService";
+ return seqNames;
}
-/**
- * Method that returns the service name.
- * @param
- * @return Name sequence.
- */
static OUString getImplementationName_MSAAServiceImpl()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- // MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.my_sc_implementation.MSAAService") );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.accessibility.my_sc_implementation.MSAAService" );
}
-class MSAAServiceImpl : public ::cppu::WeakImplHelper3<
- XMSAAService, lang::XServiceInfo, lang::XInitialization >
+class MSAAServiceImpl : public ::cppu::WeakImplHelper4<
+ XMSAAService, lang::XServiceInfo,
+ lang::XInitialization, lang::XComponent >
{
OUString m_arg;
public:
- // focus on three given interfaces,
- // no need to implement XInterface, XTypeProvider, XWeak
+ // focus on four interfaces,
+ // no need to implement XInterface, XTypeProvider, XWeak etc.
MSAAServiceImpl ();
virtual ~MSAAServiceImpl( void );
+
// XInitialization will be called upon createInstanceWithArguments[AndContext]()
- virtual void SAL_CALL initialize( Sequence< Any > const & args )
- throw (Exception);
+ virtual void SAL_CALL initialize( Sequence< Any > const & args ) throw (Exception);
+
+ // XComponent - as used by VCL to lifecycle manage this bridge.
+ virtual void SAL_CALL dispose();
+ virtual void SAL_CALL addEventListener( const ::css::uno::Reference< ::css::lang::XEventListener >& ) { /* dummy */ }
+ virtual void SAL_CALL removeEventListener( const ::css::uno::Reference< ::css::lang::XEventListener >& ) { /* dummy */ }
+
// XMSAAService
- virtual sal_Int32 SAL_CALL getAccObjectPtr (long hWnd, long lParam, long wParam)
- throw (RuntimeException);
- virtual void SAL_CALL handleWindowOpened(sal_Int32)
- throw (RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccObjectPtr (long hWnd, long lParam, long wParam);
+ virtual void SAL_CALL handleWindowOpened(sal_Int32);
+
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName()
- throw (RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName )
- throw (RuntimeException);
- virtual Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw (RuntimeException);
+ virtual OUString SAL_CALL getImplementationName();
+ virtual sal_Bool SAL_CALL supportsService( OUString const & serviceName );
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames();
};
-/**
- * Implemention of XInitialization.
- * @param
- * @return.
- */
void MSAAServiceImpl::initialize( Sequence< Any > const & args ) throw (Exception)
{
if (1 != args.getLength())
@@ -151,29 +112,24 @@ void MSAAServiceImpl::initialize( Sequence< Any > const & args ) throw (Exceptio
*/
sal_Int32 MSAAServiceImpl::getAccObjectPtr ( long hWnd, long lParam, long wParam) throw (RuntimeException)
{
- return GetMSComPtr(hWnd, lParam, wParam);
+ return GetMSComPtr( hWnd, lParam, wParam );
}
/**
- * Implemention of handleWindowOpened,the method will be invoked when a top window
- * opened and AT starts up.
+ * Implemention of handleWindowOpened, the method will be invoked when a
+ * top window is opened and AT starts up.
* @param
* @return
*/
-void MSAAServiceImpl::handleWindowOpened( sal_Int32 pAcc)
+void MSAAServiceImpl::handleWindowOpened( sal_Int32 nAcc)
{
- handleWindowOpened_impl(pAcc);
+ SAL_INFO( "iacc2", "Window opened " << nAcc );
+ handleWindowOpened_impl( nAcc );
}
-/**
- * Implemention of XServiceInfo.
- * @param
- * @return Implementataion name.
- */
OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException)
{
- // unique implementation name
- return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.my_sc_impl.MSAAService") );
+ return OUString( "com.sun.star.accessibility.my_sc_impl.MSAAService" );
}
/**
@@ -184,7 +140,7 @@ OUString MSAAServiceImpl::getImplementationName() throw (RuntimeException)
sal_Bool MSAAServiceImpl::supportsService( OUString const & serviceName ) throw (RuntimeException)
{
// this object only supports one service, so the test is simple
- return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.accessibility.MSAAService") );
+ return serviceName == "com.sun.star.accessibility.MSAAService";
}
/**
@@ -197,47 +153,159 @@ Sequence< OUString > MSAAServiceImpl::getSupportedServiceNames() throw (RuntimeE
return getSupportedServiceNames_MSAAServiceImpl();
}
+static void AccessBridgeHandleExistingWindow(const Reference< XMSAAService > &xAccMgr,
+ Window *pWindow, bool bShow)
+{
+ if ( pWindow )
+ {
+ css::uno::Reference< css::accessibility::XAccessible > xAccessible;
+
+ SAL_INFO( "iacc2", "Decide whether to register existing window with IAccessible2" );
+
+ // Test for combo box - drop down floating windows first
+ Window * pParentWindow = pWindow->GetParent();
+
+ if ( pParentWindow )
+ {
+ try
+ {
+ // The parent window of a combo box floating window should have the role COMBO_BOX
+ css::uno::Reference< css::accessibility::XAccessible > xParentAccessible(pParentWindow->GetAccessible());
+ if ( xParentAccessible.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xParentAC( xParentAccessible->getAccessibleContext() );
+ if ( xParentAC.is() && (css::accessibility::AccessibleRole::COMBO_BOX == xParentAC->getAccessibleRole()) )
+ {
+ // O.k. - this is a combo box floating window corresponding to the child of role LIST of the parent.
+ // Let's not rely on a specific child order, just search for the child with the role LIST
+ sal_Int32 nCount = xParentAC->getAccessibleChildCount();
+ for ( sal_Int32 n = 0; (n < nCount) && !xAccessible.is(); n++)
+ {
+ css::uno::Reference< css::accessibility::XAccessible > xChild = xParentAC->getAccessibleChild(n);
+ if ( xChild.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xChildAC = xChild->getAccessibleContext();
+ if ( xChildAC.is() && (css::accessibility::AccessibleRole::LIST == xChildAC->getAccessibleRole()) )
+ {
+ xAccessible = xChild;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (::com::sun::star::uno::RuntimeException e)
+ {
+ // Ignore show events that throw DisposedExceptions in getAccessibleContext(),
+ // but keep revoking these windows in hide(s).
+ if (bShow)
+ return;
+ }
+ }
+
+ // We have to rely on the fact that Window::GetAccessible()->getAccessibleContext() returns a valid XAccessibleContext
+ // also for other menus than menubar or toplevel popup window. Otherwise we had to traverse the hierarchy to find the
+ // context object to this menu floater. This makes the call to Window->IsMenuFloatingWindow() obsolete.
+ if ( ! xAccessible.is() )
+ xAccessible = pWindow->GetAccessible();
+
+ assert( xAccMgr.is() );
+ if ( xAccessible.is() )
+ {
+ xAccMgr->handleWindowOpened( (long)xAccessible.get() );
+ SAL_INFO( "iacc2", "Decide whether to register existing window with IAccessible2" );
+ }
+ }
+}
+
+/*
+ * Setup and notify the OS of Accessible peers for all existing windows.
+ */
+static void AccessBridgeUpdateOldTopWindows( const Reference< XMSAAService > &xAccMgr )
+{
+ sal_uInt16 nTopWindowCount = (sal_uInt16)Application::GetTopWindowCount();
+
+ for ( sal_uInt16 i = 0; i < nTopWindowCount; i++ )
+ {
+ Window* pTopWindow = Application::GetTopWindow( i );
+ css::uno::Reference< css::accessibility::XAccessible > xAccessible = pTopWindow->GetAccessible();
+ if ( xAccessible.is() )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xAC( xAccessible->getAccessibleContext() );
+ if ( xAC.is())
+ {
+ short role = xAC->getAccessibleRole();
+ if ( !xAC->getAccessibleName().isEmpty() )
+ AccessBridgeHandleExistingWindow( xAccMgr, pTopWindow, true );
+ }
+ }
+ }
+}
+
+static bool HasAtHook()
+{
+ sal_Int32 bIsRuning=0;
+ // BOOL WINAPI SystemParametersInfo(
+ // __in UINT uiAction,
+ // __in UINT uiParam,
+ // __inout PVOID pvParam,
+ // __in UINT fWinIni
+ // );
+ // pvParam must be BOOL (defined in MFC as int)
+ // End
+ return SystemParametersInfo( SPI_GETSCREENREADER, 0,
+ &bIsRuning, 0) && bIsRuning;
+}
+
/**
- * Static method that can create an entity of our MSAA Service
- * @param xContext No use here.
- * @return The object interface.
- */
+ * Static method that can create an entity of our MSAA Service
+ * @param xContext No use here.
+ * @return The object interface.
+ */
Reference< XInterface > SAL_CALL create_MSAAServiceImpl( Reference< XComponentContext > const & /*xContext*/ ) SAL_THROW( () )
{
- MSAAServiceImpl* xxx = new MSAAServiceImpl();
- //return static_cast< lang::XTypeProvider * >( xxx );
- Reference< XMSAAService > p( xxx );
- return p;
+ bool bRunWithoutAt = getenv("SAL_FORCE_IACCESSIBLE2");
+
+ if ( !HasAtHook() )
+ {
+ if ( !bRunWithoutAt )
+ {
+ SAL_INFO("iacc2", "Apparently no running AT -> not enabling IAccessible2 integration");
+ return Reference< XMSAAService >();
+ }
+ }
+
+ Reference< XMSAAService > xAccMgr( new MSAAServiceImpl() );
+
+ AccessBridgeUpdateOldTopWindows( xAccMgr );
+
+ SAL_INFO("iacc2", "Created new IAccessible2 service impl.");
+
+ return xAccMgr;
}
-/**
- * Constructor.
- * @param
- * @return
- */
MSAAServiceImpl::MSAAServiceImpl()
{
Reference< XExtendedToolkit > xToolkit =
Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
- if(xToolkit.is())
+ if( xToolkit.is() )
{
- AccTopWindowListener *accListener;
- accListener = new AccTopWindowListener();
- g_pTop = accListener;
- Reference< XTopWindowListener> x(accListener);
- xToolkit->addTopWindowListener(x);
+ g_pTop = new AccTopWindowListener();
+ Reference< XTopWindowListener> xRef( g_pTop );
+ xToolkit->addTopWindowListener( xRef );
+ SAL_INFO( "iacc2", "successfully connected to the toolkit event hose" );
}
+ else
+ SAL_WARN( "iacc2", "No VCL toolkit interface to listen to for events");
}
-/**
- * Static method that can create an entity of our MSAA Service
- * @param Destructor
- * @return
- */
MSAAServiceImpl::~MSAAServiceImpl()
{
+}
+void MSAAServiceImpl::dispose()
+{
// As all folders and streams contain references to their parents,
// we must remove these references so that they will be deleted when
// the hash_map of the root folder is cleared, releasing all subfolders
@@ -245,8 +313,6 @@ MSAAServiceImpl::~MSAAServiceImpl()
// released when this destructor completes, the folder tree should be
// deleted fully (and automagically).
FreeTopWindowListener();
-
-
}
}
@@ -258,7 +324,8 @@ static struct ::cppu::ImplementationEntry s_component_entries [] =
{
{
create_MSAAServiceImpl, getImplementationName_MSAAServiceImpl,
- getSupportedServiceNames_MSAAServiceImpl, ::cppu::createSingleComponentFactory,
+ getSupportedServiceNames_MSAAServiceImpl,
+ ::cppu::createSingleComponentFactory,
0, 0
},
{ 0, 0, 0, 0, 0, 0 }
@@ -267,12 +334,12 @@ static struct ::cppu::ImplementationEntry s_component_entries [] =
extern "C"
{
- SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ SAL_DLLPUBLIC_EXPORT void SAL_CALL iacc2_component_getImplementationEnvironment(
sal_Char const ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL iacc2_component_getFactory(
sal_Char const * implName, lang::XMultiServiceFactory * xMgr,
registry::XRegistryKey * xRegistry )
{
diff --git a/winaccessibility/source/service/winaccessibility.component b/winaccessibility/source/service/winaccessibility.component
index 3a73858..71ea6de 100644
--- a/winaccessibility/source/service/winaccessibility.component
+++ b/winaccessibility/source/service/winaccessibility.component
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="iacc2"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.accessibility.my_sc_implementation.MSAAService">
<service name="com.sun.star.accessibility.MSAAService"/>
commit fd035fe61604042609c21aba06eb2d8ffed32dda
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon Nov 18 15:28:19 2013 +0000
uia: remove redundant component registration.
Change-Id: I913e6498d09021cca78be27b542421251f258535
diff --git a/winaccessibility/Library_winaccessibility.mk b/winaccessibility/Library_winaccessibility.mk
index 0f1558c..55057c3 100755
--- a/winaccessibility/Library_winaccessibility.mk
+++ b/winaccessibility/Library_winaccessibility.mk
@@ -55,7 +55,7 @@ $(eval $(call gb_Library_use_externals,winaccessibility,\
$(eval $(call gb_Library_use_libraries,winaccessibility,\
cppu \
cppuhelper \
- vcl \
+ vcl \
sal \
tk \
uwinapi \
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx
index 8606069..ce720c3 100755
--- a/winaccessibility/source/service/msaaservice_impl.cxx
+++ b/winaccessibility/source/service/msaaservice_impl.cxx
@@ -261,11 +261,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] =
getSupportedServiceNames_MSAAServiceImpl, ::cppu::createSingleComponentFactory,
0, 0
},
- {
- create_MSAAServiceImpl, getImplementationName_MSAAServiceImpl,
- getSupportedServiceNames_MSAAServiceImpl, ::cppu::createSingleComponentFactory,
- 0, 0
- },
{ 0, 0, 0, 0, 0, 0 }
};
}
commit 27e6024ad73642e724460d7aec60282e63c78807
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Nov 18 13:25:49 2013 +0000
Remove obsolete statreg.cpp / atlimpl.cpp includes.
Change-Id: I51bd72f6aaeb33bb87e425118b9f205744359145
diff --git a/winaccessibility/source/UAccCOM/StdAfx.cxx b/winaccessibility/source/UAccCOM/StdAfx.cxx
index 8d2859d..71ebbdb 100644
--- a/winaccessibility/source/UAccCOM/StdAfx.cxx
+++ b/winaccessibility/source/UAccCOM/StdAfx.cxx
@@ -21,9 +21,6 @@
#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
-#include <statreg.cpp>
#endif
-#include <atlimpl.cpp>
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7b1e896cc187f9aa71d1f4fd3c5a9192c5805d4d
Author: Herbert Dürr <hdu at apache.org>
Date: Sun Nov 17 00:49:54 2013 +0100
i107914# adjust license headers to the ALv2
as intended by IBM's symphony contribution
and the individual ICLAs of the developers
Found by: V Stuart Foote <VStuart.Foote at utsa.edu>
Change-Id: I47125ff5c9f1ae241132f13b7b3ee2d6fa3cfe9a
diff --git a/offapi/com/sun/star/accessibility/MSAAService.idl b/offapi/com/sun/star/accessibility/MSAAService.idl
index b7c4efe..3e8840a 100644
--- a/offapi/com/sun/star/accessibility/MSAAService.idl
+++ b/offapi/com/sun/star/accessibility/MSAAService.idl
@@ -1,30 +1,24 @@
-/*************************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright IBM Corporation 2010.
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
#ifndef __com_sun_star_accessibility_Accessible_idl__
#define __com_sun_star_accessibility_Accessible_idl__
diff --git a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
index 978acc7..e9fd849 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
@@ -1,30 +1,23 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
#ifndef __com_sun_star_accessibility_XAccessibleAttribute_idl__
#define __com_sun_star_accessibility_XAccessibleAttribute_idl__
diff --git a/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
index c31ff8b..5a77d3a 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
@@ -1,30 +1,23 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
#ifndef __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
#define __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
index 68da226..4b8f43e 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
@@ -1,30 +1,23 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
#ifndef __com_sun_star_accessibility_XAccessibleTableSelection_idl__
#define __com_sun_star_accessibility_XAccessibleTableSelection_idl__
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
index 6ac4cd2..ed0735b 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
@@ -1,30 +1,23 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
#ifndef __com_sun_star_accessibility_XAccessibleTextSelection_idl__
#define __com_sun_star_accessibility_XAccessibleTextSelection_idl__
diff --git a/offapi/com/sun/star/accessibility/XMSAAService.idl b/offapi/com/sun/star/accessibility/XMSAAService.idl
index 2b22826..54c12d3 100755
--- a/offapi/com/sun/star/accessibility/XMSAAService.idl
+++ b/offapi/com/sun/star/accessibility/XMSAAService.idl
@@ -1,30 +1,23 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright IBM Corporation 2010.
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
#ifndef __com_sun_star_accessibility_XMSAASERVICE_idl__
#define __com_sun_star_accessibility_XMSAASERVICE_idl__
commit f6f8c4203d3a42b2605de6080f5308320a013cdc
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 16 23:31:32 2013 +0100
Fix minor compilation issues
Change-Id: I3567a42d7d071d61a2f41f1fb32d6831c9898d3a
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
old mode 100644
new mode 100755
index 8b63afd..f75da685
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1611,6 +1611,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/accessibility,\
AccessibleTextType \
IllegalAccessibleComponentStateException \
TextSegment \
+ MSAAService \
XAccessible \
XAccessibleAction \
XAccessibleComponent \
@@ -1618,7 +1619,9 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/accessibility,\
XAccessibleEditableText \
XAccessibleEventBroadcaster \
XAccessibleEventListener \
+ XAccessibleExtendedAttributes \
XAccessibleExtendedComponent \
+ XAccessibleGroupPosition \
XAccessibleHyperlink \
XAccessibleHypertext \
XAccessibleImage \
@@ -1628,10 +1631,13 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/accessibility,\
XAccessibleSelection \
XAccessibleStateSet \
XAccessibleTable \
+ XAccessibleTableSelection \
XAccessibleText \
XAccessibleTextAttributes \
XAccessibleTextMarkup \
+ XAccessibleTextSelection \
XAccessibleValue \
+ XMSAAService \
))
$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/animations,\
AnimationAdditiveMode \
diff --git a/offapi/com/sun/star/accessibility/XMSAAService.idl b/offapi/com/sun/star/accessibility/XMSAAService.idl
old mode 100644
new mode 100755
index 01fa3a2..2b22826
--- a/offapi/com/sun/star/accessibility/XMSAAService.idl
+++ b/offapi/com/sun/star/accessibility/XMSAAService.idl
@@ -48,7 +48,7 @@ interface XMSAAService : ::com::sun::star::uno::XInterface
*/
long getAccObjectPtr ([in] long hWnd, [in] long lParam, [in] long wParam);
- [oneway] void handleWindowOpened ([in] long i);
+ void handleWindowOpened ([in] long i);
};
}; }; }; };
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index a75cfb3..d4a31a8 100755
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -36,9 +36,9 @@
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-//#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
-//#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
commit e5618f1707626a8c096ea2ca8da3cbe2c5f3db16
Author: Steve Yin <steve_y at apache.org>
Date: Sat Nov 16 23:58:19 2013 +0100
Integrate branch of IAccessible2
Change-Id: Ied8b6941765c86a849467cb5df312ca7124f32b3
diff --git a/offapi/com/sun/star/accessibility/AccessibleEventId.idl b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
index d378f7d..efafc1a 100644
--- a/offapi/com/sun/star/accessibility/AccessibleEventId.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
@@ -372,6 +372,16 @@ constants AccessibleEventId
@since OOo 3.2
*/
const short LISTBOX_ENTRY_COLLAPSED = 33;
+
+ //IAccessibility2 Implementation 2009-----
+ const short ACTIVE_DESCENDANT_CHANGED_NOFOCUS = 34;
+ const short SELECTION_CHANGED_ADD =35;
+ const short SELECTION_CHANGED_REMOVE =36;
+ const short SELECTION_CHANGED_WITHIN =37;
+ const short PAGE_CHANGED =38;
+ const short SECTION_CHANGED =39;
+ const short COLUMN_CHANGED =40;
+ //-----IAccessibility2 Implementation 2009
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/AccessibleRelationType.idl b/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
index 2219c26..0ea803a 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRelationType.idl
@@ -106,6 +106,14 @@ constants AccessibleRelationType
@since OOo 3.0
*/
const short NODE_CHILD_OF = 9;
+
+ /** Described-by relation type.
+
+ <p>Indicates an object is described by the target object.</p>
+
+ @since OOo 3.5
+ */
+ const short DESCRIBED_BY = 10;
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/AccessibleStateType.idl b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
index cdde9c5..25ac3ab 100644
--- a/offapi/com/sun/star/accessibility/AccessibleStateType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
@@ -210,6 +210,27 @@ constants AccessibleStateType
partly in the visible area of its parent.</p>
*/
const short VISIBLE = 30;
+
+ // The following constants have been introduced with the IA2 CWS:
+
+ // MOVEABLE only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
+ /** Indicates the position of the object is not fixed.
+ */
+ const short MOVEABLE = 31;
+
+ // DEFAULT exists in MSAA/IA2, and now also in ATK and NSAccessibility.
+ /** Indicates the object is the default button in a window
+ */
+ const short DEFAULT = 32;
+
+ // OFFSCREEN only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
+ // MT: Shouldn't this be the same like !SHOWING in UAA/ATK?
+ const short OFFSCREEN = 33;
+
+ // COLLAPSED exists in MSAA/IA2, and now also in JAA, but not in ATK/NSAccessibility. In NSAccessibility, there is a notification for collapse.
+ // In opposite to MSAA, UAA has EXPANDABLE, so EXPANDABLE && !EXPANDED should be the same like COLLAPSED.
+ const short COLLAPSE = 34;
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/accessibility/MSAAService.idl b/offapi/com/sun/star/accessibility/MSAAService.idl
new file mode 100644
index 0000000..b7c4efe
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/MSAAService.idl
@@ -0,0 +1,45 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright IBM Corporation 2010.
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+#ifndef __com_sun_star_accessibility_Accessible_idl__
+#define __com_sun_star_accessibility_Accessible_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/lang/XInitialization.idl>
+#include "XMSAAService.idl"
+
+module com { module sun { module star { module accessibility {
+
+service MSAAService
+{
+ interface XMSAAService;
+ interface com::sun::star::lang::XInitialization;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
new file mode 100644
index 0000000..978acc7
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleAttribute_idl__
+#define __com_sun_star_accessibility_XAccessibleAttribute_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleExtendedAttributes : ::com::sun::star::uno::XInterface
+{
+ /* Returns the attribute of this object' formula */ // MT: I guess it's not formula only?
+ any getExtendedAttributes() raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
new file mode 100644
index 0000000..c31ff8b
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
+#define __com_sun_star_accessibility_XAccessibleGroupPosition_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleGroupPosition : ::com::sun::star::uno::XInterface
+{
+ /* Returns the group position of the object */
+ sequence<long> getGroupPosition( [in] any accoject ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /* Returns the hyperlink URL info of the object */
+ string getObjectLink( [in] any accoject ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
new file mode 100644
index 0000000..68da226
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleTableSelection_idl__
+#define __com_sun_star_accessibility_XAccessibleTableSelection_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessible;
+
+interface XAccessibleTableSelection : ::com::sun::star::uno::XInterface
+{
+ boolean selectRow ([in] long row) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ boolean unselectRow ([in] long row) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ boolean selectColumn ([in] long column) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ boolean unselectColumn ([in] long column) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
new file mode 100644
index 0000000..6ac4cd2
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_accessibility_XAccessibleTextSelection_idl__
+#define __com_sun_star_accessibility_XAccessibleTextSelection_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_awt_Point_idl__
+#include <com/sun/star/awt/Point.idl>
+#endif
+#ifndef __com_sun_star_awt_Rectangle_idl__
+#include <com/sun/star/awt/Rectangle.idl>
+#endif
+#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#endif
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+interface XAccessibleTextSelection : ::com::sun::star::uno::XInterface
+{
+ boolean scrollToPosition ([in] ::com::sun::star::awt::Point aPoint, [in] boolean isLeftTop) raises (::com::sun::star::lang::IllegalArgumentException);
+
+ long getSelectedPortionCount();
+
+ long getSeletedPositionStart ([in] long nSelectedPortionIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ long getSeletedPositionEnd ([in] long nSelectedPortionIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ long addSelection( [in] long selectionIndex, [in]long startOffset, [in] long endOffset) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+
+ boolean removeSelection( [in] long selectionIndex ) raises (::com::sun::star::lang::IndexOutOfBoundsException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/accessibility/XMSAAService.idl b/offapi/com/sun/star/accessibility/XMSAAService.idl
new file mode 100644
index 0000000..01fa3a2
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/XMSAAService.idl
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_accessibility_XMSAASERVICE_idl__
+#define __com_sun_star_accessibility_XMSAASERVICE_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+module com { module sun { module star { module accessibility {
+
+/** The interface must be implemented for a server that can support MSAA com objects and send win32 accessible events
+*/
+interface XMSAAService : ::com::sun::star::uno::XInterface
+{
+ /** Return com object pointer.
+
+ @return
+ A reference to the object that contains the actual accessibility information.
+
+ @see AccessibleContext
+ */
+ long getAccObjectPtr ([in] long hWnd, [in] long lParam, [in] long wParam);
+
+ [oneway] void handleWindowOpened ([in] long i);
+};
+
+}; }; }; };
+
+#endif
commit 1263b20f56d896706c982ad1b91d2936abf5d617
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 16 22:29:12 2013 +0100
Disable _WIN32_WINNT definition
Change-Id: Ibfa5839700da5ec272c95199b09cd4265d82525d
diff --git a/winaccessibility/source/UAccCOM/stdafx.h b/winaccessibility/source/UAccCOM/stdafx.h
index 631c48d..b933b12 100644
--- a/winaccessibility/source/UAccCOM/stdafx.h
+++ b/winaccessibility/source/UAccCOM/stdafx.h
@@ -28,10 +28,10 @@
#pragma once
#endif // _MSC_VER > 1000
-#define STRICT
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
-#endif
+//#define STRICT
+//#ifndef _WIN32_WINNT
+//#define _WIN32_WINNT 0x0400
+//#endif
//#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
commit f619bd34834dae996bf544e6bfd66de729de5961
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 16 14:33:41 2013 +0100
Remove obsolete IDL files
Change-Id: I4f38c1ec815a5f2e39b492657cb0532bb4e19967
diff --git a/winaccessibility/CustomTarget_ia2_idl.mk b/winaccessibility/CustomTarget_ia2_idl.mk
index fc3fc46..92b5cc9 100755
--- a/winaccessibility/CustomTarget_ia2_idl.mk
+++ b/winaccessibility/CustomTarget_ia2_idl.mk
@@ -15,28 +15,12 @@ wina11y_SOURCE := $(SRCDIR)/winaccessibility/source/UAccCOMIDL
# We cannot depend on *.tlb because they only produced by IDL compiler
# if idl contains 'library' statement.
$(call gb_CustomTarget_get_target,winaccessibility/ia2/idl) : \
- $(wina11y_COMIDLDIR)/Accessible2.h \
- $(wina11y_COMIDLDIR)/AccessibleAction.h \
- $(wina11y_COMIDLDIR)/AccessibleApplication.h \
- $(wina11y_COMIDLDIR)/AccessibleComponent.h \
- $(wina11y_COMIDLDIR)/AccessibleEditableText.h \
- $(wina11y_COMIDLDIR)/AccessibleEventId.h \
- $(wina11y_COMIDLDIR)/AccessibleHyperlink.h \
- $(wina11y_COMIDLDIR)/AccessibleHypertext.h \
- $(wina11y_COMIDLDIR)/AccessibleImage.h \
$(wina11y_COMIDLDIR)/AccessibleKeyBinding.h \
$(wina11y_COMIDLDIR)/AccessibleKeyStroke.h \
- $(wina11y_COMIDLDIR)/AccessibleRelation.h \
- $(wina11y_COMIDLDIR)/AccessibleRole.h \
- $(wina11y_COMIDLDIR)/AccessibleStates.h \
- $(wina11y_COMIDLDIR)/AccessibleTable.h \
- $(wina11y_COMIDLDIR)/AccessibleText.h \
- $(wina11y_COMIDLDIR)/AccessibleValue.h \
$(wina11y_COMIDLDIR)/Charset.h \
- $(wina11y_COMIDLDIR)/IA2CommonTypes.h \
- $(wina11y_COMIDLDIR)/IA2TypeLibrary.h \
$(wina11y_COMIDLDIR)/UAccCOM.h \
- $(wina11y_COMIDLDIR)/defines.h
+ $(wina11y_COMIDLDIR)/defines.h \
+ $(wina11y_COMIDLDIR)/ia2_api_all.h
$(wina11y_COMIDLDIR)/%.h : $(wina11y_SOURCE)/%.idl \
| $(wina11y_COMIDLDIR)/.dir
commit 6d33ab2c83863c32ddf8180c828aa4142c83deae
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 2 15:33:13 2013 +0100
Remove WNT define
Change-Id: Ia69141f58fad25797d7d7495a357dd18c7abf08d
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.h b/winaccessibility/source/UAccCOM/AccActionBase.h
old mode 100644
new mode 100755
index 9c201107..8a6f64a
--- a/winaccessibility/source/UAccCOM/AccActionBase.h
+++ b/winaccessibility/source/UAccCOM/AccActionBase.h
@@ -28,8 +28,6 @@
#pragma once
#endif // _MSC_VER > 1000
-#define WNT
-
#include <com/sun/star/uno/reference.hxx>
#include <com/sun/star/accessibility/XAccessibleAction.hpp>
#include "UNOXWrapper.h"
diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.h b/winaccessibility/source/UAccCOM/AccComponentBase.h
old mode 100644
new mode 100755
index 500f7cf..a894816
--- a/winaccessibility/source/UAccCOM/AccComponentBase.h
+++ b/winaccessibility/source/UAccCOM/AccComponentBase.h
@@ -28,8 +28,6 @@
#pragma once
#endif // _MSC_VER > 1000
-#define WNT
-
#include <com/sun/star/uno/reference.hxx>
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
#include "UNOXWrapper.h"
diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx b/winaccessibility/source/UAccCOM/AccRelation.cxx
old mode 100644
new mode 100755
index 9a6ddc3..3df484a
--- a/winaccessibility/source/UAccCOM/AccRelation.cxx
+++ b/winaccessibility/source/UAccCOM/AccRelation.cxx
@@ -202,13 +202,13 @@ BSTR CAccRelation::getRelationTypeBSTR(int type)
{IA2_RELATION_LABELED_BY , 6},
{IA2_RELATION_MEMBER_OF , 7},
{IA2_RELATION_SUBWINDOW_OF , 8},
- {IA2_RELATION_NODE_CHILD_OF, 9},
- {IA2_RELATION_DESCRIBED_BY , 10},
+ {IA2_RELATION_NODE_CHILD_OF , 9},
+ {IA2_RELATION_DESCRIBED_BY , 10},
};
USES_CONVERSION;
- return (type >= 0 && type <= 10) ? T2BSTR(map[type].string) : _T("");
+ return (type >= 0 && type <= 10) ? map[type].string : _T("");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx
old mode 100644
new mode 100755
index c218006..1191eb4
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -22,7 +22,6 @@
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <string>
-#define WNT
#include <com/sun/star/accessibility/AccessibleTextType.hpp>
#include "AccTextBase.h"
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.h b/winaccessibility/source/UAccCOM/AccTextBase.h
old mode 100644
new mode 100755
index 71dd1f8..8494936
--- a/winaccessibility/source/UAccCOM/AccTextBase.h
+++ b/winaccessibility/source/UAccCOM/AccTextBase.h
@@ -28,8 +28,6 @@
#pragma once
#endif // _MSC_VER > 1000
-#define WNT
-
#include <com/sun/star/uno/reference.hxx>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include "UNOXWrapper.h"
diff --git a/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx b/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx
old mode 100644
new mode 100755
index f4a5dce..128d2cb
--- a/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/CheckEnableAccessible.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define WNT
#define _USE_NAMESPACE
#ifndef _SV_SVAPP_HXX
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.h b/winaccessibility/source/UAccCOM/EnumVariant.h
old mode 100644
new mode 100755
index 42b0ccc..ea6d68d
--- a/winaccessibility/source/UAccCOM/EnumVariant.h
+++ b/winaccessibility/source/UAccCOM/EnumVariant.h
@@ -20,8 +20,6 @@
#ifndef __ENUMVARIANT_H_
#define __ENUMVARIANT_H_
-#define WNT
-
#include "resource.h" // main symbols
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
old mode 100644
new mode 100755
index d4a31a8..a75cfb3
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -36,9 +36,9 @@
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+//#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
-#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+//#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
diff --git a/winaccessibility/source/UAccCOM/Resource.h b/winaccessibility/source/UAccCOM/Resource.h
old mode 100644
new mode 100755
index 3173399..819b28d
--- a/winaccessibility/source/UAccCOM/Resource.h
+++ b/winaccessibility/source/UAccCOM/Resource.h
@@ -21,7 +21,6 @@
// Microsoft Developer Studio generated include file.
// Used by UAccCOM.rc
//
-#define WNT
#define IDS_PROJNAME 100
#define IDR_MACCESSIBLE 101
diff --git a/winaccessibility/source/UAccCOM/UNOXWrapper.h b/winaccessibility/source/UAccCOM/UNOXWrapper.h
old mode 100644
new mode 100755
index 5555f0a..08b2632
--- a/winaccessibility/source/UAccCOM/UNOXWrapper.h
+++ b/winaccessibility/source/UAccCOM/UNOXWrapper.h
@@ -20,8 +20,6 @@
#ifndef __UNOXWRAPPER_H_
#define __UNOXWRAPPER_H_
-#define WNT
-
#include "resource.h" // main symbols
commit cbf2a0d90cc9e2efb31aabd1d2db2acce76d21c7
Author: David Ostrovsky <david at ostrovsky.org>
Date: Sat Nov 2 20:40:47 2013 +0100
Gbuildify winaccessibility service
Conflicts:
winaccessibility/source/UAccCOM/UAccCOM.def
winaccessibility/source/service/AccObjectWinManager.cxx
winaccessibility/source/service/checkmt.cxx
winaccessibility/source/service/checkmt.hxx
Change-Id: Ia66872bee7c70c840c1bd5caa626bf63eac9ef7c
diff --git a/Repository.mk b/Repository.mk
index 4c9d362..220d79b 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -558,7 +558,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(if $(DISABLE_ATL),,\
inprocserv \
) \
- UAccCOM \
+ $(if $(ENABLE_IA2), \
+ UAccCOM \
+ winaccessibility \
+ ) \
) \
))
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
old mode 100644
new mode 100755
index b18c79b..385cedb
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -400,6 +400,8 @@ public:
createFolderPicker( const com::sun::star::uno::Reference<
com::sun::star::uno::XComponentContext >& rServiceManager );
+ static bool IsEnableAccessInterface() {return true;}
+
private:
DECL_STATIC_LINK( Application, PostEventHandler, void* );
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
old mode 100644
new mode 100755
index 768a8e7..6157e25
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -137,8 +137,11 @@ $(eval $(call gb_Rdb_add_components,services,\
shell/source/win32/simplemail/smplmail \
shell/source/win32/syssh \
vcl/vcl.windows \
- $(if $(ENABLE_JAVA), \
- accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge \
+ $(if $(ENABLE_IA2), \
+ winaccessibility/source/service/winaccessibility, \
+ $(if $(ENABLE_JAVA), \
+ accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge \
+ ) \
) \
) \
$(if $(ENABLE_HEADLESS), \
diff --git a/winaccessibility/Library_uacccom.mk b/winaccessibility/Library_uacccom.mk
index 749be7c..b3b91ce 100755
--- a/winaccessibility/Library_uacccom.mk
+++ b/winaccessibility/Library_uacccom.mk
@@ -37,21 +37,20 @@ $(eval $(call gb_Library_add_exception_objects,UAccCOM,\
winaccessibility/source/UAccCOM/AccHypertext \
winaccessibility/source/UAccCOM/AccImage \
winaccessibility/source/UAccCOM/AccRelation \
+ winaccessibility/source/UAccCOM/AccTable \
winaccessibility/source/UAccCOM/AccText \
+ winaccessibility/source/UAccCOM/AccTextBase \
winaccessibility/source/UAccCOM/AccValue \
+ winaccessibility/source/UAccCOM/CheckEnableAccessible \
winaccessibility/source/UAccCOM/EnumVariant \
+ winaccessibility/source/UAccCOM/MAccessible \
winaccessibility/source/UAccCOM/StdAfx \
winaccessibility/source/UAccCOM/UAccCOM \
winaccessibility/source/UAccCOM/UNOXWrapper \
))
-# winaccessibility/source/UAccCOM/AccTextBase \
-# winaccessibility/source/UAccCOM/AccTable \
-# winaccessibility/source/UAccCOM/MAccessible \
-
-# /DEF:$(SRCDIR)/winaccessibility/source/UAccCOM/UAccCOM.def \
-
$(eval $(call gb_Library_add_ldflags,UAccCOM,\
+ /DEF:$(SRCDIR)/winaccessibility/source/UAccCOM/UAccCOM.def \
-LIBPATH:$(ATL_LIB) \
-delayload:$(call gb_Library_get_filename,cppu) \
-delayload:$(call gb_Library_get_filename,sal) \
@@ -64,6 +63,7 @@ $(eval $(call gb_Library_use_libraries,UAccCOM,\
))
$(eval $(call gb_Library_use_externals,UAccCOM,\
+ boost_headers \
icuuc \
icui18n \
))
diff --git a/winaccessibility/Library_winaccessibility.mk b/winaccessibility/Library_winaccessibility.mk
new file mode 100755
index 0000000..0f1558c
--- /dev/null
+++ b/winaccessibility/Library_winaccessibility.mk
@@ -0,0 +1,81 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#
+
+$(eval $(call gb_Library_Library,winaccessibility))
+
+$(eval $(call gb_Library_use_custom_headers,winaccessibility,winaccessibility/ia2/idl))
+
+$(eval $(call gb_Library_set_include,winaccessibility,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/winaccessibility/inc \
+ $(foreach i,$(ATL_INCLUDE), -I$(i)) \
+))
+
+$(eval $(call gb_Library_use_sdk_api,winaccessibility))
+
+$(eval $(call gb_Library_set_componentfile,winaccessibility,winaccessibility/source/service/winaccessibility))
+
+$(eval $(call gb_Library_add_exception_objects,winaccessibility,\
+ winaccessibility/source/service/AccObject \
+ winaccessibility/source/service/ResIDGenerator \
+ winaccessibility/source/service/AccObjectWinManager \
+ winaccessibility/source/service/AccObjectManagerAgent \
+ winaccessibility/source/service/AccEventListener \
+ winaccessibility/source/service/AccComponentEventListener \
+ winaccessibility/source/service/AccContainerEventListener \
+ winaccessibility/source/service/AccDialogEventListener \
+ winaccessibility/source/service/AccFrameEventListener \
+ winaccessibility/source/service/AccWindowEventListener \
+ winaccessibility/source/service/AccMenuEventListener \
+ winaccessibility/source/service/AccTextComponentEventListener \
+ winaccessibility/source/service/AccObjectContainerEventListener \
+ winaccessibility/source/service/AccParagraphEventListener \
+ winaccessibility/source/service/AccDescendantManagerEventListener \
+ winaccessibility/source/service/AccListEventListener \
+ winaccessibility/source/service/AccTableEventListener \
+ winaccessibility/source/service/AccTreeEventListener \
+ winaccessibility/source/service/AccTopWindowListener \
+ winaccessibility/source/service/msaaservice_impl \
+ winaccessibility/source/service/AccResource \
+ winaccessibility/source/service/checkmt \
+))
+
+$(eval $(call gb_Library_use_externals,winaccessibility,\
+ boost_headers \
+))
+
+$(eval $(call gb_Library_use_libraries,winaccessibility,\
+ cppu \
+ cppuhelper \
+ vcl \
+ sal \
+ tk \
+ uwinapi \
+ tl \
+))
+
+$(eval $(call gb_Library_use_system_win32_libs,winaccessibility,\
+ oleacc \
+ advapi32 \
+ delayimp \
+ kernel32 \
+ ole32 \
+ oleaut32 \
+ shlwapi \
+ user32 \
+ uuid \
+ gdi32 \
+ shell32 \
+ imm32 \
+ winspool \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/winaccessibility/Module_winaccessibility.mk b/winaccessibility/Module_winaccessibility.mk
index e96f988..b4945cf 100755
--- a/winaccessibility/Module_winaccessibility.mk
+++ b/winaccessibility/Module_winaccessibility.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_Module_add_targets,winaccessibility,\
WinResTarget_uacccom \
CustomTarget_ia2_idl \
Library_uacccom \
+ Library_winaccessibility \
))
endif # ENABLE_IA2
endif # COM=MSC
diff --git a/winaccessibility/inc/AccEventListener.hxx b/winaccessibility/inc/AccEventListener.hxx
old mode 100644
new mode 100755
index 06801da..5978ddd
--- a/winaccessibility/inc/AccEventListener.hxx
+++ b/winaccessibility/inc/AccEventListener.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <cppuhelper/weak.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
class AccObjectManagerAgent;
using namespace ::com::sun::star::uno;
@@ -45,7 +45,7 @@ protected:
AccObjectManagerAgent* pAgent;
//disposed state indicator
bool m_isDisposed;
- mutable ::vos::OMutex aRemoveMutex;
+ mutable ::osl::Mutex aRemoveMutex;
public:
AccEventListener( com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
virtual ~AccEventListener();
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx
old mode 100644
new mode 100755
index 945e86c..800c927
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -25,7 +25,7 @@
#endif
#include <map>
#include <windows.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/dllapi.h>
#include "ResIDGenerator.hxx"
#include "UAccCOM2.h"
@@ -93,9 +93,9 @@ private:
AccObjectManagerAgent* pAgent;
static AccObjectWinManager* me;
ResIDGenerator ResIdGen;
- mutable ::vos::OMutex aDeleteMutex;
- mutable ::vos::OMutex aNotifyMutex;
- mutable ::vos::OMutex maATInterfaceMutex;
+ mutable ::osl::Mutex aDeleteMutex;
+ mutable ::osl::Mutex aNotifyMutex;
+ mutable ::osl::Mutex maATInterfaceMutex;
AccObjectWinManager(AccObjectManagerAgent* Agent=NULL);
diff --git a/winaccessibility/source/UAccCOM/UAccCOM.cxx b/winaccessibility/source/UAccCOM/UAccCOM.cxx
old mode 100644
new mode 100755
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list