diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx index c60e89d8364e..bd6a473fa149 100644 --- a/include/vcl/vclevent.hxx +++ b/include/vcl/vclevent.hxx @@ -121,7 +121,6 @@ enum class VclEventId TabpageRemovedAll, ToolboxActivate, ToolboxAllItemsChanged, - ToolboxButtonStateChanged, // pData = itempos ToolboxClick, ToolboxDeactivate, ToolboxDoubleClick, diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index bbec06228807..7fdd03a031e3 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1038,9 +1038,6 @@ void ToolBox::SetItemText( ToolBoxItemId nItemId, const OUString& rText ) else pItem->maText = MnemonicGenerator::EraseAllMnemonicChars(rText); - // Notify button changed event to prepare accessibility bridge - CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) ); - // Notify CallEventListeners( VclEventId::ToolboxItemTextChanged, reinterpret_cast< void* >( nPos ) ); } @@ -1193,9 +1190,6 @@ void ToolBox::SetItemState( ToolBoxItemId nItemId, TriState eState ) pItem->meState = eState; ImplUpdateItem( nPos ); - // Notify button changed event to prepare accessibility bridge - CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) ); - // Call accessible listener to notify state_changed event CallEventListeners( VclEventId::ToolboxItemUpdated, reinterpret_cast< void* >(nPos) ); } @@ -1232,9 +1226,6 @@ void ToolBox::EnableItem( ToolBoxItemId nItemId, bool bEnable ) ImplUpdateInputEnable(); - // Notify button changed event to prepare accessibility bridge - CallEventListeners( VclEventId::ToolboxButtonStateChanged, reinterpret_cast< void* >( nPos ) ); - CallEventListeners( bEnable ? VclEventId::ToolboxItemEnabled : VclEventId::ToolboxItemDisabled, reinterpret_cast< void* >( nPos ) ); } diff --git a/vcl/unx/gtk3/a11y/atkutil.cxx b/vcl/unx/gtk3/a11y/atkutil.cxx index 239ce1c49dd9..6d550341b669 100644 --- a/vcl/unx/gtk3/a11y/atkutil.cxx +++ b/vcl/unx/gtk3/a11y/atkutil.cxx @@ -344,40 +344,6 @@ static void handle_toolbox_highlightoff(vcl::Window const *pWindow) notify_toolbox_item_focus( pToolBoxParent ); } -/*****************************************************************************/ - -static void create_wrapper_for_child( - const uno::Reference< accessibility::XAccessibleContext >& xContext, - sal_Int32 index) -{ - if( xContext.is() ) - { - uno::Reference< accessibility::XAccessible > xChild(xContext->getAccessibleChild(index)); - if( xChild.is() ) - { - // create the wrapper object - it will survive the unref unless it is a transient object - g_object_unref( atk_object_wrapper_ref( xChild ) ); - } - } -} - -/*****************************************************************************/ - -static void handle_toolbox_buttonchange(VclWindowEvent const *pEvent) -{ - vcl::Window* pWindow = pEvent->GetWindow(); - sal_Int32 index = static_cast(reinterpret_cast(pEvent->GetData())); - - if( pWindow && pWindow->IsReallyVisible() ) - { - uno::Reference< accessibility::XAccessible > xAccessible(pWindow->GetAccessible()); - if( xAccessible.is() ) - { - create_wrapper_for_child(xAccessible->getAccessibleContext(), index); - } - } -} - rtl::Reference GtkSalData::GetDocumentFocusListener() { rtl::Reference xDFL = m_xDocumentFocusListener.get(); @@ -434,10 +400,6 @@ static void WindowEventHandler(void *, VclSimpleEvent& rEvent) handle_toolbox_highlight(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow()); break; - case VclEventId::ToolboxButtonStateChanged: - handle_toolbox_buttonchange(static_cast< ::VclWindowEvent const * >(&rEvent)); - break; - case VclEventId::ToolboxHighlightOff: handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow()); break;