diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-06 13:22:06 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-06 19:42:49 +0100 |
commit | d20232a77565f46fedc0b556f4d50addff4d3559 (patch) | |
tree | 75191324105e2285d4f5fac17c1a4eefb11b338a /dbaccess | |
parent | 59375da788af698aa619cb763adaf0428a4bb81e (diff) |
Don't force refresh when higher up code did not request it
Change-Id: I0f415c96fc05c1d776d14885751aef020c42f4ae
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 7238e904aa84..8b4087d97b30 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -713,7 +713,6 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException) if ( impl_rowDeleted() ) return ( m_nDeletedPosition == 1 ); - positionCache( MOVE_NONE_REFRESH_ONLY ); sal_Bool bIsFirst = m_pCache->isFirst(); OSL_TRACE("DBACCESS ORowSetBase::isFirst() = %i Clone = %i",bIsFirst,m_bClone); @@ -745,7 +744,6 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException) return ( m_nDeletedPosition == impl_getRowCount() ); } - positionCache( MOVE_NONE_REFRESH_ONLY ); sal_Bool bIsLast = m_pCache->isLast(); OSL_TRACE("DBACCESS ORowSetBase::isLast() = %i Clone = %i",bIsLast,m_bClone); @@ -1111,14 +1109,6 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR OSL_ENSURE(m_aCurrentRow->is(),"Currentrow isn't valid"); OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); -#if OSL_DEBUG_LEVEL > 0 - sal_Int32 nOldRow = m_pCache->getRow(); -#endif - positionCache( MOVE_NONE_REFRESH_ONLY ); -#if OSL_DEBUG_LEVEL > 0 - sal_Int32 nNewRow = m_pCache->getRow(); - OSL_ENSURE(nOldRow == nNewRow,"Old position is not equal to new postion"); -#endif m_aCurrentRow = m_pCache->m_aMatrixIter; m_bIsInsertRow = sal_False; OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); @@ -1328,7 +1318,11 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection ) sal_Bool bSuccess = sal_False; if ( m_aBookmark.hasValue() ) { - bSuccess = m_pCache->moveToBookmark( m_aBookmark ); + if ( _ePrepareForDirection == MOVE_NONE_REFRESH_ONLY || + m_pCache->compareBookmarks( m_aBookmark, m_pCache->getBookmark() ) != CompareBookmark::EQUAL ) + bSuccess = m_pCache->moveToBookmark( m_aBookmark ); + else + bSuccess = sal_True; } else { |