chart2/source/controller/accessibility/AccessibleBase.cxx | 1 editeng/source/accessibility/AccessibleContextBase.cxx | 26 ++++---------- include/editeng/AccessibleContextBase.hxx | 8 ---- sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 18 ++++----- sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 10 ++--- sd/source/ui/accessibility/AccessibleOutlineView.cxx | 6 +-- sd/source/ui/accessibility/AccessiblePageShape.cxx | 8 ++-- sd/source/ui/slidesorter/controller/SlsListener.cxx | 8 ---- sd/source/ui/slidesorter/controller/SlsListener.hxx | 9 ---- starmath/source/accessibility.cxx | 1 svx/source/accessibility/AccessibleGraphicShape.cxx | 2 - svx/source/accessibility/AccessibleOLEShape.cxx | 2 - svx/source/accessibility/AccessibleShape.cxx | 16 ++++---- svx/source/table/accessiblecell.cxx | 14 +++---- svx/source/table/accessibletableshape.cxx | 2 - vcl/source/app/unohelp.cxx | 2 - 16 files changed, 48 insertions(+), 85 deletions(-)
New commits: commit 273acb10424e56dd2b0b21f30b28a63fc73953ba Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 10 17:59:28 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Apr 10 19:45:15 2025 +0200 sd a11y: Drop unnecessary XAccessibleEventListener inheritance There's no reason for sd::slidesorter::controller::Listener to implement the XAccessibleEventListener interface and its XAccessibleEventListener::notifyEvent does nothing. Therefore, drop the inheritance. Change-Id: Ibe4379514daa4910c26ea42d607afe1d67f1fa6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183983 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 34381b2b702e..43033a4d3fb0 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -46,7 +46,6 @@ #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> -using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; @@ -481,13 +480,6 @@ void SAL_CALL Listener::frameAction (const frame::FrameActionEvent& rEvent) } } -//===== accessibility::XAccessibleEventListener ============================== - -void SAL_CALL Listener::notifyEvent ( - const AccessibleEventObject& ) -{ -} - void Listener::disposing(std::unique_lock<std::mutex>&) { ReleaseListeners(); diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx index eff02cf19825..910541da4173 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.hxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx @@ -22,8 +22,8 @@ #include <controller/SlideSorterController.hxx> #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/beans/XPropertyChangeListener.hpp> -#include <com/sun/star/accessibility/XAccessibleEventListener.hpp> #include <com/sun/star/frame/XFrameActionListener.hpp> +#include <com/sun/star/lang/XEventListener.hpp> #include <comphelper/compbase.hxx> #include <cppuhelper/weakref.hxx> @@ -45,7 +45,6 @@ namespace sd::slidesorter::controller { typedef comphelper::WeakComponentImplHelper< css::document::XEventListener, css::beans::XPropertyChangeListener, - css::accessibility::XAccessibleEventListener, css::frame::XFrameActionListener > ListenerInterfaceBase; @@ -99,12 +98,6 @@ public: propertyChange ( const css::beans::PropertyChangeEvent& rEvent) override; - //===== accessibility::XAccessibleEventListener ========================== - virtual void SAL_CALL - notifyEvent ( - const css::accessibility::AccessibleEventObject& - rEvent) override; - //===== frame::XFrameActionListener ====================================== /** For certain actions the listener connects to a new controller of the frame it is listening to. This usually happens when the view shell commit 99ece4e8018dd018aef79046aa465aa79c0a35e2 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 10 17:47:08 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Apr 10 19:45:08 2025 +0200 a11y: Drop unused includes Change-Id: Ib0e4fe99d35c7b5735dc6cbe61705588ee8c84b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183982 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 8554096c171c..a5ce1667559f 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -25,7 +25,6 @@ #include <ChartController.hxx> #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <com/sun/star/accessibility/AccessibleEventObject.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/drawing/LineStyle.hpp> diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index d34746c862a0..176811f64154 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -20,7 +20,6 @@ #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleTextType.hpp> -#include <com/sun/star/accessibility/AccessibleEventObject.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <unotools/accessiblerelationsethelper.hxx> diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index 05ac38c4fa7e..044165a7c189 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -29,8 +29,6 @@ #include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/awt/FontWidth.hpp> #include <com/sun/star/awt/XExtendedToolkit.hpp> -#include <com/sun/star/accessibility/AccessibleEventObject.hpp> -#include <com/sun/star/accessibility/AccessibleStateType.hpp> using namespace ::com::sun::star; commit fcd88d5ceb98b201825b1ec15fe2add1911c8b90 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 10 17:43:18 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Apr 10 19:45:00 2025 +0200 editeng a11y: Drop AccessibleContextBase::ThrowIfDisposed Use the equivalent base class method OAccessibleComponentHelper::ensureAlive instead. Change-Id: I17a87b743d2a7b324cd4ae04cb1b924c676f0195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183979 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx index af4ffeec864d..ff425091d9c0 100644 --- a/editeng/source/accessibility/AccessibleContextBase.cxx +++ b/editeng/source/accessibility/AccessibleContextBase.cxx @@ -176,7 +176,7 @@ sal_Int64 SAL_CALL uno::Reference<XAccessible> SAL_CALL AccessibleContextBase::getAccessibleChild (sal_Int64 nIndex) { - ThrowIfDisposed (); + ensureAlive(); throw lang::IndexOutOfBoundsException ( "no child with index " + OUString::number(nIndex), nullptr); @@ -186,7 +186,7 @@ uno::Reference<XAccessible> SAL_CALL uno::Reference<XAccessible> SAL_CALL AccessibleContextBase::getAccessibleParent() { - ThrowIfDisposed (); + ensureAlive(); return mxParent; } @@ -194,7 +194,7 @@ uno::Reference<XAccessible> SAL_CALL sal_Int64 SAL_CALL AccessibleContextBase::getAccessibleIndexInParent() { - ThrowIfDisposed (); + ensureAlive(); // Use a simple but slow solution for now. Optimize later. // Iterate over all the parent's children and search for this object. @@ -229,7 +229,7 @@ sal_Int64 SAL_CALL sal_Int16 SAL_CALL AccessibleContextBase::getAccessibleRole() { - ThrowIfDisposed (); + ensureAlive(); return maRole; } @@ -237,7 +237,7 @@ sal_Int16 SAL_CALL OUString SAL_CALL AccessibleContextBase::getAccessibleDescription() { - ThrowIfDisposed (); + ensureAlive(); return msDescription; } @@ -246,7 +246,7 @@ OUString SAL_CALL OUString SAL_CALL AccessibleContextBase::getAccessibleName() { - ThrowIfDisposed (); + ensureAlive(); if (meNameOrigin == NotSet) { @@ -265,7 +265,7 @@ OUString SAL_CALL uno::Reference<XAccessibleRelationSet> SAL_CALL AccessibleContextBase::getAccessibleRelationSet() { - ThrowIfDisposed (); + ensureAlive(); // Create a copy of the relation set and return it. if (mxRelationSet) @@ -302,7 +302,7 @@ sal_Int64 SAL_CALL lang::Locale SAL_CALL AccessibleContextBase::getLocale() { - ThrowIfDisposed (); + ensureAlive(); // Delegate request to parent. if (mxParent.is()) { @@ -451,16 +451,6 @@ void AccessibleContextBase::CommitChange ( NotifyAccessibleEvent(nEventId, rOldValue, rNewValue, nValueIndex); } -void AccessibleContextBase::ThrowIfDisposed() -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - { - throw lang::DisposedException (u"object has been already disposed"_ustr, - getXWeak()); - } -} - - bool AccessibleContextBase::IsDisposed() const { return (rBHelper.bDisposed || rBHelper.bInDispose); diff --git a/include/editeng/AccessibleContextBase.hxx b/include/editeng/AccessibleContextBase.hxx index f9be0b195b36..ef1d80fb269b 100644 --- a/include/editeng/AccessibleContextBase.hxx +++ b/include/editeng/AccessibleContextBase.hxx @@ -273,14 +273,6 @@ protected: */ virtual OUString CreateAccessibleName(); - /** Check whether or not the object has been disposed (or is in the - state of being disposed). If that is the case then - DisposedException is thrown to inform the (indirect) caller of the - foul deed. - @throws css::lang::DisposedException - */ - void ThrowIfDisposed(); - /** sets the role as returned by XaccessibleContext::getAccessibleRole <p>Caution: This is only to be used in the construction phase (means within diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index c9e2fa848e6a..39ce21249ab3 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -220,7 +220,7 @@ void AccessibleDocumentViewBase::ViewForwarderChanged() Reference<XAccessible> SAL_CALL AccessibleDocumentViewBase::getAccessibleParent() { - ThrowIfDisposed (); + ensureAlive(); return AccessibleContextBase::getAccessibleParent(); } @@ -228,7 +228,7 @@ Reference<XAccessible> SAL_CALL sal_Int64 SAL_CALL AccessibleDocumentViewBase::getAccessibleChildCount() { - ThrowIfDisposed (); + ensureAlive (); if (mxAccessibleOLEObject.is()) return 1; @@ -239,7 +239,7 @@ sal_Int64 SAL_CALL Reference<XAccessible> SAL_CALL AccessibleDocumentViewBase::getAccessibleChild (sal_Int64 nIndex) { - ThrowIfDisposed (); + ensureAlive(); ::osl::MutexGuard aGuard (m_aMutex); if (mxAccessibleOLEObject.is()) @@ -259,7 +259,7 @@ uno::Reference<XAccessible > SAL_CALL AccessibleDocumentViewBase::getAccessibleAtPoint ( const awt::Point& aPoint) { - ThrowIfDisposed (); + ensureAlive(); ::osl::MutexGuard aGuard (m_aMutex); uno::Reference<XAccessible> xChildAtPosition; @@ -369,7 +369,7 @@ OUString SAL_CALL css::uno::Sequence< OUString> SAL_CALL AccessibleDocumentViewBase::getSupportedServiceNames() { - ThrowIfDisposed (); + ensureAlive(); return AccessibleContextBase::getSupportedServiceNames (); } @@ -430,7 +430,7 @@ void AccessibleDocumentViewBase::impl_dispose() void SAL_CALL AccessibleDocumentViewBase::disposing (const lang::EventObject& rEventObject) { - ThrowIfDisposed (); + ensureAlive(); // Register this object as dispose event and document::XEventListener // listener at the model. @@ -494,14 +494,14 @@ void SAL_CALL void AccessibleDocumentViewBase::focusGained (const css::awt::FocusEvent& e) { - ThrowIfDisposed (); + ensureAlive(); if (e.Source == mxWindow) Activated (); } void AccessibleDocumentViewBase::focusLost (const css::awt::FocusEvent& e) { - ThrowIfDisposed (); + ensureAlive(); if (e.Source == mxWindow) Deactivated (); } @@ -708,7 +708,7 @@ sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground( ) sal_Int32 SAL_CALL AccessibleDocumentViewBase::getBackground( ) { - ThrowIfDisposed (); + ensureAlive(); ::osl::MutexGuard aGuard (m_aMutex); return sal_Int32(mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor); } diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index abf5a5ffb046..aed59d8ddfd8 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -186,7 +186,7 @@ rtl::Reference<AccessiblePageShape> AccessibleDrawDocumentView::CreateDrawPageSh sal_Int64 SAL_CALL AccessibleDrawDocumentView::getAccessibleChildCount() { - ThrowIfDisposed (); + ensureAlive(); sal_Int64 nChildCount = AccessibleDocumentViewBase::getAccessibleChildCount(); @@ -200,7 +200,7 @@ sal_Int64 SAL_CALL uno::Reference<XAccessible> SAL_CALL AccessibleDrawDocumentView::getAccessibleChild (sal_Int64 nIndex) { - ThrowIfDisposed (); + ensureAlive(); ::osl::ClearableMutexGuard aGuard (m_aMutex); @@ -268,7 +268,7 @@ OUString SAL_CALL void SAL_CALL AccessibleDrawDocumentView::disposing (const lang::EventObject& rEventObject) { - ThrowIfDisposed (); + ensureAlive(); AccessibleDocumentViewBase::disposing (rEventObject); if (rEventObject.Source == mxModel) @@ -285,7 +285,7 @@ void SAL_CALL void SAL_CALL AccessibleDrawDocumentView::propertyChange (const beans::PropertyChangeEvent& rEventObject) { - ThrowIfDisposed (); + ensureAlive(); AccessibleDocumentViewBase::propertyChange (rEventObject); @@ -381,7 +381,7 @@ OUString SAL_CALL css::uno::Sequence< OUString> SAL_CALL AccessibleDrawDocumentView::getSupportedServiceNames() { - ThrowIfDisposed(); + ensureAlive(); const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleDrawDocumentView"_ustr }; uno::Sequence<OUString> aServiceNames = AccessibleDocumentViewBase::getSupportedServiceNames(); diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx index f2e8aa340da9..620585df1d4b 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx @@ -96,7 +96,7 @@ void AccessibleOutlineView::ViewForwarderChanged() sal_Int64 SAL_CALL AccessibleOutlineView::getAccessibleChildCount() { - ThrowIfDisposed (); + ensureAlive(); // forward return maTextHelper.GetChildCount(); @@ -105,7 +105,7 @@ sal_Int64 SAL_CALL uno::Reference<XAccessible> SAL_CALL AccessibleOutlineView::getAccessibleChild (sal_Int64 nIndex) { - ThrowIfDisposed (); + ensureAlive(); // Forward request to children manager. return maTextHelper.GetChild(nIndex); } @@ -196,7 +196,7 @@ void SAL_CALL AccessibleOutlineView::disposing() void SAL_CALL AccessibleOutlineView::propertyChange (const beans::PropertyChangeEvent& rEventObject) { - ThrowIfDisposed (); + ensureAlive(); AccessibleDocumentViewBase::propertyChange (rEventObject); diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx index 7d8e506bd53e..069486dec576 100644 --- a/sd/source/ui/accessibility/AccessiblePageShape.cxx +++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx @@ -136,7 +136,7 @@ awt::Rectangle AccessiblePageShape::implGetBounds() sal_Int32 SAL_CALL AccessiblePageShape::getForeground() { - ThrowIfDisposed (); + ensureAlive(); sal_Int32 nColor (0x0ffffffL); try @@ -160,7 +160,7 @@ sal_Int32 SAL_CALL AccessiblePageShape::getForeground() */ sal_Int32 SAL_CALL AccessiblePageShape::getBackground() { - ThrowIfDisposed (); + ensureAlive(); sal_Int32 nColor (0x01020ffL); try @@ -206,14 +206,14 @@ sal_Int32 SAL_CALL AccessiblePageShape::getBackground() OUString SAL_CALL AccessiblePageShape::getImplementationName() { - ThrowIfDisposed (); + ensureAlive(); return u"AccessiblePageShape"_ustr; } css::uno::Sequence< OUString> SAL_CALL AccessiblePageShape::getSupportedServiceNames() { - ThrowIfDisposed (); + ensureAlive(); return AccessibleShape::getSupportedServiceNames(); } diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx index ff5e92e95527..e9222887b997 100644 --- a/svx/source/accessibility/AccessibleGraphicShape.cxx +++ b/svx/source/accessibility/AccessibleGraphicShape.cxx @@ -103,7 +103,7 @@ OUString SAL_CALL css::uno::Sequence< OUString> SAL_CALL AccessibleGraphicShape::getSupportedServiceNames() { - ThrowIfDisposed (); + ensureAlive(); const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleGraphicShape"_ustr }; return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals); } diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx index 33cce7ac3b90..ed7329decd1f 100644 --- a/svx/source/accessibility/AccessibleOLEShape.cxx +++ b/svx/source/accessibility/AccessibleOLEShape.cxx @@ -110,7 +110,7 @@ OUString SAL_CALL css::uno::Sequence< OUString> SAL_CALL AccessibleOLEShape::getSupportedServiceNames() { - ThrowIfDisposed(); + ensureAlive(); const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleOLEShape"_ustr }; return comphelper::concatSequences(AccessibleShape::getSupportedServiceNames(), vals); } diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index ef5718df577b..33f4c1111b56 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -277,7 +277,7 @@ bool AccessibleShape::GetState (sal_Int64 aState) // OverWrite the parent's getAccessibleName method OUString SAL_CALL AccessibleShape::getAccessibleName() { - ThrowIfDisposed (); + ensureAlive(); if (m_pShape && !m_pShape->GetTitle().isEmpty()) return CreateAccessibleName() + " " + m_pShape->GetTitle(); else @@ -286,7 +286,7 @@ OUString SAL_CALL AccessibleShape::getAccessibleName() OUString SAL_CALL AccessibleShape::getAccessibleDescription() { - ThrowIfDisposed (); + ensureAlive(); if( m_pShape && !m_pShape->GetDescription().isEmpty()) return m_pShape->GetDescription() ; @@ -324,7 +324,7 @@ sal_Int64 SAL_CALL uno::Reference<XAccessible> SAL_CALL AccessibleShape::getAccessibleChild (sal_Int64 nIndex) { - ThrowIfDisposed (); + ensureAlive(); uno::Reference<XAccessible> xChild; @@ -572,7 +572,7 @@ awt::Rectangle AccessibleShape::implGetBounds() sal_Int32 SAL_CALL AccessibleShape::getForeground() { - ThrowIfDisposed (); + ensureAlive(); sal_Int32 nColor (0x0ffffffL); try @@ -595,7 +595,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground() sal_Int32 SAL_CALL AccessibleShape::getBackground() { - ThrowIfDisposed (); + ensureAlive(); Color nColor; try @@ -792,7 +792,7 @@ OUString SAL_CALL uno::Sequence<OUString> SAL_CALL AccessibleShape::getSupportedServiceNames() { - ThrowIfDisposed (); + ensureAlive(); const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleShape"_ustr }; return comphelper::concatSequences(AccessibleContextBase::getSupportedServiceNames(), vals); } @@ -801,7 +801,7 @@ uno::Sequence<OUString> SAL_CALL uno::Sequence<uno::Type> SAL_CALL AccessibleShape::getTypes() { - ThrowIfDisposed (); + ensureAlive(); // Get list of types from the context base implementation, ... uno::Sequence<uno::Type> aTypeList (AccessibleContextBase::getTypes()); // ... define local types @@ -975,7 +975,7 @@ void AccessibleShape::disposing() sal_Int64 SAL_CALL AccessibleShape::getAccessibleIndexInParent() { - ThrowIfDisposed (); + ensureAlive(); // Use a simple but slow solution for now. Optimize later. sal_Int64 nIndex = m_nIndexInParent; diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index b2ba84a5a8df..7d9605a71a0f 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -131,7 +131,7 @@ bool AccessibleCell::ResetState (sal_Int64 aState) sal_Int64 SAL_CALL AccessibleCell::getAccessibleChildCount() { SolarMutexGuard aSolarGuard; - ThrowIfDisposed (); + ensureAlive(); return mpText != nullptr ? mpText->GetChildCount () : 0; } @@ -142,7 +142,7 @@ sal_Int64 SAL_CALL AccessibleCell::getAccessibleChildCount() Reference<XAccessible> SAL_CALL AccessibleCell::getAccessibleChild (sal_Int64 nIndex) { SolarMutexGuard aSolarGuard; - ThrowIfDisposed (); + ensureAlive(); return mpText->GetChild (nIndex); } @@ -288,7 +288,7 @@ css::awt::Rectangle AccessibleCell::implGetBounds() sal_Int32 SAL_CALL AccessibleCell::getForeground() { - ThrowIfDisposed (); + ensureAlive(); // todo return sal_Int32(0x0ffffffL); @@ -297,7 +297,7 @@ sal_Int32 SAL_CALL AccessibleCell::getForeground() sal_Int32 SAL_CALL AccessibleCell::getBackground() { - ThrowIfDisposed (); + ensureAlive(); // todo return 0; @@ -335,7 +335,7 @@ OUString SAL_CALL AccessibleCell::getImplementationName() Sequence<OUString> SAL_CALL AccessibleCell::getSupportedServiceNames() { - ThrowIfDisposed (); + ensureAlive(); const css::uno::Sequence<OUString> vals { u"com.sun.star.drawing.AccessibleCell"_ustr }; return comphelper::concatSequences(AccessibleContextBase::getSupportedServiceNames(), vals); } @@ -385,7 +385,7 @@ void AccessibleCell::disposing() sal_Int64 SAL_CALL AccessibleCell::getAccessibleIndexInParent() { - ThrowIfDisposed (); + ensureAlive(); return mnIndexInParent; } @@ -429,7 +429,7 @@ OUString AccessibleCell::getCellName( sal_Int32 nCol, sal_Int32 nRow ) OUString SAL_CALL AccessibleCell::getAccessibleName() { - ThrowIfDisposed (); + ensureAlive(); SolarMutexGuard aSolarGuard; if( pAccTable ) diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index a46ee0be467e..56896cd59d40 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -401,7 +401,7 @@ sal_Int64 SAL_CALL AccessibleTableShape::getAccessibleChildCount( ) Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleChild( sal_Int64 i ) { SolarMutexGuard aSolarGuard; - ThrowIfDisposed(); + ensureAlive(); return mxImpl->getAccessibleChild( i ); }