summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-03-18 11:46:46 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-03-18 13:21:00 +0100
commitfe09f12d83d934287c58f507a99b693212a84c79 (patch)
tree6bf52436c901b96ef6b07cb0291ebf0ddfb1d479 /chart2
parent38bc4742af4f96d26b81bdc41e0361d83d8f1f66 (diff)
chart a11y: Drop bSendGlobally param from AccessibleBase::BroadcastAccEvent
Setting it didn't have any effect in practice: If set to `true`, it resulted in `vcl::unohelper::NotifyAccessibleStateEventGlobally` getting called, which calls `XExtendedToolkit::fireFocusGained` or `XExtendedToolkit::fireFocusLost`, but the only implementations in `VCLXToolkit` do nothing. Interestingly, the documentation for `XExtendedToolkit` in `offapi/com/sun/star/awt/XExtendedToolkit.idl` says: > @deprecated > This interface was only implemented in an intermediate developer > release anyway. > > @since OOo 1.1.2 but the interface is still used in various places across the code base... Change-Id: I4681c28c9d18cf1953be5127765f4aa94563662d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131735 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx23
-rw-r--r--chart2/source/controller/inc/AccessibleBase.hxx6
2 files changed, 8 insertions, 21 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index f419ba7f7942..904c91e99365 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -123,7 +123,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
AddState( AccessibleStateType::FOCUSED );
aSelected <<= AccessibleStateType::FOCUSED;
- BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aSelected, aEmpty, true );
+ BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aSelected, aEmpty );
SAL_INFO("chart2.accessibility", "Selection acquired by: " << getAccessibleName());
}
@@ -136,7 +136,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
AddState( AccessibleStateType::FOCUSED );
aSelected <<= AccessibleStateType::FOCUSED;
- BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aEmpty, aSelected, true );
+ BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aEmpty, aSelected );
SAL_INFO("chart2.accessibility", "Selection lost by: " << getAccessibleName());
}
break;
@@ -343,32 +343,24 @@ awt::Point AccessibleBase::GetUpperLeftOnScreen() const
void AccessibleBase::BroadcastAccEvent(
sal_Int16 nId,
const Any & rNew,
- const Any & rOld,
- bool bSendGlobally ) const
+ const Any & rOld ) const
{
ClearableMutexGuard aGuard( m_aMutex );
- if ( !m_nEventNotifierId && !bSendGlobally )
+ if ( !m_nEventNotifierId )
return;
// if we don't have a client id for the notifier, then we don't have listeners, then
// we don't need to notify anything
- //except SendGlobally for focus handling?
// the const cast is needed, because UNO parameters are never const
const AccessibleEventObject aEvent(
const_cast< uno::XWeak * >( static_cast< const uno::XWeak * >( this )),
nId, rNew, rOld );
- if ( m_nEventNotifierId ) // let the notifier handle this event
- ::comphelper::AccessibleEventNotifier::addEvent( m_nEventNotifierId, aEvent );
+ // let the notifier handle this event
+ ::comphelper::AccessibleEventNotifier::addEvent( m_nEventNotifierId, aEvent );
aGuard.clear();
-
- // send event to global message queue
- if( bSendGlobally )
- {
- vcl::unohelper::NotifyAccessibleStateEventGlobally( aEvent );
- }
}
void AccessibleBase::KillAllChildren()
@@ -405,8 +397,7 @@ void AccessibleBase::SetInfo( const AccessibleElementInfo & rNewInfo )
{
KillAllChildren();
}
- BroadcastAccEvent( AccessibleEventId::INVALIDATE_ALL_CHILDREN, uno::Any(), uno::Any(),
- true /* global notification */ );
+ BroadcastAccEvent( AccessibleEventId::INVALIDATE_ALL_CHILDREN, uno::Any(), uno::Any());
}
// ________ (XComponent::dispose) ________
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
index 4bd51c342678..44f326f2a4f1 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -185,14 +185,10 @@ protected:
/** This method creates an AccessibleEventObject and sends it to all
listeners that are currently listening to this object
-
- If bSendGlobally is true, the event is also broadcast via
- vcl::unohelper::NotifyAccessibleStateEventGlobally()
*/
void BroadcastAccEvent( sal_Int16 nId,
const css::uno::Any & rNew,
- const css::uno::Any & rOld,
- bool bSendGlobally = false ) const;
+ const css::uno::Any & rOld ) const;
/** Removes all children from the internal lists and broadcasts child remove
events.