wina11y: Drop unused CAccComponentBase::grabFocus

Accessible's `IAccessibleComponent` interface [1] has no
`grabFocus` method and `CAccComponentBase::grabFocus`.

Therefore, drop it.

The `IAccessible` interface has an `IAccessible::accSelect`
method that can be used to request focus by passing the
`SELFLAG_TAKEFOCUS` flag [3], but that is implemented in
`CMAccessible::accSelect`.

[1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_component.html#a8709fdbf3f51ae079af274854a8bffd4
[2] https://learn.microsoft.com/en-us/windows/win32/api/oleacc/nf-oleacc-iaccessible-accselect
[3] https://learn.microsoft.com/en-us/windows/win32/winauto/selflag

Change-Id: I1ae99fdbf60aa18a041c086a73f9bd7c6a80cace
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173439
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2024-09-16 10:55:10 +01:00
parent 1c80f3951d
commit 1661ca09a3
2 changed files with 0 additions and 32 deletions

View File

@@ -62,35 +62,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::get_locationInParent(long*
}
}
/**
* Grabs the focus to this object.
*
* @param success the boolean result to be returned.
*/
COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::grabFocus(boolean* success)
{
SolarMutexGuard g;
try
{
if (success == nullptr)
return E_INVALIDARG;
if (!pRXComp.is())
{
return E_FAIL;
}
GetXInterface()->grabFocus();
*success = TRUE;
return S_OK;
}
catch (...)
{
return E_FAIL;
}
}
/**
* Returns the foreground color of this object.
*

View File

@@ -38,9 +38,6 @@ public:
// box relative to the parent.
STDMETHOD(get_locationInParent)(long* x, long* y);
// Grabs the focus to this object.
STDMETHOD(grabFocus)(boolean* success);
// Returns the foreground color of this object.
STDMETHOD(get_foreground)(IA2Color* foreground);