Return null BSTR from wxIAccessible if string returned from wxAccessible method is empty
wxIAccessible should return a NULL BSTR to the accessibility framework if strings returned from wxIAccessible::get_accName() and get_accValue() are empty because this convention is already applied to the other methods returning string values, like get_accHelp(), get_accDescription().
This commit is contained in:
parent
e2a5b19fac
commit
8980abacad
@ -143,6 +143,8 @@ wxMSW:
|
||||
errors in wxAccessible methods.
|
||||
- Return DISP_E_MEMBERNOTFOUND error code from wxIAccessible if wxAccessible
|
||||
methods return wxAccStatus::wxACC_NOT_SUPPORTED.
|
||||
- Return null BSTR from wxIAccessible if string returned from wxAccesible
|
||||
method is empty.
|
||||
|
||||
wxOSX:
|
||||
|
||||
|
@ -1233,8 +1233,16 @@ STDMETHODIMP wxIAccessible::get_accName ( VARIANT varID, BSTR* pszName)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxBasicString basicString(name);
|
||||
*pszName = basicString.Get();
|
||||
if ( name.empty() )
|
||||
{
|
||||
*pszName = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxBasicString basicString(name);
|
||||
*pszName = basicString.Get();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
@ -1406,9 +1414,17 @@ STDMETHODIMP wxIAccessible::get_accValue ( VARIANT varID, BSTR* pszValue)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxBasicString basicString(strValue);
|
||||
* pszValue = basicString.Get();
|
||||
return S_OK;
|
||||
if ( strValue.empty() )
|
||||
{
|
||||
*pszValue = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxBasicString basicString(strValue);
|
||||
* pszValue = basicString.Get();
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user