summaryrefslogtreecommitdiff
path: root/toolkit/source/controls
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-24 11:35:31 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-24 22:01:23 +0100
commit3e447bcca78dec8c2b8f3499969641e008ad7e7f (patch)
tree7e55fe5546022aafbddabbd3dcfb4b7f6ab7507e /toolkit/source/controls
parentd38bb9e0a9a192ccc6f5c71c9e173cc95e709119 (diff)
toolkit a11y: Drop AccessibleGridControlBase::{g,s}etClientId
The AccessibleGridControlBase::m_aClientId is (and should only be) used by the class itself, not by subclasses, so access the member directly and drop the protected getter and setter. Change-Id: I987cad89c7aec48fb0286d7b24e9b282db3b536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180711 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r--toolkit/source/controls/table/AccessibleGridControlBase.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/toolkit/source/controls/table/AccessibleGridControlBase.cxx b/toolkit/source/controls/table/AccessibleGridControlBase.cxx
index bafb961f6e56..9fc195a0b68c 100644
--- a/toolkit/source/controls/table/AccessibleGridControlBase.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlBase.cxx
@@ -74,10 +74,10 @@ void SAL_CALL AccessibleGridControlBase::disposing()
{
SolarMutexGuard g;
- if ( getClientId( ) )
+ if (m_aClientId)
{
- AccessibleEventNotifier::TClientId nId( getClientId( ) );
- setClientId( 0 );
+ AccessibleEventNotifier::TClientId nId = m_aClientId;
+ m_aClientId = 0;
AccessibleEventNotifier::revokeClientNotifyDisposing( nId, *this );
}
@@ -217,30 +217,30 @@ void SAL_CALL AccessibleGridControlBase::addAccessibleEventListener(
{
SolarMutexGuard g;
- if ( !getClientId( ) )
- setClientId( AccessibleEventNotifier::registerClient( ) );
+ if (!m_aClientId)
+ m_aClientId = AccessibleEventNotifier::registerClient();
- AccessibleEventNotifier::addEventListener( getClientId( ), _rxListener );
+ AccessibleEventNotifier::addEventListener(m_aClientId, _rxListener );
}
}
void SAL_CALL AccessibleGridControlBase::removeAccessibleEventListener(
const css::uno::Reference< css::accessibility::XAccessibleEventListener>& _rxListener )
{
- if( !(_rxListener.is() && getClientId( )) )
+ if (!(_rxListener.is() && m_aClientId))
return;
SolarMutexGuard g;
- sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener );
+ sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener(m_aClientId, _rxListener);
if ( !nListenerCount )
{
// no listeners anymore
// -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
// and at least to us not firing any events anymore, in case somebody calls
// NotifyAccessibleEvent, again
- AccessibleEventNotifier::TClientId nId( getClientId( ) );
- setClientId( 0 );
+ AccessibleEventNotifier::TClientId nId = m_aClientId;
+ m_aClientId = 0;
AccessibleEventNotifier::revokeClient( nId );
}
}
@@ -340,7 +340,7 @@ void AccessibleGridControlBase::commitEvent(
{
SolarMutexGuard g;
- if ( !getClientId( ) )
+ if (!m_aClientId)
// 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
return;
@@ -350,7 +350,7 @@ void AccessibleGridControlBase::commitEvent(
// let the notifier handle this event
- AccessibleEventNotifier::addEvent( getClientId( ), aEvent );
+ AccessibleEventNotifier::addEvent(m_aClientId, aEvent);
}
sal_Int16 SAL_CALL AccessibleGridControlBase::getAccessibleRole()