diff options
-rw-r--r-- | accessibility/inc/accessibility/extended/AccessibleGridControl.hxx | 2 | ||||
-rw-r--r-- | accessibility/source/extended/AccessibleGridControl.cxx | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx index c4ed353c28f6..3752fccf3eba 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx @@ -195,7 +195,7 @@ class AccessibleGridControlAccess :public AccessibleGridControlAccess_Base private: ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent; - ::svt::table::IAccessibleTable& m_rTable; + ::svt::table::IAccessibleTable * m_pTable; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > m_xContext; diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 8ce58001b046..c56f6bd3e85e 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -407,10 +407,11 @@ void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNe // ============================================================================ // ----------------------------------------------------------------------------- -AccessibleGridControlAccess::AccessibleGridControlAccess( const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable ) - :m_xParent( _rxParent ) - ,m_rTable( _rTable ) - ,m_pContext( NULL ) +AccessibleGridControlAccess::AccessibleGridControlAccess( + const Reference< XAccessible >& rxParent, IAccessibleTable& rTable ) + : m_xParent( rxParent ) + , m_pTable( & rTable ) + , m_pContext( 0 ) { } @@ -424,6 +425,7 @@ void AccessibleGridControlAccess::dispose() { SolarMutexGuard g; + m_pTable = 0; m_pContext = NULL; ::comphelper::disposeComponent( m_xContext ); } @@ -441,8 +443,9 @@ Reference< XAccessibleContext > SAL_CALL AccessibleGridControlAccess::getAccessi if ( m_pContext && !m_pContext->isAlive() ) m_xContext = m_pContext = NULL; - if ( !m_xContext.is() ) - m_xContext = m_pContext = new AccessibleGridControl( m_xParent, this, m_rTable ); + if (!m_xContext.is() && m_pTable) + m_xContext = m_pContext = + new AccessibleGridControl(m_xParent, this, *m_pTable); return m_xContext; } |