summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-03-21 19:32:11 +0100
committerAndras Timar <andras.timar@collabora.com>2023-04-02 23:38:10 +0200
commit69c302b215cab942cb53196d8af5bd6177b3c376 (patch)
tree0e825c86f203396a268cddf90666db47c43bd34b /winaccessibility
parentc16af97523603c37bee6b72d257b7402d1d58a3e (diff)
tdf#154303 wina11y: Don't truncate 64-bit states
commit 8d8e6c84e512c1a8b33aac75965b84481d1a1d13 Date: Sun Jul 3 20:29:28 2022 +0200 [API CHANGE] Drop css::accessibility::XAccessibleStateSet had introduced the use of a 64-bit integer with bit flags for the accessible states. However, `AccObjectWinManager::DecreaseState` and `AccObjectWinManager::IncreaseState` were still using unsigned short, resulting in truncation. As one result, the `AccessibleEventId::STATE_CHANGED` event with state `AccessibleStateType::VISIBLE` from `OAccessibleMenuBaseComponent::SetVisible` would no longer result in the `STATE_SYSTEM_INVISIBLE` being unset and thus the the JAWS screen reader would no longer announce the focused (but considered invisible) menu item. Fix this by switching the param for those two methods to sal_Int64 as well. Change-Id: I714573e2691e82c6287a4b83f872f87568e46495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149255 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 2f206b84385ed62bb56982270dce57ad4dace472) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149294 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/inc/AccObjectWinManager.hxx4
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx
index 76e3e548fcdf..5c162dfed1ea 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -102,8 +102,8 @@ public:
LRESULT Get_ToATInterface(HWND hWnd, long lParam, WPARAM wParam);
- void DecreaseState( css::accessibility::XAccessible* pXAcc,unsigned short pState );
- void IncreaseState( css::accessibility::XAccessible* pXAcc,unsigned short pState );
+ void DecreaseState(css::accessibility::XAccessible* pXAcc, sal_Int64 nState);
+ void IncreaseState(css::accessibility::XAccessible* pXAcc, sal_Int64 nState);
void UpdateState( css::accessibility::XAccessible* pXAcc );
void SetValue( css::accessibility::XAccessible* pXAcc, css::uno::Any pAny );
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index de527270a8e0..b0ee01525de9 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -796,11 +796,11 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc)
* @param pState Changed state.
* @return
*/
-void AccObjectWinManager::DecreaseState( XAccessible* pXAcc,unsigned short pState )
+void AccObjectWinManager::DecreaseState(XAccessible* pXAcc, sal_Int64 nState)
{
AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
if( pAccObj )
- pAccObj->DecreaseState( pState );
+ pAccObj->DecreaseState(nState);
}
/**
@@ -811,11 +811,11 @@ void AccObjectWinManager::DecreaseState( XAccessible* pXAcc,unsigned short pStat
* @param pState Changed state.
* @return
*/
-void AccObjectWinManager::IncreaseState( XAccessible* pXAcc,unsigned short pState )
+void AccObjectWinManager::IncreaseState(XAccessible* pXAcc, sal_Int64 nState)
{
AccObject* pAccObj = GetAccObjByXAcc( pXAcc );
if( pAccObj )
- pAccObj->IncreaseState( pState );
+ pAccObj->IncreaseState(nState);
}
void AccObjectWinManager::UpdateState( css::accessibility::XAccessible* pXAcc )