LibreOffice Module winaccessibility (master) 1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CMAccessible Class Reference

This class implements IMAccessible interface, which inherits from IAccessible2, and in turn inherits from IAccessible. More...

#include <MAccessible.h>

Inheritance diagram for CMAccessible:
[legend]
Collaboration diagram for CMAccessible:
[legend]

Public Member Functions

 CMAccessible ()
 
virtual ~CMAccessible ()
 
STDMETHOD() put_accValue (VARIANT varChild, BSTR szValue) override
 Set the accessible value of the current COM object self or its one child from UNO. More...
 
STDMETHOD() put_accName (VARIANT varChild, BSTR szName) override
 No longer supported according to IAccessible doc. More...
 
STDMETHOD() accDoDefaultAction (VARIANT varChild) override
 AT call this method to operate application. More...
 
STDMETHOD() accHitTest (long xLeft, long yTop, VARIANT *pvarChild) override
 
STDMETHOD() accNavigate (long navDir, VARIANT varStart, VARIANT *pvarEndUpAt) override
 Returns the current focused child to AT. More...
 
STDMETHOD() accLocation (long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight, VARIANT varChild) override
 Returns the location of the current COM object self or its one child to AT. More...
 
STDMETHOD() accSelect (long flagsSelect, VARIANT varChild) override
 accSelect method has many optional flags, needs to process comprehensively Mozilla and Microsoft do not implement SELFLAG_EXTENDSELECTION flag. More...
 
STDMETHOD() get_accDefaultAction (VARIANT varChild, BSTR *pszDefaultAction) override
 This method is called when AT open some UI elements initially the UI element takes the default action defined here. More...
 
STDMETHOD() get_accSelection (VARIANT *pvarChildren) override
 Returns the selection of the current COM object to AT. More...
 
STDMETHOD() get_accFocus (VARIANT *pvarChild) override
 Returns the current focused child to AT. More...
 
STDMETHOD() get_accKeyboardShortcut (VARIANT varChild, BSTR *pszKeyboardShortcut) override
 Returns the accessible keyboard shortcut of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accHelpTopic (BSTR *pszHelpFile, VARIANT varChild, long *pidTopic) override
 Returns the accessible HelpTopic of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accHelp (VARIANT varChild, BSTR *pszHelp) override
 Returns the accessible helpString of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accState (VARIANT varChild, VARIANT *pvarState) override
 Returns the accessible state of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accRole (VARIANT varChild, VARIANT *pvarRole) override
 Returns the accessible role of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accDescription (VARIANT varChild, BSTR *pszDescription) override
 Returns the accessible description of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accValue (VARIANT varChild, BSTR *pszValue) override
 Returns the accessible value of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accName (VARIANT varChild, BSTR *pszName) override
 Returns the accessible name of the current COM object self or its one child to AT. More...
 
STDMETHOD() get_accChild (VARIANT varChild, IDispatch **ppdispChild) override
 Returns child interface pointer for AT according to input child ID. More...
 
STDMETHOD() get_accChildCount (long *pcountChildren) override
 Returns child count of current COM object. More...
 
STDMETHOD() get_accParent (IDispatch **ppdispParent) override
 Returns the Parent IAccessible interface pointer to AT. More...
 
STDMETHOD() get_nRelations (long __RPC_FAR *nRelations) override
 For IAccessible2 implementation methods. More...
 
STDMETHOD() get_relation (long relationIndex, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation) override
 
STDMETHOD() get_relations (long maxRelations, IAccessibleRelation __RPC_FAR *__RPC_FAR *relation, long __RPC_FAR *nRelations) override
 
STDMETHOD() role (long __RPC_FAR *role) override
 
STDMETHOD() get_nActions (long __RPC_FAR *nActions)
 
STDMETHOD() scrollTo (enum IA2ScrollType scrollType) override
 
STDMETHOD() scrollToPoint (enum IA2CoordinateType coordinateType, long x, long y) override
 
STDMETHOD() get_groupPosition (long __RPC_FAR *groupLevel, long __RPC_FAR *similarItemsInGroup, long __RPC_FAR *positionInGroup) override
 
STDMETHOD() get_states (AccessibleStates __RPC_FAR *states) override
 
STDMETHOD() get_extendedRole (BSTR __RPC_FAR *extendedRole) override
 
STDMETHOD() get_localizedExtendedRole (BSTR __RPC_FAR *localizedExtendedRole) override
 
STDMETHOD() get_nExtendedStates (long __RPC_FAR *nExtendedStates) override
 
STDMETHOD() get_extendedStates (long maxExtendedStates, BSTR __RPC_FAR *__RPC_FAR *extendedStates, long __RPC_FAR *nExtendedStates) override
 
STDMETHOD() get_localizedExtendedStates (long maxLocalizedExtendedStates, BSTR __RPC_FAR *__RPC_FAR *localizedExtendedStates, long __RPC_FAR *nLocalizedExtendedStates) override
 
STDMETHOD() get_uniqueID (long __RPC_FAR *uniqueID) override
 
STDMETHOD() get_windowHandle (HWND __RPC_FAR *windowHandle) override
 
STDMETHOD() get_indexInParent (long __RPC_FAR *accParentIndex) override
 
STDMETHOD() get_locale (IA2Locale __RPC_FAR *locale) override
 
STDMETHOD() get_attributes (BSTR *pAttr) override
 
STDMETHOD() QueryService (REFGUID guidService, REFIID riid, void **ppvObject) override
 Get The other Interface from CMAccessible. More...
 
STDMETHOD() get_appName (BSTR __RPC_FAR *name) override
 
STDMETHOD() get_appVersion (BSTR __RPC_FAR *version) override
 
STDMETHOD() get_toolkitName (BSTR __RPC_FAR *name) override
 
STDMETHOD() get_toolkitVersion (BSTR __RPC_FAR *version) override
 
STDMETHOD() Put_XAccName (const OLECHAR __RPC_FAR *pszName) override
 Set the accessible name of the current COM object self from UNO. More...
 
STDMETHOD() Put_XAccRole (unsigned short pRole) override
 Set the accessible role of the current COM object self from UNO. More...
 
STDMETHOD() DecreaseState (DWORD pXSate) override
 Add one state into the current state set for the current COM object from UNO. More...
 
STDMETHOD() IncreaseState (DWORD pXSate) override
 Delete one state into the current state set for the current COM object from UNO. More...
 
STDMETHOD() SetState (DWORD pXSate) override
 Set state into the current state set for the current COM object from UNO. More...
 
STDMETHOD() Put_XAccValue (const OLECHAR __RPC_FAR *pszAccValue) override
 Set the accessible value of the current COM object self from UNO. More...
 
STDMETHOD() Put_XAccFocus (long dChildID) override
 Set accessible focus by specifying child ID. More...
 
STDMETHOD() Put_XAccParent (IMAccessible __RPC_FAR *pIParent) override
 Set accessible parent object for the current COM object if the current object is a child of some COM object. More...
 
STDMETHOD() Put_XAccWindowHandle (HWND hwnd) override
 Set the HWND value of the current COM object self from UNO. More...
 
STDMETHOD() Put_XAccChildID (long dChildID) override
 Set unique child id to COM. More...
 
STDMETHOD() Put_XAccAgent (hyper pAgent) override
 Set AccObjectManagerAgent object pointer to COM. More...
 
STDMETHOD() NotifyDestroy () override
 When a UNO control disposing, it disposes its listeners, then notify AccObject in bridge management, then notify COM that the XAccessible is invalid, so set m_xAccessible as NULL. More...
 
STDMETHOD() Put_ActionDescription (const OLECHAR *szAction) override
 UNO set description information for action to COM. More...
 
STDMETHOD() SetDefaultAction (hyper pAction) override
 Helper method for Implementation of get_accDefaultAction. More...
 
STDMETHOD() GetUNOInterface (hyper *) override
 Return XAccessible interface pointer when needed. More...
 
STDMETHOD() SetXAccessible (hyper) override
 When COM is created, UNO set XAccessible pointer to it in order to COM can operate UNO information. More...
 

Static Public Member Functions

static bool get_IAccessibleFromXAccessible (css::accessibility::XAccessible *pXAcc, IAccessible **ppIA)
 
static HRESULT WINAPI SmartQI_ (void *pv, REFIID iid, void **ppvObject, DWORD_PTR)
 
static OUString get_StringFromAny (css::uno::Any const &pAny)
 
static OUString get_String4Numbering (const css::uno::Any &pAny, sal_Int16 numberingLevel, std::u16string_view numberingPrefix)
 
static void ConvertAnyToVariant (const css::uno::Any &rAnyVal, VARIANT *pvData)
 

Public Attributes

XGUIDToComObjHash m_containedObjects
 

Static Public Attributes

static AccObjectManagerAgentg_pAgent = nullptr
 

Private Types

typedef ::std::map< const GUID, CComPtr< IUnknown >, ltCompXGUIDToComObjHash
 

Private Member Functions

IMAccessibleGetChildInterface (long dChildIndex)
 private methods that help implement public functions More...
 
IMAccessibleGetNavigateChildForDM (VARIANT varCur, short flags)
 for descendantmanager circumstance,provide child interface when navigate More...
 
HRESULT GetFirstChild (VARIANT varStart, VARIANT *pvarEndUpAt)
 the following 4 private methods are for accNavigate implementation More...
 
HRESULT GetLastChild (VARIANT varStart, VARIANT *pvarEndUpAt)
 Return last child for parent container, process differently according to whether it is descendant manage. More...
 
HRESULT GetNextSibling (VARIANT varStart, VARIANT *pvarEndUpAt)
 The method GetNextSibling is general, whatever it is descendant manage or not Get the next sibling object. More...
 
HRESULT GetPreSibling (VARIANT varStart, VARIANT *pvarEndUpAt)
 the method GetPreSibling is general, whatever it is descendant manage or not More...
 
HRESULT WINAPI SmartQI (void *pv, REFIID iid, void **ppvObject)
 

Static Private Member Functions

static css::accessibility::XAccessibleContext * GetContextByXAcc (css::accessibility::XAccessible *pXAcc)
 Get XAccessibleContext directly from UNO by the stored XAccessible pointer. More...
 
static bool GetXInterfaceFromXAccessible (css::accessibility::XAccessible *, css::uno::XInterface **, XInterfaceType)
 

Private Attributes

BSTR m_pszName
 
BSTR m_pszValue
 
BSTR m_pszActionDescription
 
unsigned short m_iRole
 
DWORD m_dState
 
IMAccessiblem_pIParent
 
long m_dChildID
 
long m_dFocusChildID
 
HWND m_hwnd
 
CEnumVariantm_pEnumVar
 
bool m_isDestroy
 
css::uno::Reference< css::accessibility::XAccessible > m_xAccessible
 
css::uno::Reference< css::accessibility::XAccessibleAction > m_xAction
 
css::uno::Reference< css::accessibility::XAccessibleContext > m_xContext
 

Additional Inherited Members

- Properties inherited from IAccessibleApplication
BSTR appName [get]
 Returns the application name. More...
 
BSTR appVersion [get]
 Returns the application version. More...
 
BSTR toolkitName [get]
 Returns the toolkit/bridge name. More...
 
BSTR toolkitVersion [get]
 Returns the toolkit/bridge version. More...
 

Detailed Description

This class implements IMAccessible interface, which inherits from IAccessible2, and in turn inherits from IAccessible.

So its methods include the methods defined only in IAccessible, plus the methods defined only in IAccessible2, plus the methods defined only in IMAccessible.

Definition at line 44 of file MAccessible.h.

Member Typedef Documentation

◆ XGUIDToComObjHash

typedef ::std::map<const GUID, CComPtr<IUnknown>, ltComp> CMAccessible::XGUIDToComObjHash
private

Definition at line 51 of file MAccessible.h.

Constructor & Destructor Documentation

◆ CMAccessible()

CMAccessible::CMAccessible ( )

Definition at line 183 of file MAccessible.cxx.

References CEnumVariant::Create(), m_containedObjects, and m_pEnumVar.

◆ ~CMAccessible()

CMAccessible::~CMAccessible ( )
virtual

Member Function Documentation

◆ accDoDefaultAction()

COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CMAccessible::accDoDefaultAction ( VARIANT  varChild)
override

AT call this method to operate application.

Parameters
varChild,thechild id of the action object.
Returns
S_OK if successful.

Definition at line 2259 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, m_xAction, and VT_I4.

◆ accHitTest()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accHitTest ( long  xLeft,
long  yTop,
VARIANT *  pvarChild 
)
override

◆ accLocation()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accLocation ( long *  pxLeft,
long *  pyTop,
long *  pcxWidth,
long *  pcyHeight,
VARIANT  varChild 
)
override

Returns the location of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pxLeft,[in,out]use to return the x-coordination of the proper object.
pyTop,[in,out]use to return the y-coordination of the proper object.
pcxWidth,[in,out]use to return the x-coordination width of the proper object.
pcyHeight,[in,out]use to return the y-coordination height of the proper object.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 878 of file MAccessible.cxx.

References m_isDestroy, m_xAccessible, and VT_I4.

Referenced by accHitTest().

◆ accNavigate()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accNavigate ( long  navDir,
VARIANT  varStart,
VARIANT *  pvarEndUpAt 
)
override

Returns the current focused child to AT.

Parameters
navDir,thedirection flag of the navigation.
varStart,thestart child id of this navigation action.
pvarEndUpAt,[in,out]the end up child of this navigation action.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 926 of file MAccessible.cxx.

References GetFirstChild(), GetLastChild(), GetNextSibling(), GetPreSibling(), and m_isDestroy.

◆ accSelect()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accSelect ( long  flagsSelect,
VARIANT  varChild 
)
override

accSelect method has many optional flags, needs to process comprehensively Mozilla and Microsoft do not implement SELFLAG_EXTENDSELECTION flag.

The implementation of this flag is a little trouble-shooting,so we also do not implement it now

Parameters
flagsSelect,theselection flag of the select action.
varChild,thechild object pointer of current action.
Returns
S_OK if successful.

Definition at line 2092 of file MAccessible.cxx.

References GetChildInterface(), IMAccessible::GetUNOInterface(), m_isDestroy, and VT_I4.

◆ ConvertAnyToVariant()

void CMAccessible::ConvertAnyToVariant ( const css::uno::Any &  rAnyVal,
VARIANT *  pvData 
)
static

◆ DecreaseState()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::DecreaseState ( DWORD  pXSate)
override

Add one state into the current state set for the current COM object from UNO.

Parameters
pXSate,thestate used to set the name of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1123 of file MAccessible.cxx.

References m_dState.

◆ get_accChild()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accChild ( VARIANT  varChild,
IDispatch **  ppdispChild 
)
override

Returns child interface pointer for AT according to input child ID.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
ppdispChild,[in,out]use to return the child interface point.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 313 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, and VT_I4.

◆ get_accChildCount()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accChildCount ( long *  pcountChildren)
override

Returns child count of current COM object.

Parameters
pcountChildren[in,out] used to return the children count.
Returns
S_OK if successful.

Definition at line 271 of file MAccessible.cxx.

References m_isDestroy, m_xAccessible, and SAL_WARN.

◆ get_accDefaultAction()

COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CMAccessible::get_accDefaultAction ( VARIANT  varChild,
BSTR *  pszDefaultAction 
)
override

This method is called when AT open some UI elements initially the UI element takes the default action defined here.

Parameters
varChild,thechild id of the defaultaction.
pszDefaultAction,[in/out]the description of the current action.
Returns
S_OK if successful.

Definition at line 2220 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, m_pszActionDescription, m_xAction, and VT_I4.

◆ get_accDescription()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accDescription ( VARIANT  varChild,
BSTR *  pszDescription 
)
override

Returns the accessible description of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszDescription,[in,out]use to return the description of the proper object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 435 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, m_xAccessible, and VT_I4.

◆ get_accFocus()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accFocus ( VARIANT *  pvarChild)
override

Returns the current focused child to AT.

Parameters
pvarChild,[in,out]vt member of pvarChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 783 of file MAccessible.cxx.

References g_pAgent, AccObjectManagerAgent::GetIAccessibleFromResID(), m_dFocusChildID, m_isDestroy, UACC_NO_FOCUS, and VT_EMPTY.

◆ get_accHelp()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accHelp ( VARIANT  varChild,
BSTR *  pszHelp 
)
override

Returns the accessible helpString of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszHelp,[in,out]use to return the helpString of the proper object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 589 of file MAccessible.cxx.

◆ get_accHelpTopic()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accHelpTopic ( BSTR *  pszHelpFile,
VARIANT  varChild,
long *  pidTopic 
)
override

Returns the accessible HelpTopic of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszHelpFile,[in,out]use to return the HelpTopic of the proper object.
pidTopic,useto return the HelpTopic ID of the proper object.
Returns
S_OK if successful and E_FAIL if failure. Not implemented yet

Definition at line 603 of file MAccessible.cxx.

◆ get_accKeyboardShortcut()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accKeyboardShortcut ( VARIANT  varChild,
BSTR *  pszKeyboardShortcut 
)
override

Returns the accessible keyboard shortcut of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszKeyboardShortcut,[in,out]use to return the kbshortcut of the proper object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 630 of file MAccessible.cxx.

References GetChildInterface(), comphelper::GetkeyBindingStrByXkeyBinding(), GetMnemonicChar(), i, m_iRole, m_isDestroy, m_pIParent, m_xAccessible, nCount, and VT_I4.

◆ get_accName()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accName ( VARIANT  varChild,
BSTR *  pszName 
)
override

Returns the accessible name of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszName,[in,out]use to return the name of the proper object.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 351 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, m_pszName, and VT_I4.

◆ get_accParent()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accParent ( IDispatch **  ppdispParent)
override

Returns the Parent IAccessible interface pointer to AT.

It should add reference, and the client should release the component. It should return E_FAIL when the parent point is null.

Parameters
ppdispParent[in,out] used to return the parent interface point. when the point is null, should return null.
Returns
S_OK if successful and E_FAIL if the m_pIParent is NULL.

Definition at line 234 of file MAccessible.cxx.

References hr, m_hwnd, m_isDestroy, and m_pIParent.

◆ get_accRole()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accRole ( VARIANT  varChild,
VARIANT *  pvarRole 
)
override

Returns the accessible role of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pvarRole,[in,out]use to return the role of the proper object.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 482 of file MAccessible.cxx.

References GetChildInterface(), IA2_ROLE_CAPTION, m_iRole, m_isDestroy, and VT_I4.

◆ get_accSelection()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accSelection ( VARIANT *  pvarChildren)
override

Returns the selection of the current COM object to AT.

Parameters
pvarChildren,[in,out]if selection num is 0,return VT_EMPTY for vt, if selection num is 1,return VT_I4 for vt,and child index for lVal if selection num >1,return VT_UNKNOWN for vt, and IEnumVariant* for punkVal
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 826 of file MAccessible.cxx.

References CEnumVariant::Clone(), count, CEnumVariant::GetCountOfElements(), m_isDestroy, m_pEnumVar, CEnumVariant::Next(), CEnumVariant::Reset(), and VT_EMPTY.

◆ get_accState()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accState ( VARIANT  varChild,
VARIANT *  pvarState 
)
override

Returns the accessible state of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pvarState,[in,out]use to return the state of the proper object.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 529 of file MAccessible.cxx.

References GetChildInterface(), m_dState, m_isDestroy, m_xAccessible, and VT_I4.

◆ get_accValue()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accValue ( VARIANT  varChild,
BSTR *  pszValue 
)
override

Returns the accessible value of the current COM object self or its one child to AT.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
pszValue,[in,out]use to return the value of the proper object.
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 390 of file MAccessible.cxx.

References GetChildInterface(), m_dState, m_isDestroy, m_pszValue, and VT_I4.

◆ get_appName()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_appName ( BSTR __RPC_FAR *  name)
override

Definition at line 2887 of file MAccessible.cxx.

References utl::ConfigManager::getProductName(), m_isDestroy, and name.

◆ get_appVersion()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_appVersion ( BSTR __RPC_FAR *  version)
override

Definition at line 2901 of file MAccessible.cxx.

References utl::ConfigManager::getProductVersion(), and m_isDestroy.

Referenced by get_toolkitVersion().

◆ get_attributes()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_attributes ( BSTR *  pAttr)
override

Definition at line 2932 of file MAccessible.cxx.

References m_isDestroy, and m_xAccessible.

◆ get_extendedRole()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_extendedRole ( BSTR __RPC_FAR *  extendedRole)
override

Definition at line 2821 of file MAccessible.cxx.

◆ get_extendedStates()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_extendedStates ( long  maxExtendedStates,
BSTR __RPC_FAR *__RPC_FAR *  extendedStates,
long __RPC_FAR *  nExtendedStates 
)
override

Definition at line 1993 of file MAccessible.cxx.

◆ get_groupPosition()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition ( long __RPC_FAR *  groupLevel,
long __RPC_FAR *  similarItemsInGroup,
long __RPC_FAR *  positionInGroup 
)
override

Definition at line 1811 of file MAccessible.cxx.

References Any, COMBO_BOX, getTheParentOfMember(), i, index, LIST, m_isDestroy, and m_xAccessible.

◆ get_IAccessibleFromXAccessible()

bool CMAccessible::get_IAccessibleFromXAccessible ( css::accessibility::XAccessible *  pXAcc,
IAccessible **  ppIA 
)
static

◆ get_indexInParent()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_indexInParent ( long __RPC_FAR *  accParentIndex)
override

Definition at line 2843 of file MAccessible.cxx.

References m_isDestroy, m_xContext, nIndex, and SAL_WARN.

◆ get_locale()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_locale ( IA2Locale __RPC_FAR *  locale)
override

Definition at line 2867 of file MAccessible.cxx.

References m_isDestroy, and m_xContext.

◆ get_localizedExtendedRole()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_localizedExtendedRole ( BSTR __RPC_FAR *  localizedExtendedRole)
override

Definition at line 2826 of file MAccessible.cxx.

◆ get_localizedExtendedStates()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_localizedExtendedStates ( long  maxLocalizedExtendedStates,
BSTR __RPC_FAR *__RPC_FAR *  localizedExtendedStates,
long __RPC_FAR *  nLocalizedExtendedStates 
)
override

Definition at line 2837 of file MAccessible.cxx.

◆ get_nActions()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nActions ( long __RPC_FAR *  nActions)

Definition at line 1748 of file MAccessible.cxx.

References hr, m_isDestroy, and IAccessibleAction::nActions().

◆ get_nExtendedStates()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nExtendedStates ( long __RPC_FAR *  nExtendedStates)
override

Definition at line 2831 of file MAccessible.cxx.

◆ get_nRelations()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nRelations ( long __RPC_FAR *  nRelations)
override

For IAccessible2 implementation methods.

Definition at line 1580 of file MAccessible.cxx.

References m_isDestroy, and m_xContext.

Referenced by get_relation().

◆ get_relation()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_relation ( long  relationIndex,
IAccessibleRelation __RPC_FAR *__RPC_FAR *  relation 
)
override

◆ get_relations()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_relations ( long  maxRelations,
IAccessibleRelation __RPC_FAR *__RPC_FAR *  relation,
long __RPC_FAR *  nRelations 
)
override

Definition at line 1673 of file MAccessible.cxx.

References hr, i, m_isDestroy, m_xContext, nCount, and IUNOXWrapper::put_XSubInterface().

◆ get_states()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_states ( AccessibleStates __RPC_FAR *  states)
override

Definition at line 2793 of file MAccessible.cxx.

References IA2_STATES, m_isDestroy, m_xContext, SAL_N_ELEMENTS, and UNO_STATES.

◆ get_String4Numbering()

OUString CMAccessible::get_String4Numbering ( const css::uno::Any &  pAny,
sal_Int16  numberingLevel,
std::u16string_view  numberingPrefix 
)
static

Definition at line 2621 of file MAccessible.cxx.

References Any, and get_StringFromAny().

◆ get_StringFromAny()

OUString CMAccessible::get_StringFromAny ( css::uno::Any const &  pAny)
static

Definition at line 2468 of file MAccessible.cxx.

Referenced by get_String4Numbering().

◆ get_toolkitName()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_toolkitName ( BSTR __RPC_FAR *  name)
override

Definition at line 2914 of file MAccessible.cxx.

References m_isDestroy, and name.

◆ get_toolkitVersion()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_toolkitVersion ( BSTR __RPC_FAR *  version)
override

Definition at line 2926 of file MAccessible.cxx.

References get_appVersion().

◆ get_uniqueID()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_uniqueID ( long __RPC_FAR *  uniqueID)
override

Definition at line 1999 of file MAccessible.cxx.

References m_dChildID, and m_isDestroy.

◆ get_windowHandle()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_windowHandle ( HWND __RPC_FAR *  windowHandle)
override

Definition at line 2016 of file MAccessible.cxx.

References m_hwnd, m_isDestroy, and m_pIParent.

◆ GetChildInterface()

IMAccessible * CMAccessible::GetChildInterface ( long  dChildID)
private

private methods that help implement public functions

Return child interface pointer by child ID,note: need to call AddRef()

Parameters
lChildID,specifychild index,which AT(such as Inspect32) gives.
Returns
IMAccessible*, pointer to the corresponding child object.

Definition at line 1302 of file MAccessible.cxx.

References g_pAgent, get_IAccessibleFromXAccessible(), AccObjectManagerAgent::GetIAccessibleFromResID(), AccObjectManagerAgent::InsertAccObj(), m_hwnd, and m_xAccessible.

Referenced by accDoDefaultAction(), accHitTest(), accSelect(), get_accChild(), get_accDefaultAction(), get_accDescription(), get_accKeyboardShortcut(), get_accName(), get_accRole(), get_accState(), get_accValue(), GetNavigateChildForDM(), and put_accValue().

◆ GetContextByXAcc()

XAccessibleContext * CMAccessible::GetContextByXAcc ( css::accessibility::XAccessible *  pXAcc)
staticprivate

Get XAccessibleContext directly from UNO by the stored XAccessible pointer.

Parameters
pXAcc,UNOXAccessible object point.
Returns
XAccessibleContext*, the context of the pXAcc.

Definition at line 2052 of file MAccessible.cxx.

Referenced by accHitTest(), GetNavigateChildForDM(), GetNextSibling(), and GetPreSibling().

◆ GetFirstChild()

HRESULT CMAccessible::GetFirstChild ( VARIANT  varStart,
VARIANT *  pvarEndUpAt 
)
private

the following 4 private methods are for accNavigate implementation

Return first child for parent container, process differently according to whether it is descendant manage

Parameters
varStart,thestart child id of this navigation action.
pvarEndUpAt,[in,out]the end up child of this navigation action.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1435 of file MAccessible.cxx.

References DM_FIRSTCHILD, GetNavigateChildForDM(), m_isDestroy, VT_EMPTY, and VT_I4.

Referenced by accNavigate().

◆ GetLastChild()

HRESULT CMAccessible::GetLastChild ( VARIANT  varStart,
VARIANT *  pvarEndUpAt 
)
private

Return last child for parent container, process differently according to whether it is descendant manage.

Parameters
varStart,thestart child id of this navigation action.
pvarEndUpAt,[in,out]the end up child of this navigation action.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1472 of file MAccessible.cxx.

References DM_LASTCHILD, GetNavigateChildForDM(), m_isDestroy, VT_EMPTY, and VT_I4.

Referenced by accNavigate().

◆ GetNavigateChildForDM()

IMAccessible * CMAccessible::GetNavigateChildForDM ( VARIANT  varCur,
short  flags 
)
private

for descendantmanager circumstance,provide child interface when navigate

Parameters
varCur,thecurrent child.
flags,thenavigation direction.
Returns
IMAccessible*, the child of the end up node.

Definition at line 1353 of file MAccessible.cxx.

References count, DM_FIRSTCHILD, DM_LASTCHILD, DM_NEXTCHILD, DM_PREVCHILD, g_pAgent, GetChildInterface(), GetContextByXAcc(), AccObjectManagerAgent::GetIMAccByXAcc(), IMAccessible::GetUNOInterface(), index, AccObjectManagerAgent::InsertAccObj(), and m_xAccessible.

Referenced by GetFirstChild(), and GetLastChild().

◆ GetNextSibling()

HRESULT CMAccessible::GetNextSibling ( VARIANT  varStart,
VARIANT *  pvarEndUpAt 
)
private

The method GetNextSibling is general, whatever it is descendant manage or not Get the next sibling object.

Parameters
varStart,thestart child id of this navigation action.
pvarEndUpAt,[in,out]the end up child of this navigation action.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1508 of file MAccessible.cxx.

References GetContextByXAcc(), m_isDestroy, m_pIParent, m_xAccessible, VT_EMPTY, and VT_I4.

Referenced by accNavigate().

◆ GetPreSibling()

HRESULT CMAccessible::GetPreSibling ( VARIANT  varStart,
VARIANT *  pvarEndUpAt 
)
private

the method GetPreSibling is general, whatever it is descendant manage or not

Parameters
varStart,thestart child id of this navigation action.
pvarEndUpAt,[in,out]the end up child of this navigation action.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1543 of file MAccessible.cxx.

References GetContextByXAcc(), m_isDestroy, m_pIParent, m_xAccessible, VT_EMPTY, and VT_I4.

Referenced by accNavigate().

◆ GetUNOInterface()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::GetUNOInterface ( hyper *  pXAcc)
override

Return XAccessible interface pointer when needed.

Parameters
pXAcc,[in,out]the Uno interface of the current object.
Returns
S_OK if successful.

Definition at line 2189 of file MAccessible.cxx.

References m_xAccessible.

◆ GetXInterfaceFromXAccessible()

bool CMAccessible::GetXInterfaceFromXAccessible ( css::accessibility::XAccessible *  ,
css::uno::XInterface **  ,
XInterfaceType   
)
staticprivate

Definition at line 2312 of file MAccessible.cxx.

References eType.

Referenced by SmartQI().

◆ IncreaseState()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::IncreaseState ( DWORD  pXSate)
override

Delete one state into the current state set for the current COM object from UNO.

Parameters
pXSate,thestate used to set the name of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1136 of file MAccessible.cxx.

References m_dState.

◆ NotifyDestroy()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::NotifyDestroy ( )
override

When a UNO control disposing, it disposes its listeners, then notify AccObject in bridge management, then notify COM that the XAccessible is invalid, so set m_xAccessible as NULL.

Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1284 of file MAccessible.cxx.

References m_isDestroy, and m_xAccessible.

◆ put_accName()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName ( VARIANT  varChild,
BSTR  szName 
)
override

No longer supported according to IAccessible doc.

Servers should return E_NOTIMPL

Definition at line 1040 of file MAccessible.cxx.

◆ put_accValue()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accValue ( VARIANT  varChild,
BSTR  szValue 
)
override

Set the accessible value of the current COM object self or its one child from UNO.

Parameters
varChild,vtmember of varChild must be VT_I4,and lVal member stores the child ID, the child ID specify child index from 0 to children count, 0 stands for object self.
szValue,thevalue used to set the value of the proper object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1052 of file MAccessible.cxx.

References GetChildInterface(), m_isDestroy, m_pszValue, and VT_I4.

◆ Put_ActionDescription()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_ActionDescription ( const OLECHAR *  szAction)
override

UNO set description information for action to COM.

Parameters
szAction,theaction description of the current object.
Returns
S_OK if successful.

Definition at line 2294 of file MAccessible.cxx.

References m_isDestroy, and m_pszActionDescription.

◆ Put_XAccAgent()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccAgent ( hyper  pAgent)
override

Set AccObjectManagerAgent object pointer to COM.

Parameters
pAgent,theAccObjectManagerAgent point.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1270 of file MAccessible.cxx.

References g_pAgent.

◆ Put_XAccChildID()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccChildID ( long  dChildID)
override

Set unique child id to COM.

Parameters
dChildID,theid of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1257 of file MAccessible.cxx.

References m_dChildID.

◆ Put_XAccFocus()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccFocus ( long  dChildID)
override

Set accessible focus by specifying child ID.

Parameters
dChildID,thechild id identifies the focus child.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1205 of file MAccessible.cxx.

References m_dChildID, m_dFocusChildID, m_isDestroy, m_pIParent, and IMAccessible::Put_XAccFocus().

◆ Put_XAccName()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccName ( const OLECHAR __RPC_FAR *  pszName)
override

Set the accessible name of the current COM object self from UNO.

Parameters
pszName,thename value used to set the name of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1084 of file MAccessible.cxx.

References m_isDestroy, and m_pszName.

◆ Put_XAccParent()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccParent ( IMAccessible __RPC_FAR *  pIParent)
override

Set accessible parent object for the current COM object if the current object is a child of some COM object.

Parameters
pIParent,theparent of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1240 of file MAccessible.cxx.

References m_pIParent.

◆ Put_XAccRole()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccRole ( unsigned short  pRole)
override

Set the accessible role of the current COM object self from UNO.

Parameters
pRole,therole value used to set the role of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1110 of file MAccessible.cxx.

References m_iRole.

◆ Put_XAccValue()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccValue ( const OLECHAR __RPC_FAR *  pszAccValue)
override

Set the accessible value of the current COM object self from UNO.

Parameters
pszAccValue,thename used to set the value of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1162 of file MAccessible.cxx.

References m_isDestroy, and m_pszValue.

◆ Put_XAccWindowHandle()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccWindowHandle ( HWND  hwnd)
override

Set the HWND value of the current COM object self from UNO.

It should set the parent IAccessible Object through the method AccessibleObjectFromWindow(...).

Parameters
hwnd,theHWND used to set the value of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1188 of file MAccessible.cxx.

References m_hwnd, and m_isDestroy.

◆ QueryService()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
override

Get The other Interface from CMAccessible.

Parameters
guidService,mustbe IID_IAccessible here.
riid,theIID interface .
Returns
S_OK if successful and S_FALSE if failure.

Definition at line 1029 of file MAccessible.cxx.

◆ role()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::role ( long __RPC_FAR *  role)
override

Definition at line 1734 of file MAccessible.cxx.

References m_iRole.

◆ scrollTo()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::scrollTo ( enum IA2ScrollType  scrollType)
override

Definition at line 1784 of file MAccessible.cxx.

◆ scrollToPoint()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::scrollToPoint ( enum IA2CoordinateType  coordinateType,
long  x,
long  y 
)
override

Definition at line 1779 of file MAccessible.cxx.

◆ SetDefaultAction()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::SetDefaultAction ( hyper  pAction)
override

Helper method for Implementation of get_accDefaultAction.

Parameters
pAction,thedefault action point of the current object.
Returns
S_OK if successful.

Definition at line 2205 of file MAccessible.cxx.

References m_xAction.

◆ SetState()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::SetState ( DWORD  pXSate)
override

Set state into the current state set for the current COM object from UNO.

Parameters
pXSate,thestate used to set the name of the current object.
Returns
S_OK if successful and E_FAIL if failure.

Definition at line 1149 of file MAccessible.cxx.

References m_dState.

◆ SetXAccessible()

COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::SetXAccessible ( hyper  pXAcc)
override

When COM is created, UNO set XAccessible pointer to it in order to COM can operate UNO information.

Parameters
pXAcc,theXAccessible object of current object.
Returns
S_OK if successful.

Definition at line 2070 of file MAccessible.cxx.

References m_pEnumVar, m_xAccessible, m_xContext, and CEnumVariant::PutSelection().

◆ SmartQI()

HRESULT WINAPI CMAccessible::SmartQI ( void *  pv,
REFIID  iid,
void **  ppvObject 
)
private

◆ SmartQI_()

static HRESULT WINAPI CMAccessible::SmartQI_ ( void *  pv,
REFIID  iid,
void **  ppvObject,
DWORD_PTR   
)
inlinestatic

Definition at line 213 of file MAccessible.h.

Member Data Documentation

◆ g_pAgent

AccObjectManagerAgent * CMAccessible::g_pAgent = nullptr
static

◆ m_containedObjects

XGUIDToComObjHash CMAccessible::m_containedObjects

Definition at line 211 of file MAccessible.h.

Referenced by CMAccessible(), SmartQI(), and ~CMAccessible().

◆ m_dChildID

long CMAccessible::m_dChildID
private

Definition at line 164 of file MAccessible.h.

Referenced by get_uniqueID(), Put_XAccChildID(), and Put_XAccFocus().

◆ m_dFocusChildID

long CMAccessible::m_dFocusChildID
private

Definition at line 167 of file MAccessible.h.

Referenced by get_accFocus(), and Put_XAccFocus().

◆ m_dState

DWORD CMAccessible::m_dState
private

Definition at line 160 of file MAccessible.h.

Referenced by DecreaseState(), get_accState(), get_accValue(), IncreaseState(), and SetState().

◆ m_hwnd

HWND CMAccessible::m_hwnd
private

◆ m_iRole

unsigned short CMAccessible::m_iRole
private

Definition at line 159 of file MAccessible.h.

Referenced by get_accKeyboardShortcut(), get_accRole(), Put_XAccRole(), and role().

◆ m_isDestroy

bool CMAccessible::m_isDestroy
private

◆ m_pEnumVar

CEnumVariant* CMAccessible::m_pEnumVar
private

Definition at line 174 of file MAccessible.h.

Referenced by CMAccessible(), get_accSelection(), SetXAccessible(), and ~CMAccessible().

◆ m_pIParent

IMAccessible* CMAccessible::m_pIParent
private

◆ m_pszActionDescription

BSTR CMAccessible::m_pszActionDescription
private

Definition at line 158 of file MAccessible.h.

Referenced by get_accDefaultAction(), Put_ActionDescription(), and ~CMAccessible().

◆ m_pszName

BSTR CMAccessible::m_pszName
private

Definition at line 156 of file MAccessible.h.

Referenced by get_accName(), Put_XAccName(), and ~CMAccessible().

◆ m_pszValue

BSTR CMAccessible::m_pszValue
private

Definition at line 157 of file MAccessible.h.

Referenced by get_accValue(), put_accValue(), Put_XAccValue(), and ~CMAccessible().

◆ m_xAccessible

css::uno::Reference<css::accessibility::XAccessible> CMAccessible::m_xAccessible
private

◆ m_xAction

css::uno::Reference<css::accessibility::XAccessibleAction> CMAccessible::m_xAction
private

Definition at line 182 of file MAccessible.h.

Referenced by accDoDefaultAction(), get_accDefaultAction(), and SetDefaultAction().

◆ m_xContext

css::uno::Reference<css::accessibility::XAccessibleContext> CMAccessible::m_xContext
private

The documentation for this class was generated from the following files: