diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-07 09:30:39 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-08 08:17:59 +0200 |
commit | b9a981e88f54d24b2a39e7e1801de8ab503daccf (patch) | |
tree | e0d068afac02e5297a22b53feeac11a6f9c99fc9 /winaccessibility/source | |
parent | e5aab6900f86042e4360bb792bc47690d09eaed7 (diff) |
wina11y: Move and simplify casting for Get_ToATInterface
Move the casting from AccObjectManagerAgent::Get_ToATInterface to
AccObjectWinManager::Get_ToATInterface and just do a
`reinterpret_cast<HWND>(...)` right away instead of a
`static_cast<HWND>(reinterpret_cast<void*>(...))`.
This is in preparation of dropping the AccObjectManagerAgent
indirection altogether.
Change-Id: Iad759f856f727418aab0d20b479fc38feac714ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155436
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source')
-rw-r--r-- | winaccessibility/source/service/AccObjectManagerAgent.cxx | 3 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx b/winaccessibility/source/service/AccObjectManagerAgent.cxx index eb242c243183..9eb7f773d939 100644 --- a/winaccessibility/source/service/AccObjectManagerAgent.cxx +++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx @@ -312,8 +312,7 @@ bool AccObjectManagerAgent::IsStateManageDescendant(XAccessible* pXAcc) sal_Int64 AccObjectManagerAgent::Get_ToATInterface( sal_Int64 hWnd, sal_Int64 lParam, sal_Int64 wParam) { - return static_cast<sal_Int64>(pWinManager->Get_ToATInterface( - static_cast<HWND>(reinterpret_cast<void*>(hWnd)), lParam, wParam)); + return pWinManager->Get_ToATInterface(hWnd, lParam, wParam); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index dfc74f7bd4ef..9299c9a61887 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -91,13 +91,14 @@ AccObjectWinManager::~AccObjectWinManager() * @return Com interface with event. */ -LRESULT -AccObjectWinManager::Get_ToATInterface(HWND hWnd, long lParam, WPARAM wParam) +sal_Int64 +AccObjectWinManager::Get_ToATInterface(sal_Int64 nHWnd, long lParam, WPARAM wParam) { IMAccessible* pRetIMAcc = nullptr; if(lParam == OBJID_CLIENT ) { + HWND hWnd = reinterpret_cast<HWND>(nHWnd); pRetIMAcc = GetTopWindowIMAccessible(hWnd); } @@ -105,7 +106,7 @@ AccObjectWinManager::Get_ToATInterface(HWND hWnd, long lParam, WPARAM wParam) { LRESULT result = LresultFromObject(IID_IAccessible, wParam, pRetIMAcc); pRetIMAcc->Release(); - return result; + return static_cast<sal_Int64>(result); } return 0; } |