diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-16 14:50:29 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-17 07:05:33 +0200 |
commit | 2a5da1609d9d39e5b2bd80bd6af80bebcb6c1fb9 (patch) | |
tree | 2c493555b1bd91c6240a876bec137a43d109e118 /winaccessibility | |
parent | 6a36d9b341f647d5547027c33bf4dc7c3df12cf8 (diff) |
wina11y: Avoid some casting between HWND and sal_Int64
... by changing the corresponding params for
AccObjectManagerAgent::InsertAccObj and
AccObjectManagerAgent::InsertChildrenAccObj
to HWND.
Change-Id: I598bac30d827ae9166bc21cb5e8dff88a5cc99bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122203
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
5 files changed, 13 insertions, 13 deletions
diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx b/winaccessibility/inc/AccObjectManagerAgent.hxx index ea4b5837b74f..c3e1ee78c387 100644 --- a/winaccessibility/inc/AccObjectManagerAgent.hxx +++ b/winaccessibility/inc/AccObjectManagerAgent.hxx @@ -21,6 +21,10 @@ #include <memory> +#include <prewin.h> +#include <Windows.h> +#include <postwin.h> + #include <com/sun/star/accessibility/XAccessible.hpp> struct IMAccessible; @@ -45,7 +49,7 @@ public: virtual bool InsertAccObj(css::accessibility::XAccessible* pXAcc, css::accessibility::XAccessible* pParentXAcc, - sal_Int64 pWnd=0); + HWND hWnd = 0); virtual void GetIAccessibleFromResID(long childID,IMAccessible**); virtual bool GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc, IAccessible** ppIA); @@ -55,7 +59,7 @@ public: bool NotifyAccEvent(short pEvent = 0, css::accessibility::XAccessible* pXAcc = nullptr); bool InsertChildrenAccObj(css::accessibility::XAccessible* pXAcc, - sal_Int64 pWnd=0); + HWND hWnd = 0); void DeleteChildrenAccObj( css::accessibility::XAccessible* pXAcc ); void DecreaseState( css::accessibility::XAccessible* pXAcc,unsigned short pState ); diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index ed0796c43ec1..325cd00e2a62 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -1415,8 +1415,7 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test if(!isGet) { - g_pAgent->InsertAccObj(pXChild.get(), m_xAccessible.get(), - reinterpret_cast<sal_Int64>(m_hwnd)); + g_pAgent->InsertAccObj(pXChild.get(), m_xAccessible.get(), m_hwnd); isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild); } diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx index 2d31bdffb551..4ddaf3d8789b 100644 --- a/winaccessibility/source/service/AccFrameEventListener.cxx +++ b/winaccessibility/source/service/AccFrameEventListener.cxx @@ -91,8 +91,7 @@ void AccFrameEventListener::HandleChildChangedEvent(Any oldValue, Any newValue) = pvclwindow->GetWindow()->GetSystemData(); //add this child - pAgent->InsertAccObj(pAcc, m_xAccessible.get(), - reinterpret_cast<sal_Int64>(systemdata->hWnd)); + pAgent->InsertAccObj(pAcc, m_xAccessible.get(), systemdata->hWnd); //add all oldValue's existing children pAgent->InsertChildrenAccObj(pAcc); pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc); diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx b/winaccessibility/source/service/AccObjectManagerAgent.cxx index b3290075fb6b..1e0c37729f31 100644 --- a/winaccessibility/source/service/AccObjectManagerAgent.cxx +++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx @@ -142,11 +142,10 @@ void AccObjectManagerAgent::UpdateDescription( XAccessible* pXAcc, Any newDesc * @return If the method is correctly processed. */ bool AccObjectManagerAgent::InsertAccObj( - XAccessible* pXAcc, XAccessible* pParentXAcc, sal_Int64 nWnd) + XAccessible* pXAcc, XAccessible* pParentXAcc, HWND hWnd) { if( pWinManager ) - return pWinManager->InsertAccObj(pXAcc, pParentXAcc, - static_cast<HWND>(reinterpret_cast<void*>(nWnd))); + return pWinManager->InsertAccObj(pXAcc, pParentXAcc, hWnd); return false; } @@ -174,10 +173,10 @@ AccObjectManagerAgent::SaveTopWindowHandle(sal_Int64 hWnd, XAccessible* pXAcc) * @return If the method is correctly processed. */ bool -AccObjectManagerAgent::InsertChildrenAccObj(XAccessible* pXAcc, sal_Int64 pWnd) +AccObjectManagerAgent::InsertChildrenAccObj(XAccessible* pXAcc, HWND hWnd) { if( pWinManager ) - return pWinManager->InsertChildrenAccObj( pXAcc, reinterpret_cast<HWND>(pWnd) ); + return pWinManager->InsertChildrenAccObj(pXAcc, hWnd); return false; } diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx index bcb821771c3c..3c52d3280bd2 100644 --- a/winaccessibility/source/service/AccTopWindowListener.cxx +++ b/winaccessibility/source/service/AccTopWindowListener.cxx @@ -139,8 +139,7 @@ void AccTopWindowListener::AddAllListeners(css::accessibility::XAccessible* pAcc return; } - accManagerAgent.InsertAccObj(pAccessible, pParentXAcc, - reinterpret_cast<sal_Int64>(pWND)); + accManagerAgent.InsertAccObj(pAccessible, pParentXAcc, pWND); if (!accManagerAgent.IsContainer(pAccessible)) { |