summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-09-20 08:40:05 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2021-09-20 18:04:49 +0200
commit185b183a71924c84edb385ec5eb4fe6d4bfe8e05 (patch)
treefbd6d0672287cea58351603c62271081da51c913
parentafd918a81bc2dce4830bc94cbd88b9038f5715ff (diff)
wina11y: Drop AccObject::m_bShouldDestroy
The getter, 'AccObject::ifShouldDestroy', was unused, so drop it. The only place where the 'm_bShouldDestroy' member was actually used was in 'AccObject::NotifyDestroy', where it was assigned a value from a method param that was then passed further right away, so there's no need to store the value at all. Change-Id: Id5688e9742892e345b143a8eebeed5099696a0f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122342 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--winaccessibility/inc/AccObject.hxx4
-rw-r--r--winaccessibility/source/service/AccObject.cxx10
2 files changed, 3 insertions, 11 deletions
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx
index 2b2232323a02..bc689178c95c 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -59,7 +59,6 @@ private:
short m_accRole;
long m_resID;
HWND m_pParantID;
- bool m_bShouldDestroy; //avoid access COM interface when acc object is deleted
IMAccessible* m_pIMAcc;
AccObject* m_pParentObj;
IAccChildList m_childrenList;
@@ -108,8 +107,7 @@ public:
void DeleteChild( AccObject* pChild );
AccObject* NextChild();
- void NotifyDestroy(bool ifDelete);
- bool ifShouldDestroy();
+ void NotifyDestroy(bool bDestroy);
void DecreaseState(short xState );//call COM interface DecreaseState method
void IncreaseState( short xState );//call COM interface IncreaseState method
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 9e3f7d063b3b..7d1adb27afd4 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -162,7 +162,6 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
AccEventListener* pListener) :
m_resID (NULL),
m_pParantID (nullptr),
- m_bShouldDestroy(false),
m_pIMAcc (nullptr),
m_pParentObj(nullptr),
m_pListener (pListener),
@@ -1117,11 +1116,10 @@ void AccObject::GetExpandedState( sal_Bool* isExpandable, sal_Bool* isExpanded)
}
}
-void AccObject::NotifyDestroy(bool ifDelete)
+void AccObject::NotifyDestroy(bool bDestroy)
{
- m_bShouldDestroy=ifDelete;
if(m_pIMAcc)
- m_pIMAcc->NotifyDestroy(m_bShouldDestroy);
+ m_pIMAcc->NotifyDestroy(bDestroy);
}
void AccObject::SetParentObj(AccObject* pParentAccObj)
@@ -1187,9 +1185,5 @@ AccObject* AccObject::GetParentObj()
{
return m_pParentObj;
}
-bool AccObject::ifShouldDestroy()
-{
- return m_bShouldDestroy;
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */