winaccessibility/source/service/AccObject.cxx | 6 ------ 1 file changed, 6 deletions(-)
New commits: commit 1ab8cc73e084f590b1b624219c7af567145401dd Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Oct 1 11:33:12 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Oct 1 17:48:04 2024 +0200 wina11y: Drop duplicate handling for focusable state Setting the `isFocusable` var to true and calling `IncreaseState` for the focusable state further down is unnecessary, as that already happens in the line just below the variable is set. Therefore, drop this duplication. In addition, the now dropped call to `IncreaseState` should have used the UNO state, AccessibleStateType::FOCUSABLE as well, not the IAccessible state, STATE_SYSTEM_FOCUSABLE, as AccObject::IncreaseState takes the UNO state while CMAccessible::IncreaseState (called by the former) takes the IAccessible/MSAA state. The switch from the UNO to the IAccessible2 state for the param was accidently done in commit a241661862ef35774f560e4068a895dcaa6f2113 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Mon Sep 30 13:37:14 2024 +0100 wina11y: Bridge focusable state as is Change-Id: I4b3923897444fdc75b15fe2cd9e91ba5f405507e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174341 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index db3abc931724..aafb82bd7fa9 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -653,7 +653,6 @@ void AccObject::UpdateState() bool isShowing = false; bool isEditable = false; bool isVisible = false; - bool isFocusable = false; for (int i=0; i<63; ++i) { @@ -668,8 +667,6 @@ void AccObject::UpdateState() isVisible = true; else if (nState == AccessibleStateType::EDITABLE) isEditable = true; - else if (nState == AccessibleStateType::FOCUSABLE) - isFocusable = true; IncreaseState(nState); } @@ -726,9 +723,6 @@ void AccObject::UpdateState() break; } - if (isFocusable) - IncreaseState(STATE_SYSTEM_FOCUSABLE); - if (!isEnable) m_pIMAcc->IncreaseState( STATE_SYSTEM_UNAVAILABLE );