winaccessibility/inc/AccObject.hxx            |    2 +-
 winaccessibility/source/service/AccObject.cxx |    3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 58de3a5f1cd80cfff0c7e8db326a66d34501e09b
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 17 15:44:50 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Apr 17 21:33:06 2024 +0200

    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.wegh...@posteo.de>

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;

Reply via email to