From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/syslink.c | 28 ++++++++++++++++++++++++++-- dlls/comctl32/tests/syslink.c | 6 +++--- 2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 1c08cb2c121..77e16285287 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -396,8 +396,32 @@ static HRESULT WINAPI Accessible_get_accSelection(IAccessible *iface, VARIANT *c
static HRESULT WINAPI Accessible_get_accDefaultAction(IAccessible *iface, VARIANT childid, BSTR *action) { - FIXME("%p\n", iface); - return E_NOTIMPL; + SYSLINK_ACC *This = impl_from_IAccessible(iface); + HRESULT hr; + DOC_ITEM* item; + + TRACE("%p, %s\n", iface, debugstr_variant(&childid)); + + if (!action) + return E_POINTER; + + *action = NULL; + + hr = Accessible_FindChild(This, childid, &item); + if (FAILED(hr)) + return hr; + + if (item) + { + *action = SysAllocString(L"Click"); + if (!*action) + return E_OUTOFMEMORY; + return S_OK; + } + else + { + return S_FALSE; + } }
static HRESULT WINAPI Accessible_accSelect(IAccessible *iface, LONG flags, VARIANT childid) diff --git a/dlls/comctl32/tests/syslink.c b/dlls/comctl32/tests/syslink.c index a0e95aaee55..91954096382 100644 --- a/dlls/comctl32/tests/syslink.c +++ b/dlls/comctl32/tests/syslink.c @@ -330,12 +330,12 @@ static void test_msaa(void) SysFreeString(name); }
-todo_wine { hr = IAccessible_get_accDefaultAction(acc, varChild, &name); ok(hr == S_FALSE, "accDefaultAction failed, hr=%lx\n", hr); if (SUCCEEDED(hr)) ok(!name, "unexpected default action %s\n", debugstr_w(name));
+todo_wine { hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild); ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
@@ -369,7 +369,6 @@ todo_wine { SysFreeString(name); }
-todo_wine { hr = IAccessible_get_accDefaultAction(acc, varChild, &name); ok(hr == S_OK, "accDefaultAction failed, hr=%lx\n", hr); if (SUCCEEDED(hr)) @@ -386,6 +385,7 @@ todo_wine { SysFreeString(name); }
+todo_wine { hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild); ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
@@ -415,7 +415,6 @@ todo_wine { SysFreeString(name); }
-todo_wine { hr = IAccessible_get_accDefaultAction(acc, varChild, &name); ok(hr == S_OK, "accDefaultAction failed, hr=%lx\n", hr); if (SUCCEEDED(hr)) @@ -432,6 +431,7 @@ todo_wine { SysFreeString(name); }
+todo_wine { hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild); ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);