From 94a6cd7ab0f1063f7c5b7846fe455b1d94ec5296 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 17 Feb 2015 11:04:59 -0500 Subject: Implemented get_accRole(). --- wintable/accessibility.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'wintable') diff --git a/wintable/accessibility.h b/wintable/accessibility.h index df8b6ce..f486413 100644 --- a/wintable/accessibility.h +++ b/wintable/accessibility.h @@ -349,17 +349,21 @@ static HRESULT STDMETHODCALLTYPE tableAccget_accDescription(IAccessible *this, V static HRESULT STDMETHODCALLTYPE tableAccget_accRole(IAccessible *this, VARIANT varChild, VARIANT *pvarRole) { - if (TA->t == NULL || TA->std == NULL) { - // TODO set values on error + HRESULT hr; + tableAccWhat what; + + if (pvarRole == NULL) + return E_POINTER; + pvarRole->vt = VT_EMPTY; + if (TA->t == NULL || TA->std == NULL) return RPC_E_DISCONNECTED; - } -//TODO -if (pvarRole == NULL) -return E_POINTER; -pvarRole->vt = VT_I4; -pvarRole->lVal = TA->what.role; -return S_OK; - return IAccessible_get_accRole(TA->std, varChild, pvarRole); + what = TA->what; + hr = normalizeWhat(TA, varChild, &what); + if (hr != S_OK) + return hr; + pvarRole->vt = VT_I4; + pvarRole->lVal = what.role; + return S_OK; } static HRESULT STDMETHODCALLTYPE tableAccget_accState(IAccessible *this, VARIANT varChild, VARIANT *pvarState) -- cgit v1.2.3