summaryrefslogtreecommitdiff
path: root/winaccessibility/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-06-15 12:47:50 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-06-15 20:59:45 +0200
commitd8e827890f9ff3fca642b3af9475704fc376f845 (patch)
treed6a1ca4cc80453806cadffef6fd7563df2ff2004 /winaccessibility/source
parent539374caa5deac788f394a54a75b6e167ab04864 (diff)
wina11y: Drop implemenation for obsolete IAccessible::put_accName
Just return `E_NOTIMPL`, as the `IAccessible::put_accName` doc now says [1]: > The IAccessible::put_accName method is no longer supported. Client > applications should use a control-specific workaround, such as the > SetWindowText function. Servers should return E_NOTIMPL. [1] https://docs.microsoft.com/en-us/windows/win32/api/oleacc/nf-oleacc-iaccessible-put_accname Change-Id: I4b36b6a4c4215f237ba7e7583d2f130e8d80f200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135903 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source')
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx33
1 files changed, 4 insertions, 29 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index f2f616980157..69353484d522 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1049,37 +1049,12 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::QueryService(REFGUID guidService
}
/**
-* Set the accessible name of the current COM object self or its one child from UNO.
-* @param varChild, vt member of varChild must be VT_I4,and lVal member stores the child ID,
-* the child ID specify child index from 0 to children count, 0 stands for object self.
-* @param szName, the name used to set the name of the proper object.
-* @return S_OK if successful and E_FAIL if failure.
+* No longer supported according to IAccessible doc.
+* Servers should return E_NOTIMPL
*/
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName(VARIANT varChild, BSTR szName)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName(VARIANT, BSTR)
{
- SolarMutexGuard g;
-
- try {
- if (m_isDestroy) return S_FALSE;
- if(varChild.vt==VT_I4)
- {
- if(varChild.lVal==CHILDID_SELF)
- {
- SysFreeString(m_pszName);
- m_pszName=SysAllocString(szName);
- return S_OK;
- }
-
- long lVal = varChild.lVal;
- varChild.lVal = CHILDID_SELF;
- IMAccessible *pChild = this->GetChildInterface(lVal);
- if(!pChild)
- return E_FAIL;
- return pChild->put_accName(varChild,szName);
- }
- return E_FAIL;
-
- } catch(...) { return E_FAIL; }
+ return E_NOTIMPL;
}
/**