vcl/inc/accessibility/AccessibleBrowseBoxBase.hxx    |    3 --
 vcl/inc/accessibility/accessiblelistboxentry.hxx     |    6 ----
 vcl/source/accessibility/AccessibleBrowseBoxBase.cxx |   24 +++++++++----------
 vcl/source/accessibility/accessiblelistboxentry.cxx  |   19 +--------------
 4 files changed, 14 insertions(+), 38 deletions(-)

New commits:
commit f94c211a2185dc3b949bce34e3cb5e0b61a22044
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Jan 28 12:57:30 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jan 29 08:26:41 2025 +0100

    a11y: Drop AccessibleBrowseBoxBase::{g,s}etCliendId
    
    Use the m_aClientId member directly.
    
    Change-Id: I3ca53f664341f5481352ee502d475e91b4876e67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180846
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/inc/accessibility/AccessibleBrowseBoxBase.hxx 
b/vcl/inc/accessibility/AccessibleBrowseBoxBase.hxx
index f75aa59c2b16..43d03d42a906 100644
--- a/vcl/inc/accessibility/AccessibleBrowseBoxBase.hxx
+++ b/vcl/inc/accessibility/AccessibleBrowseBoxBase.hxx
@@ -291,9 +291,6 @@ protected:
     css::uno::Reference< css::awt::XWindow > m_xFocusWindow;
 
 private:
-    ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { 
return m_aClientId; }
-    void setClientId(::comphelper::AccessibleEventNotifier::TClientId 
_aNewClientId) { m_aClientId = _aNewClientId; }
-
     /** Localized name. */
     OUString maName;
     /** Localized description text. */
diff --git a/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx 
b/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx
index 396e95a10161..9ba89b3d2b2b 100644
--- a/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx
+++ b/vcl/source/accessibility/AccessibleBrowseBoxBase.cxx
@@ -98,10 +98,10 @@ void SAL_CALL AccessibleBrowseBoxBase::disposing()
         m_xFocusWindow->removeFocusListener( this );
     }
 
-    if ( getClientId( ) )
+    if (m_aClientId)
     {
-        AccessibleEventNotifier::TClientId nId( getClientId( ) );
-        setClientId( 0 );
+        AccessibleEventNotifier::TClientId nId(m_aClientId);
+        m_aClientId = 0;
         AccessibleEventNotifier::revokeClientNotifyDisposing( nId, *this );
     }
 
@@ -252,21 +252,21 @@ void SAL_CALL 
AccessibleBrowseBoxBase::addAccessibleEventListener(
     if ( _rxListener.is() )
     {
         ::osl::MutexGuard aGuard( getMutex() );
-        if ( !getClientId( ) )
-            setClientId( AccessibleEventNotifier::registerClient( ) );
+        if (!m_aClientId)
+            m_aClientId = AccessibleEventNotifier::registerClient();
 
-        AccessibleEventNotifier::addEventListener( getClientId( ), _rxListener 
);
+        AccessibleEventNotifier::addEventListener(m_aClientId, _rxListener);
     }
 }
 
 void SAL_CALL AccessibleBrowseBoxBase::removeAccessibleEventListener(
         const css::uno::Reference< 
css::accessibility::XAccessibleEventListener>& _rxListener )
 {
-    if( !(_rxListener.is() && getClientId( )) )
+    if (!(_rxListener.is() && m_aClientId))
         return;
 
     ::osl::MutexGuard aGuard( getMutex() );
-    sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( 
getClientId( ), _rxListener );
+    sal_Int32 nListenerCount = 
AccessibleEventNotifier::removeEventListener(m_aClientId, _rxListener );
     if ( !nListenerCount )
     {
         // no listeners anymore
@@ -274,8 +274,8 @@ void SAL_CALL 
AccessibleBrowseBoxBase::removeAccessibleEventListener(
         // 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 );
     }
 }
@@ -409,7 +409,7 @@ void AccessibleBrowseBoxBase::commitEvent(
         sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
 {
     osl::MutexGuard aGuard( getMutex() );
-    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;
@@ -419,7 +419,7 @@ void AccessibleBrowseBoxBase::commitEvent(
 
     // let the notifier handle this event
 
-    AccessibleEventNotifier::addEvent( getClientId( ), aEvent );
+    AccessibleEventNotifier::addEvent(m_aClientId, aEvent );
 }
 
 sal_Int16 SAL_CALL AccessibleBrowseBoxBase::getAccessibleRole()
commit a3cbbe9a885a72ae7addb8e06f62a5365a6de415
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Jan 28 12:49:11 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jan 29 08:26:35 2025 +0100

    a11y: Drop AccessibleListBoxEntry::getImplementationId override
    
    The base class implementation
    ImplInheritanceHelper::getImplementationId does the same.
    
    Change-Id: I81c550366c50e20157f034a1cb58709ea7891ad8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180845
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/inc/accessibility/accessiblelistboxentry.hxx 
b/vcl/inc/accessibility/accessiblelistboxentry.hxx
index 706cd5a6114e..87bab1a0cdb7 100644
--- a/vcl/inc/accessibility/accessiblelistboxentry.hxx
+++ b/vcl/inc/accessibility/accessiblelistboxentry.hxx
@@ -115,9 +115,6 @@ namespace accessibility
         virtual css::awt::Rectangle implGetBounds() override;
 
     private:
-        // XTypeProvider
-        virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
-
         // XServiceInfo
         virtual OUString SAL_CALL getImplementationName() override;
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName 
) override;
diff --git a/vcl/source/accessibility/accessiblelistboxentry.cxx 
b/vcl/source/accessibility/accessiblelistboxentry.cxx
index f22377166bcd..993627bcc4f1 100644
--- a/vcl/source/accessibility/accessiblelistboxentry.cxx
+++ b/vcl/source/accessibility/accessiblelistboxentry.cxx
@@ -181,12 +181,6 @@ namespace accessibility
         return vcl::unohelper::ConvertToAWTRect(GetBoundingBox_Impl());
     }
 
-    // XTypeProvider
-    Sequence< sal_Int8 > AccessibleListBoxEntry::getImplementationId()
-    {
-        return css::uno::Sequence<sal_Int8>();
-    }
-
 
     // XComponent
 
commit a93fc90a149ff6678486a50e7fa7558f9e3e6290
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Jan 28 12:44:30 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jan 29 08:26:27 2025 +0100

    a11y: No longer use AccessibleListBoxEntry::GetBoundingBox
    
    Instead use AccessibleListBoxEntry::GetBoundingBox_Impl directly
    in both callers, which already themselves do the same check + mutex
    locking that AccessibleListBoxEntry::GetBoundingBox does.
    
    Change-Id: I9b82cfc1d9000fcfbfa95e53739cc665005577aa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180841
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/inc/accessibility/accessiblelistboxentry.hxx 
b/vcl/inc/accessibility/accessiblelistboxentry.hxx
index 9330c4da2e84..706cd5a6114e 100644
--- a/vcl/inc/accessibility/accessiblelistboxentry.hxx
+++ b/vcl/inc/accessibility/accessiblelistboxentry.hxx
@@ -80,9 +80,6 @@ namespace accessibility
         bool                IsAlive_Impl() const;
         bool                IsShowing_Impl() const;
 
-        /// @throws css::lang::DisposedException
-        /// @throws css::uno::RuntimeException
-        tools::Rectangle               GetBoundingBox();
         /// @throws css::lang::IndexOutOfBoundsException
         void CheckActionIndex(sal_Int32 nIndex);
         /// @throws css::lang::DisposedException
diff --git a/vcl/source/accessibility/accessiblelistboxentry.cxx 
b/vcl/source/accessibility/accessiblelistboxentry.cxx
index e6b690026635..f22377166bcd 100644
--- a/vcl/source/accessibility/accessiblelistboxentry.cxx
+++ b/vcl/source/accessibility/accessiblelistboxentry.cxx
@@ -146,15 +146,6 @@ namespace accessibility
         return bShowing;
     }
 
-    tools::Rectangle AccessibleListBoxEntry::GetBoundingBox()
-    {
-        SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( m_aMutex );
-
-        EnsureIsAlive();
-        return GetBoundingBox_Impl();
-    }
-
     void AccessibleListBoxEntry::CheckActionIndex(sal_Int32 nIndex)
     {
         if (nIndex < 0 || nIndex >= getAccessibleActionCount())
@@ -550,7 +541,7 @@ namespace accessibility
         if ( pEntry )
         {
             vcl::ControlLayoutData aLayoutData;
-            tools::Rectangle aItemRect = GetBoundingBox();
+            tools::Rectangle aItemRect = GetBoundingBox_Impl();
             m_pTreeListBox->RecordLayoutData( &aLayoutData, aItemRect );
             tools::Rectangle aCharRect = aLayoutData.GetCharacterBounds( 
nIndex );
             aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() );
@@ -572,7 +563,7 @@ namespace accessibility
         if ( pEntry )
         {
             vcl::ControlLayoutData aLayoutData;
-            tools::Rectangle aItemRect = GetBoundingBox();
+            tools::Rectangle aItemRect = GetBoundingBox_Impl();
             m_pTreeListBox->RecordLayoutData( &aLayoutData, aItemRect );
             Point aPnt(vcl::unohelper::ConvertToVCLPoint(aPoint));
             aPnt += aItemRect.TopLeft();

Reply via email to