Kaydet (Commit) 9b7b1774 authored tarafından Niklas Johansson's avatar Niklas Johansson Kaydeden (comit) Caolán McNamara

tdf#88702 ACCESSIBILITY Toggle buttons state not reliably updated

We need to adapt the accessibility code to handle VCLEVENT_TOOLBOX_ITEMUPDATED,
since it is now sent from vcl/source/window/toolbox2.cxx.
I have tested the patch successfully on Windows and Fedora.

Change-Id: Ia4328d3c34547cc28ce9a3946f90223442ee84e3
Reviewed-on: https://gerrit.libreoffice.org/14190Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 06679dc5
......@@ -551,18 +551,17 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
case VCLEVENT_TOOLBOX_DEACTIVATE:
//case VCLEVENT_TOOLBOX_SELECT:
break;
// IA2 CWS. MT: Still using VCLEVENT_TOOLBOX_CLICK, see comment in vcl/source/window/toolbox2.cxx
/*
case VCLEVENT_TOOLBOX_ITEMUPDATED:
{
if ( rVclWindowEvent.GetData() )
{
UpdateChecked_Impl( TOOLBOX_ITEM_NOTFOUND );
UpdateIndeterminate_Impl( (sal_Int32)rVclWindowEvent.GetData() );
UpdateIndeterminate_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
}
break;
}
*/
case VCLEVENT_TOOLBOX_HIGHLIGHT:
UpdateFocus_Impl();
break;
......
......@@ -1458,8 +1458,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
// Notify button changed event to prepare accessibility bridge
CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
// Notify
//Solution:Call accessible listener to notify state_changed event
// Call accessible listener to notify state_changed event
CallEventListeners( VCLEVENT_TOOLBOX_ITEMUPDATED, reinterpret_cast< void* >(nPos) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment