summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-09-20 09:23:10 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2021-09-20 18:05:00 +0200
commit85b4b15bb02f8d2fdbead0c836763621096b995e (patch)
treeecc8f0b39e48e7fb58d42d1f994d5d2f6c5787ba
parent185b183a71924c84edb385ec5eb4fe6d4bfe8e05 (diff)
wina11y: Drop bool param from CMAccessible::NotifyDestroy
... and 'AccObject::NotifyDestroy', respectively. The only calling site calls it with 'true' as parameter (and 'CMAccessible::NotifyDestroy' was calling 'm_xAccessible.clear()' regardless of what value the passed param had anyway). Change-Id: I08a24f79b50ec327ae461bd44ee6460a2d8145f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122343 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--winaccessibility/inc/AccObject.hxx2
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx7
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.h2
-rw-r--r--winaccessibility/source/UAccCOMIDL/UAccCOM.idl2
-rw-r--r--winaccessibility/source/service/AccObject.cxx4
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx2
6 files changed, 9 insertions, 10 deletions
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx
index bc689178c95c..2a246ce43b29 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -107,7 +107,7 @@ public:
void DeleteChild( AccObject* pChild );
AccObject* NextChild();
- void NotifyDestroy(bool bDestroy);
+ void NotifyDestroy();
void DecreaseState(short xState );//call COM interface DecreaseState method
void IncreaseState( short xState );//call COM interface IncreaseState method
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 2d62ec494bc7..8f69dcf01649 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1364,15 +1364,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccAgent(hyper pAgent)
/**
* When a UNO control disposing, it disposes its listeners,
* then notify AccObject in bridge management, then notify
-* COM that the XAccessible is invalid,so set m_xAccessible as NULL
-* @param isDestroy, true is it needs to be destroyed.
+* COM that the XAccessible is invalid, so set m_xAccessible as NULL
* @return S_OK if successful and E_FAIL if failure.
*/
-COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::NotifyDestroy(BOOL isDestroy)
+COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::NotifyDestroy()
{
// internal IMAccessible - no mutex meeded
- m_isDestroy = isDestroy;
+ m_isDestroy = true;
m_xAccessible.clear();
return S_OK;
}
diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h
index 71296cfc2fda..224e59179d61 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.h
+++ b/winaccessibility/source/UAccCOM/MAccessible.h
@@ -147,7 +147,7 @@ public:
STDMETHOD(Put_XAccWindowHandle)(HWND hwnd) override;
STDMETHOD(Put_XAccChildID)(long dChildID) override;
STDMETHOD(Put_XAccAgent)(hyper pAgent) override;
- STDMETHOD(NotifyDestroy)(BOOL isDestroy) override;
+ STDMETHOD(NotifyDestroy)() override;
STDMETHOD(Put_ActionDescription)( const OLECHAR* szAction) override;
STDMETHOD(SetDefaultAction)(hyper pAction) override;
STDMETHOD(GetUNOInterface)(hyper*) override;
diff --git a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
index 1a0705754114..da123ab7f972 100644
--- a/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
+++ b/winaccessibility/source/UAccCOMIDL/UAccCOM.idl
@@ -49,7 +49,7 @@ import "defines.idl";
[id(23), helpstring("method SetDefaultAction")] HRESULT SetDefaultAction(hyper pAction);
[id(24), helpstring("method Put_ActionDescription")] HRESULT Put_ActionDescription( const OLECHAR* szAction);
[id(25), helpstring("method Put_XAccAgent")] HRESULT Put_XAccAgent(hyper pAgent);
- [id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy(BOOL isDestroy);
+ [id(26), helpstring("method NotifyDestroy")] HRESULT NotifyDestroy();
[id(30), helpstring("method Get_XAccChildID")] HRESULT Get_XAccChildID([out,retval] long* childID);
};
[
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 7d1adb27afd4..877d33cc0e37 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -1116,10 +1116,10 @@ void AccObject::GetExpandedState( sal_Bool* isExpandable, sal_Bool* isExpanded)
}
}
-void AccObject::NotifyDestroy(bool bDestroy)
+void AccObject::NotifyDestroy()
{
if(m_pIMAcc)
- m_pIMAcc->NotifyDestroy(bDestroy);
+ m_pIMAcc->NotifyDestroy();
}
void AccObject::SetParentObj(AccObject* pParentAccObj)
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index 39f9f4a621f9..89d3e7db5d5e 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -1154,7 +1154,7 @@ void AccObjectWinManager::NotifyDestroy(XAccessible* pXAcc)
AccObject* accObj = GetAccObjByXAcc(pXAcc);
if(accObj)
{
- accObj->NotifyDestroy(true);
+ accObj->NotifyDestroy();
}
}