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:39:08 +0100 |
commit | dbafb1663e124cc9d440f4941147a14ae37ab63d (patch) | |
tree | fc11eefc82b86773a234211bae7db468704e47b0 /dbaccess | |
parent | bd60c90f854954aad4361e6de9829e0db2ac2ccc (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 { |