diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-22 11:13:14 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-22 13:18:54 +0100 |
commit | 47bd9bd00edc9c0f2f4834a1b4869b45b65ab66a (patch) | |
tree | 85c518c7489fc38630a899f50a17a497877f81a7 /dbaccess | |
parent | 4a7089ffdf450ac285060ed4d8354e8c37f3685b (diff) |
RowSet: notify listeners when next() brings us afterLast
Change-Id: I6024352f9d7c68d8075d90b5954ec3ba662a06f0
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index edabd9a62725..3dbd6a0563b7 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -591,12 +591,24 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException, st bRet = m_pCache->next(); doCancelModification( ); + // if we were afterLast before next() then we still are, + // i.e. bAfterLast implies m_pCache->isAfterLast() + if (bAfterLast) + assert(m_pCache->isAfterLast()); + // so the only way bAfterLast != m_pCache->isAfterLast() + // would be that we just arrived there, + if (bAfterLast != m_pCache->isAfterLast()) + { + assert(!bAfterLast); + assert(m_pCache->isAfterLast()); + } + // in which case we *did* move the cursor if ( bRet || bAfterLast != m_pCache->isAfterLast() ) { // notification order // - column values // - cursorMoved - setCurrentRow( bRet, true, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); OSL_ENSURE(!m_bBeforeFirst,"BeforeFirst is true. I don't know why?"); } else |