dbaccess/source/core/api/RowSetCache.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 9c6ca789ef80eefff1875b7c804c343ff1668ce0 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu Feb 9 13:06:27 2012 +0100 reorganise code for better readability No behaviour change intended. However, if behaviour changed, probably the *old* behaviour is buggy, not new one. diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 08e1a8b..6a853e6 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1074,17 +1074,17 @@ sal_Bool ORowSetCache::moveWindow() { aIter = m_pMatrix->begin(); - nPos = m_nStartPos; - bCheck = m_pCacheSet->absolute_checked(m_nStartPos,sal_False); - for(; !aIter->is() && bCheck;++aIter) + nPos = m_nStartPos + 1; + bCheck = m_pCacheSet->absolute_checked(nPos, sal_False); + for(; !aIter->is() && bCheck;++aIter, ++nPos) { OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator"); - bCheck = m_pCacheSet->next(); if ( bCheck ) // resultset stands on right position { *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); - m_pCacheSet->fillValueRow(*aIter,++nPos); + m_pCacheSet->fillValueRow(*aIter, nPos); } + bCheck = m_pCacheSet->next(); } } } commit 4ea68987e96714aec1be339c4ddd5b6110bfd008 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu Feb 9 13:04:34 2012 +0100 typo in comment diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index be51b2a..08e1a8b 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -917,7 +917,7 @@ sal_Bool ORowSetCache::moveWindow() const sal_Int32 nStartPosOffset = m_nStartPos - nNewStartPos; // by how much m_nStartPos moves m_nStartPos = nNewStartPos; OSL_ENSURE( static_cast<ORowSetMatrix::size_type>(nOverlapSize) <= m_pMatrix->size(), "new window end is after end of cache matrix!" ); - // the first position in m_pMatrix whos data we don't keep; + // the first position in m_pMatrix whose data we don't keep; // content will be moved to m_pMatrix.begin() ORowSetMatrix::iterator aEnd (m_pMatrix->begin() + nOverlapSize); // the first unused position after we are done; it == m_pMatrix.end() if and only if the window is full commit 843c8309536fec12d63dd45b6074ea5b461df322 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu Feb 9 13:03:24 2012 +0100 ORowSetCache::moveWindow: yet another off-by-one error diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index f2301f0..be51b2a 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -909,7 +909,7 @@ sal_Bool ORowSetCache::moveWindow() // then we fill in the rows between new and old start pos. sal_Bool bCheck; - bCheck = m_pCacheSet->absolute(nNewStartPos); + bCheck = m_pCacheSet->absolute(nNewStartPos + 1); // m_nEndPos < nNewEndPos when window not filled (e.g. there are less rows in total than window size) m_nEndPos = std::min(nNewEndPos, m_nEndPos); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits