diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2013-11-18 15:41:26 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2013-11-19 10:02:27 +0000 |
commit | 448727e598ca0c35ee9cd6f2c25a847c8147943b (patch) | |
tree | 7379fabae33030487350fc58286e2aa95f5c9349 /winaccessibility/source/service/AccObject.cxx | |
parent | fd035fe61604042609c21aba06eb2d8ffed32dda (diff) |
uia: merge VCL pieces of IAccessible2 work.
Original code from:
Author: Steve Yin <steve_y@apache.org>
Date: Sat Nov 16 23:58:19 2013 +0100
Integrate branch of IAccessible2
With these improvements:
Make IAccessible2 an experimental feature, with fallback to Java a11y.
Move initial setup of windows into the bridge and clean, remove conditionals
Check for presence of AT in the bridge as well to clean. Merge VCL events
extensions and their handling. Clean and split WB_GETOBJECT handling out to
it's own method. Add component prefix namespacing.
Cleanup msaa service info, and implement XComponent to share mxAccessBridge.
Add suitable debugging output, remove VCL dependency from UAccCOM causing
registration issues.
Change-Id: Ib19e38ddca71182018df438df27dcdb555d91402
Diffstat (limited to 'winaccessibility/source/service/AccObject.cxx')
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 300ebce7355c..ad6b1811d190 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; |