From 2095b2e1d44a158418d17836019352ed92f95d21 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Fri, 31 Aug 2012 00:46:39 -0500 Subject: gridfixes: copied #i112562#'s fix from CWS gridcontrol06 herein Change-Id: Ifa29a8b3c027970d46844b428a3529e680c0b09c Reviewed-on: https://gerrit.libreoffice.org/541 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- .../extended/AccessibleGridControl.hxx | 37 +++++++++- .../extended/AccessibleGridControlBase.hxx | 1 - .../extended/AccessibleGridControlTable.hxx | 10 ++- .../extended/AccessibleGridControlTableBase.hxx | 8 +++ .../source/extended/AccessibleGridControl.cxx | 83 ++++++++++++++++++++++ .../source/extended/AccessibleGridControlBase.cxx | 9 +++ .../extended/AccessibleGridControlHeader.cxx | 16 ++++- .../extended/AccessibleGridControlHeaderCell.cxx | 19 ++++- .../source/extended/AccessibleGridControlTable.cxx | 61 ++++++++++++++-- .../extended/AccessibleGridControlTableCell.cxx | 18 ++++- 10 files changed, 248 insertions(+), 14 deletions(-) (limited to 'accessibility') diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx index 9df2f960cf2b..81bdf2a7cd8b 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx @@ -35,7 +35,6 @@ #include #include - #include using namespace ::svt::table; @@ -112,6 +111,28 @@ protected: public: // helper functions + + /** commitCellEvent commit the event at all listeners of the table + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + */ + void commitCellEvent(sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue, + const ::com::sun::star::uno::Any& rOldValue); + + /** commitTableEvent commit the event at all listeners of the table + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + */ + void commitTableEvent(sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue, + const ::com::sun::star::uno::Any& rOldValue); /** returns the accessible object for the row or the column header bar */ inline ::com::sun::star::uno::Reference< @@ -243,6 +264,20 @@ protected: xAccessible = pContext->getTable(); return xAccessible; } + virtual void commitCellEvent( sal_Int16 nEventId, + const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue ) + { + AccessibleGridControl* pContext( getContext() ); + if ( pContext ) + pContext->commitCellEvent( nEventId, rNewValue, rOldValue ); + } + virtual void commitTableEvent( sal_Int16 nEventId, + const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue ) + { + AccessibleGridControl* pContext( getContext() ); + if ( pContext ) + pContext->commitTableEvent( nEventId, rNewValue, rOldValue ); + } virtual void commitEvent( sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue ) { diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx index 7c4d22ed720a..c032e38d3959 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx index 65d573a3d128..95acb0d31371 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx @@ -33,6 +33,7 @@ #include "accessibility/extended/AccessibleGridControlTableBase.hxx" #include #include +#include // ============================================================================ @@ -56,7 +57,9 @@ public: protected: virtual ~AccessibleGridControlTable(); - +private: + std::vector< AccessibleGridControlTableCell* > m_pCellVector; + std::vector< com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible> > m_pAccessCellVector; public: // XAccessibleContext ----------------------------------------------------- @@ -197,6 +200,11 @@ public: virtual OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException ); + /**@return m_pCellVector*/ + std::vector< AccessibleGridControlTableCell* >& getCellVector(); + /**@return m_xAccessCellVector*/ + std::vector< com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible > >& getAccessibleCellVector(); + protected: // internal virtual methods ----------------------------------------------- diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx index daa6fd179ef6..54491c24272e 100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx @@ -174,6 +174,14 @@ public: protected: // internal helper methods ------------------------------------------------ +// /** @attention This method requires locked mutex's and a living object. +// @param nColumn +// the position of the column in the Accessible world +// @return +// the position of the column in VCL the Accessible world +// */ +// sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const; + /** @attention This method requires locked mutex's and a living object. @return The number of cells of the table. */ sal_Int32 implGetChildCount() const; diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index a093318ffd3a..e8058eab628d 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -29,6 +29,9 @@ #include "accessibility/extended/AccessibleGridControl.hxx" #include "accessibility/extended/AccessibleGridControlTable.hxx" #include "accessibility/extended/AccessibleGridControlHeader.hxx" +#include +#include +#include #include #include #include @@ -68,6 +71,12 @@ public: Reference< ::com::sun::star::accessibility::XAccessible > m_xColumnHeaderBar; AccessibleGridControlHeader* m_pColumnHeaderBar; + + /** The table cell child. */ + Reference< + ::com::sun::star::accessibility::XAccessible > m_xCell; + AccessibleGridControlTableCell* m_pCell; + }; AccessibleGridControl::AccessibleGridControl( @@ -92,6 +101,7 @@ void SAL_CALL AccessibleGridControl::disposing() m_pImpl->m_pTable = NULL; m_pImpl->m_pColumnHeaderBar = NULL; m_pImpl->m_pRowHeaderBar = NULL; + m_pImpl->m_pCell = NULL; m_pImpl->m_aCreator = Reference< XAccessible >(); Reference< XAccessible > xTable = m_pImpl->m_xTable; @@ -101,7 +111,16 @@ void SAL_CALL AccessibleGridControl::disposing() { xComp->dispose(); } + Reference< XAccessible > xCell = m_pImpl->m_xCell; + + Reference< XComponent > xCellComp( m_pImpl->m_xCell, UNO_QUERY ); + if ( xCellComp.is() ) + { + xCellComp->dispose(); + } + ::comphelper::disposeComponent(m_pImpl->m_xRowHeaderBar); + ::comphelper::disposeComponent(m_pImpl->m_xColumnHeaderBar); AccessibleGridControlBase::disposing(); } // ----------------------------------------------------------------------------- @@ -151,8 +170,12 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex ) } else { + if(!m_pImpl->m_xTable.is()) + { AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_pImpl->m_aCreator, m_aTable, svt::table::TCTYPE_TABLE); m_pImpl->m_xTable = pTable; + m_pImpl->m_pTable = pTable; + } xChild = m_pImpl->m_xTable; } } @@ -311,6 +334,66 @@ AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" ); return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); } +// ----------------------------------------------------------------------------- +void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNewValue,const Any& _rOldValue) +{ + sal_Int32 nChildCount = getAccessibleChildCount(); + if(nChildCount != 0) + { + for(sal_Int32 i=0;i xAccessible = getAccessibleChild(i); + com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext > xAccessibleChild = xAccessible->getAccessibleContext(); + if(m_pImpl->m_xTable == xAccessible) + { + std::vector< AccessibleGridControlTableCell* > xCellCont = m_pImpl->m_pTable->getCellVector(); + int nIndex = m_aTable.GetCurrentRow()*m_aTable.GetColumnCount()+m_aTable.GetCurrentColumn(); + if(!xCellCont.empty() && xCellCont[nIndex]) + { + m_pImpl->m_pCell = xCellCont[nIndex]; + m_pImpl->m_pCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); + } + } + } + } + else + { + if ( m_pImpl->m_xTable.is() ) + m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + } +} + +void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNewValue,const Any& _rOldValue) +{ + if ( m_pImpl->m_xTable.is() ) + { + if(_nEventId == AccessibleEventId::ACTIVE_DESCENDANT_CHANGED) + { + Reference< XAccessible > xChild = m_pImpl->m_pTable->getAccessibleChild(m_aTable.GetCurrentRow()*m_aTable.GetColumnCount()+m_aTable.GetCurrentColumn()); + m_pImpl->m_pTable->commitEvent(_nEventId, makeAny(xChild),_rOldValue); + } + else if(_nEventId == AccessibleEventId::TABLE_MODEL_CHANGED) + { + AccessibleTableModelChange aChange; + if(_rNewValue >>= aChange) + { + if(aChange.Type == AccessibleTableModelChangeType::DELETE) + { + std::vector< AccessibleGridControlTableCell* >::iterator m_pCell = m_pImpl->m_pTable->getCellVector().begin(); + std::vector< Reference< XAccessible > >::iterator m_xAccessibleVector = m_pImpl->m_pTable->getAccessibleCellVector().begin(); + int nColCount = m_aTable.GetColumnCount(); + m_pImpl->m_pTable->getCellVector().erase(m_pCell+nColCount*aChange.FirstRow, m_pCell+nColCount*aChange.LastRow ); + m_pImpl->m_pTable->getAccessibleCellVector().erase(m_xAccessibleVector+nColCount*aChange.FirstRow, m_xAccessibleVector+nColCount*aChange.LastRow); + m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + } + else + m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + } + } + else + m_pImpl->m_pTable->commitEvent(_nEventId,_rNewValue,_rOldValue); + } +} // ============================================================================ // = AccessibleGridControlAccess // ============================================================================ diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index c092e4872997..ecccf07c0041 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -81,7 +81,16 @@ AccessibleGridControlBase::~AccessibleGridControlBase() void SAL_CALL AccessibleGridControlBase::disposing() { ::osl::MutexGuard aGuard( getOslMutex() ); + + if ( getClientId( ) ) + { + AccessibleEventNotifier::TClientId nId( getClientId( ) ); + setClientId( 0 ); + AccessibleEventNotifier::revokeClientNotifyDisposing( nId, *this ); + } + m_xParent = NULL; + //m_aTable = NULL; } // XAccessibleContext --------------------------------------------------------- diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index 27dfb6084d18..609000d3d62a 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -235,12 +235,24 @@ Sequence< sal_Int8 > SAL_CALL AccessibleGridControlHeader::getImplementationId() Rectangle AccessibleGridControlHeader::implGetBoundingBox() { - return m_aTable.calcHeaderRect(isColumnBar()); + Window* pParent = m_aTable.GetAccessibleParentWindow(); + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); + Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); + if(isColumnBar()) + return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); + else + return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); + } Rectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen() { - return m_aTable.calcHeaderRect(isColumnBar()); + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( NULL ) ); + Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); + if(isColumnBar()) + return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); + else + return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); } sal_Int32 AccessibleGridControlHeader::implGetRowCount() const diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx index e0fb0c10695d..8ad0a949ff6c 100644 --- a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx @@ -145,13 +145,28 @@ OUString SAL_CALL AccessibleGridControlHeaderCell::getImplementationName() // ----------------------------------------------------------------------------- Rectangle AccessibleGridControlHeaderCell::implGetBoundingBox() { - return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle + Window* pParent = m_aTable.GetAccessibleParentWindow(); + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); + sal_Int32 nIndex = getAccessibleIndexInParent(); + Rectangle aCellRect; + if(m_eObjType == TCTYPE_COLUMNHEADERCELL) + aCellRect = m_aTable.calcHeaderCellRect(true, nIndex); + else + aCellRect = m_aTable.calcHeaderCellRect(false, nIndex); + return Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); } // ----------------------------------------------------------------------------- Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen() { - return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( NULL ) ); + sal_Int32 nIndex = getAccessibleIndexInParent(); + Rectangle aCellRect; + if(m_eObjType == TCTYPE_COLUMNHEADERCELL) + aCellRect = m_aTable.calcHeaderCellRect(true, nIndex); + else + aCellRect = m_aTable.calcHeaderCellRect(false, nIndex); + return Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); } // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleIndexInParent() diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 55b204d05ebc..b0e2e4e6c02b 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -51,6 +51,8 @@ AccessibleGridControlTable::AccessibleGridControlTable( IAccessibleTable& rTable, AccessibleTableControlObjType _eType) : AccessibleGridControlTableBase( rxParent, rTable, _eType ) + ,m_pCellVector( ) + ,m_pAccessCellVector( ) { } @@ -68,7 +70,19 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex ) ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); ensureIsValidIndex( nChildIndex ); - return new AccessibleGridControlTableCell(this, m_aTable, nChildIndex/m_aTable.GetColumnCount(), nChildIndex%m_aTable.GetColumnCount(), TCTYPE_TABLECELL); + sal_Int32 nCount = getAccessibleChildCount(); + if(m_pAccessCellVector.size() == 0 || m_pAccessCellVector.size() != (unsigned)nCount) + { + m_pAccessCellVector.resize(nCount); + m_pCellVector.resize(nCount); + } + if(!m_pAccessCellVector[nChildIndex].is()) + { + AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nChildIndex/m_aTable.GetColumnCount(), nChildIndex%m_aTable.GetColumnCount(), TCTYPE_TABLECELL); + m_pCellVector[nChildIndex] = pCell; + m_pAccessCellVector[nChildIndex] = pCell; + } + return m_pAccessCellVector[nChildIndex]; } sal_Int32 SAL_CALL AccessibleGridControlTable::getAccessibleIndexInParent() @@ -98,7 +112,6 @@ AccessibleGridControlTable::getAccessibleAtPoint( const awt::Point& rPoint ) sal_Int32 nColumnPos = 0; if( m_aTable.ConvertPointToCellAddress( nRow, nColumnPos, VCLPoint( rPoint ) ) ) xChild = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumnPos, TCTYPE_TABLECELL); - return xChild; } @@ -214,7 +227,20 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); - return new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn, TCTYPE_TABLECELL); + sal_Int32 nCount = getAccessibleChildCount(); + sal_Int32 nChildIndex = nRow*m_aTable.GetColumnCount() + nColumn; + if(m_pAccessCellVector.size() == 0 || m_pAccessCellVector.size() != (unsigned)nCount) + { + m_pAccessCellVector.resize(nCount); + m_pCellVector.resize(nCount); + } + if(!m_pAccessCellVector[nChildIndex].is()) + { + AccessibleGridControlTableCell* pCell = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn, TCTYPE_TABLECELL); + m_pCellVector[nChildIndex] = pCell; + m_pAccessCellVector[nChildIndex] = pCell; + } + return m_pAccessCellVector[nChildIndex]; } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleSelected( @@ -332,12 +358,28 @@ OUString SAL_CALL AccessibleGridControlTable::getImplementationName() Rectangle AccessibleGridControlTable::implGetBoundingBox() { - return m_aTable.calcTableRect(); + Window* pParent = m_aTable.GetAccessibleParentWindow(); + DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" ); + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent )); + Rectangle aTableRect( m_aTable.calcTableRect() ); + long nX = aGridRect.Left() + aTableRect.Left(); + long nY = aGridRect.Top() + aTableRect.Top(); + long nWidth = aGridRect.GetSize().Width()-aTableRect.Left(); + long nHeight = aGridRect.GetSize().Height()-aTableRect.Top(); + Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); + return aTable; } Rectangle AccessibleGridControlTable::implGetBoundingBoxOnScreen() { - return m_aTable.calcTableRect(); + Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( NULL )); + Rectangle aTableRect( m_aTable.calcTableRect() ); + long nX = aGridRect.Left() + aTableRect.Left(); + long nY = aGridRect.Top() + aTableRect.Top(); + long nWidth = aGridRect.GetSize().Width()-aTableRect.Left(); + long nHeight = aGridRect.GetSize().Height()-aTableRect.Top(); + Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); + return aTable; } // internal helper methods ---------------------------------------------------- Reference< XAccessibleTable > AccessibleGridControlTable::implGetHeaderBar( @@ -361,6 +403,15 @@ Reference< XAccessibleTable > AccessibleGridControlTable::implGetHeaderBar( return Reference< XAccessibleTable >( xRet, uno::UNO_QUERY ); } +std::vector< AccessibleGridControlTableCell* >& AccessibleGridControlTable::getCellVector() +{ + return m_pCellVector; +} + +std::vector< Reference< XAccessible > >& AccessibleGridControlTable::getAccessibleCellVector() +{ + return m_pAccessCellVector; +} // ============================================================================ } // namespace accessibility diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx index caef437f341f..f32eec0a1f1f 100644 --- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx @@ -355,12 +355,26 @@ namespace accessibility Rectangle AccessibleGridControlTableCell::implGetBoundingBox() { - return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle + Window* pParent = m_aTable.GetAccessibleParentWindow(); + DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" ); + Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( pParent ); + sal_Int32 nIndex = getAccessibleIndexInParent(); + Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); + long nX = aGridRect.Left() + aCellRect.Left(); + long nY = aGridRect.Top() + aCellRect.Top(); + Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); + return aCell; } // ----------------------------------------------------------------------------- Rectangle AccessibleGridControlTableCell::implGetBoundingBoxOnScreen() { - return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle + Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( NULL ); + sal_Int32 nIndex = getAccessibleIndexInParent(); + Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); + long nX = aGridRect.Left() + aCellRect.Left(); + long nY = aGridRect.Top() + aCellRect.Top(); + Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); + return aCell; } } -- cgit