a11y: Use OAccessibleComponentHelper::isAlive
Use it to implement (inverted) logic in AccessibleContextBase::IsDisposed and replace uses of the latter in subclasses by using the (protected) OAccessibleComponentHelper::isAlive directly. Change-Id: Ib033097dfac9e7a986cb0334caf7ac568ad4300a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184793 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
parent
aa5064a897
commit
a6d08b80bc
@ -417,7 +417,7 @@ void AccessibleContextBase::CommitChange (
|
||||
|
||||
bool AccessibleContextBase::IsDisposed() const
|
||||
{
|
||||
return (rBHelper.bDisposed || rBHelper.bInDispose);
|
||||
return !isAlive();
|
||||
}
|
||||
|
||||
|
||||
|
@ -457,7 +457,7 @@ void SAL_CALL AccessibleDocumentViewBase::propertyChange (const beans::PropertyC
|
||||
void SAL_CALL
|
||||
AccessibleDocumentViewBase::windowResized (const css::awt::WindowEvent& )
|
||||
{
|
||||
if( IsDisposed() )
|
||||
if (!isAlive())
|
||||
return;
|
||||
|
||||
ViewForwarderChanged();
|
||||
@ -466,7 +466,7 @@ void SAL_CALL
|
||||
void SAL_CALL
|
||||
AccessibleDocumentViewBase::windowMoved (const css::awt::WindowEvent& )
|
||||
{
|
||||
if( IsDisposed() )
|
||||
if (!isAlive())
|
||||
return;
|
||||
|
||||
ViewForwarderChanged();
|
||||
@ -475,7 +475,7 @@ void SAL_CALL
|
||||
void SAL_CALL
|
||||
AccessibleDocumentViewBase::windowShown (const css::lang::EventObject& )
|
||||
{
|
||||
if( IsDisposed() )
|
||||
if (!isAlive())
|
||||
return;
|
||||
|
||||
ViewForwarderChanged();
|
||||
@ -484,7 +484,7 @@ void SAL_CALL
|
||||
void SAL_CALL
|
||||
AccessibleDocumentViewBase::windowHidden (const css::lang::EventObject& )
|
||||
{
|
||||
if( IsDisposed() )
|
||||
if (!isAlive())
|
||||
return;
|
||||
|
||||
ViewForwarderChanged();
|
||||
|
@ -142,7 +142,7 @@ OUString SAL_CALL
|
||||
void SAL_CALL AccessibleOutlineView::addAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
|
||||
{
|
||||
// delegate listener handling to children manager.
|
||||
if ( ! IsDisposed())
|
||||
if (isAlive())
|
||||
maTextHelper.AddEventListener(xListener);
|
||||
AccessibleContextBase::addEventListener(xListener);
|
||||
}
|
||||
@ -150,7 +150,7 @@ void SAL_CALL AccessibleOutlineView::addAccessibleEventListener( const uno::Refe
|
||||
void SAL_CALL AccessibleOutlineView::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
|
||||
{
|
||||
// forward
|
||||
if ( ! IsDisposed())
|
||||
if (isAlive())
|
||||
maTextHelper.RemoveEventListener(xListener);
|
||||
AccessibleContextBase::removeEventListener(xListener);
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ OUString SAL_CALL AccessibleShape::getAccessibleDescription()
|
||||
sal_Int64 SAL_CALL
|
||||
AccessibleShape::getAccessibleChildCount ()
|
||||
{
|
||||
if (IsDisposed())
|
||||
if (!isAlive())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -380,7 +380,7 @@ sal_Int64 SAL_CALL
|
||||
{
|
||||
::osl::MutexGuard aGuard (m_aMutex);
|
||||
|
||||
if (IsDisposed())
|
||||
if (!isAlive())
|
||||
{
|
||||
// Return a minimal state set that only contains the DEFUNC state.
|
||||
return AccessibleContextBase::getAccessibleStateSet ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user