Implemented get_accSelection().
This commit is contained in:
parent
94a6cd7ab0
commit
5eade7c831
|
@ -494,13 +494,25 @@ selectedCell:
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// note: https://msdn.microsoft.com/en-us/library/ms971325 is geared toward cell-based selection
|
||||||
|
// we have row-based selection, so only Tables implement this method, and they return a row
|
||||||
static HRESULT STDMETHODCALLTYPE tableAccget_accSelection(IAccessible *this, VARIANT *pvarChildren)
|
static HRESULT STDMETHODCALLTYPE tableAccget_accSelection(IAccessible *this, VARIANT *pvarChildren)
|
||||||
{
|
{
|
||||||
if (TA->t == NULL || TA->std == NULL) {
|
if (pvarChildren == NULL)
|
||||||
// TODO set values on error
|
return E_POINTER;
|
||||||
|
// TOOD set pvarChildren to VT_EMPTY?
|
||||||
|
if (TA->t == NULL || TA->std == NULL)
|
||||||
return RPC_E_DISCONNECTED;
|
return RPC_E_DISCONNECTED;
|
||||||
|
if (TA->what.role != ROLE_SYSTEM_TABLE)
|
||||||
|
// TODO [EDGE CASE] implement this for row anyway? how?
|
||||||
|
return DISP_E_MEMBERNOTFOUND;
|
||||||
|
if (TA->t->selectedRow == -1) {
|
||||||
|
pvarChildren->vt = VT_EMPTY;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
return IAccessible_get_accSelection(TA->std, pvarChildren);
|
pvarChildren->vt = VT_DISPATCH;
|
||||||
|
pvarChildren->pdispVal = (IDispatch *) newTableAcc(TA->t, ROLE_SYSTEM_ROW, TA->t->selectedRow, -1);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE tableAccget_accDefaultAction(IAccessible *this, VARIANT varChild, BSTR *pszDefaultAction)
|
static HRESULT STDMETHODCALLTYPE tableAccget_accDefaultAction(IAccessible *this, VARIANT varChild, BSTR *pszDefaultAction)
|
||||||
|
|
Loading…
Reference in New Issue