Author: orw Date: Tue Apr 1 11:24:46 2014 New Revision: 1583628 URL: http://svn.apache.org/r1583628 Log: 124553: <SwAcccessibleCell::SwAccessibleCell(..)> - correct initialization of new members introduced for IA2
cherry-picked from trunk Modified: openoffice/branches/AOO410/ (props changed) openoffice/branches/AOO410/main/ (props changed) openoffice/branches/AOO410/main/sw/source/core/access/acccell.cxx openoffice/branches/AOO410/main/sw/source/core/access/acccell.hxx Propchange: openoffice/branches/AOO410/ ------------------------------------------------------------------------------ Merged /openoffice/trunk:r1583589 Propchange: openoffice/branches/AOO410/main/ ------------------------------------------------------------------------------ Merged /openoffice/trunk/main:r1583589 Modified: openoffice/branches/AOO410/main/sw/source/core/access/acccell.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sw/source/core/access/acccell.cxx?rev=1583628&r1=1583627&r2=1583628&view=diff ============================================================================== --- openoffice/branches/AOO410/main/sw/source/core/access/acccell.cxx (original) +++ openoffice/branches/AOO410/main/sw/source/core/access/acccell.cxx Tue Apr 1 11:24:46 2014 @@ -114,17 +114,21 @@ SwAccessibleCell::SwAccessibleCell( SwAc : SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ) , aSelectionHelper( *this ) , bIsSelected( sal_False ) + , m_xTableReference( NULL ) + , m_pAccTable( NULL ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + vos::OGuard aGuard( Application::GetSolarMutex() ); OUString sBoxName( pCellFrm->GetTabBox()->GetName() ); SetName( sBoxName ); - bIsSelected = IsSelected(); + bIsSelected = IsSelected(); - //Need not assign the pointer of accessible table object to m_pAccTable, - //for it already done in SwAccessibleCell::GetTable(); Former codes: - //m_pAccTable= GetTable(); - GetTable(); + m_xTableReference = getAccessibleParent(); +#if OSL_DEBUG_LEVEL > 1 + uno::Reference< XAccessibleContext > xContextTable( m_xTableReference, uno::UNO_QUERY ); + OSL_ASSERT( xContextTable.is() && xContextTable->getAccessibleRole() == AccessibleRole::TABLE ); +#endif + m_pAccTable = static_cast< SwAccessibleTable * >( m_xTableReference.get() ); } sal_Bool SwAccessibleCell::_InvalidateMyCursorPos() @@ -556,20 +560,3 @@ void SwAccessibleCell::deselectAccessibl aSelectionHelper.deselectAccessibleChild(nSelectedChildIndex); } -SwAccessibleTable *SwAccessibleCell::GetTable() -{ - if (!m_pAccTable) - { - if (!xTableReference.is()) - { - xTableReference = getAccessibleParent(); - #ifdef OSL_DEBUG_LEVEL - uno::Reference<XAccessibleContext> xContextTable(xTableReference, uno::UNO_QUERY); - OSL_ASSERT(xContextTable.is() && xContextTable->getAccessibleRole() == AccessibleRole::TABLE); - #endif - //SwAccessibleTable aTable = *(static_cast<SwAccessibleTable *>(xTable.get())); - } - m_pAccTable = static_cast<SwAccessibleTable *>(xTableReference.get()); - } - return m_pAccTable; -} Modified: openoffice/branches/AOO410/main/sw/source/core/access/acccell.hxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sw/source/core/access/acccell.hxx?rev=1583628&r1=1583627&r2=1583628&view=diff ============================================================================== --- openoffice/branches/AOO410/main/sw/source/core/access/acccell.hxx (original) +++ openoffice/branches/AOO410/main/sw/source/core/access/acccell.hxx Tue Apr 1 11:24:46 2014 @@ -47,7 +47,10 @@ class SwAccessibleCell : public SwAccess SwAccessibleSelectionHelper aSelectionHelper; sal_Bool bIsSelected; // protected by base class mutex - sal_Bool IsSelected(); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xTableReference; + SwAccessibleTable *m_pAccTable; + + sal_Bool IsSelected(); sal_Bool _InvalidateMyCursorPos(); sal_Bool _InvalidateChildrenCursorPos( const SwFrm *pFrm ); @@ -171,9 +174,6 @@ public: throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException ); - SwAccessibleTable *GetTable(); - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xTableReference; - SwAccessibleTable *m_pAccTable; };