diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-17 15:44:50 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-17 21:33:06 +0200 |
commit | 58de3a5f1cd80cfff0c7e8db326a66d34501e09b (patch) | |
tree | 3a6106314c28a9453ed991235cf70d15915760c6 /winaccessibility | |
parent | 89610c2176e1370a8075187e7637e5844fe5f3e3 (diff) |
wina11y: Drop unnecessary null check and make static
`AccObject::GetMAccessibleValueFromAny` converts an
Any to a string representation, which is unrelated
to any class members, so drop the null check for the
`m_pIMAcc` member and make the method static.
Change-Id: I07216f87c0fadbe239d1e16a048e2799cebac7bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166184
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/inc/AccObject.hxx | 2 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx index 65c8f5777331..81d69082095a 100644 --- a/winaccessibility/inc/AccObject.hxx +++ b/winaccessibility/inc/AccObject.hxx @@ -67,7 +67,7 @@ private: DWORD GetMSAAStateFromUNO(sal_Int64 xState);//translate state from UNO to MSAA value css::accessibility::XAccessibleSelection* GetXAccessibleSelection(); void GetExpandedState(sal_Bool* isExpandable, sal_Bool* isExpanded); - OUString GetMAccessibleValueFromAny(css::uno::Any pAny); + static OUString GetMAccessibleValueFromAny(css::uno::Any pAny); public: diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 51d04ec18dea..c7003568324b 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -506,9 +506,6 @@ OUString AccObject::GetMAccessibleValueFromAny(Any pAny) { OUString strValue; - if(nullptr == m_pIMAcc) - return strValue; - if(pAny.getValueType() == cppu::UnoType<cppu::UnoUnsignedShortType>::get() ) { sal_uInt16 val; |