Tag: cws_src680_stlusagefix01
User: oj      
Date: 06/01/16 22:55:32

Modified:
 /dba/dbaccess/source/core/api/
  RowSetCache.cxx

Log:
 #i60480# stl calc corrected

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: RowSetCache.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.80.10.1&r2=1.80.10.2
Delta lines:  +15 -17
---------------------
--- RowSetCache.cxx     16 Jan 2006 13:47:16 -0000      1.80.10.1
+++ RowSetCache.cxx     17 Jan 2006 06:55:27 -0000      1.80.10.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetCache.cxx,v $
  *
- *  $Revision: 1.80.10.1 $
+ *  $Revision: 1.80.10.2 $
  *
- *  last change: $Author: oj $ $Date: 2006/01/16 13:47:16 $
+ *  last change: $Author: oj $ $Date: 2006/01/17 06:55:27 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -415,14 +415,12 @@
                for(;aCacheIter != m_aCacheIterators.end();++aCacheIter)
                {
                        aCacheIterToChange[aCacheIter->first] = sal_False;
-                       if ( 
!aCacheIter->second.pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) )
-                       {
-                               if ( aCacheIter->second.aIterator != 
m_pMatrix->end() && !m_bInserted && !m_bModified )
+                       if ( 
!aCacheIter->second.pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) 
+                               && aCacheIter->second.aIterator != 
m_pMatrix->end() && !m_bInserted && !m_bModified )
                                {
                                        sal_Int16 nDist = 
(aCacheIter->second.aIterator - m_pMatrix->begin());
                                        aPositions.push_back(nDist);
                                        aCacheIterToChange[aCacheIter->first] = 
sal_True;
-                               } // if(aCacheIter->second.aIterator != 
m_aInsertRow && !m_bInserted && !m_bModified)
                        }
                }
                sal_Int32 nKeyPos = (m_aMatrixIter - m_pMatrix->begin());
@@ -789,15 +787,15 @@
                                bCheck = m_pCacheSet->first();
                                //      aEnd = m_pMatrix->begin() + 
(sal_Int32)(m_nFetchSize*0.5);
                                OSL_ENSURE((nNewEndPos - m_nStartPos - 
nNewStartPos) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!");
-                               aEnd = m_pMatrix->begin() + nNewEndPos - 
m_nStartPos - nNewStartPos;
+                               aEnd = m_pMatrix->begin() + (nNewEndPos - 
m_nStartPos - nNewStartPos);
                                aIter = aEnd;
                                m_nStartPos = 0;
                        }
                        else
                        {
                                OSL_ENSURE((nNewEndPos - m_nStartPos -1) < 
(sal_Int32)m_pMatrix->size(),"Position is behind end()!");
-                               aEnd = m_pMatrix->begin() + (nNewEndPos - 
m_nStartPos)-1;
-                               aIter = m_pMatrix->begin() + (nNewEndPos - 
m_nStartPos)-1;
+                               aEnd = m_pMatrix->begin() + ((nNewEndPos - 
m_nStartPos)-1);
+                               aIter = m_pMatrix->begin() + ((nNewEndPos - 
m_nStartPos)-1);
                                bCheck = m_pCacheSet->absolute(nNewStartPos);
                                m_nStartPos = nNewStartPos -1;
                        }
@@ -815,9 +813,8 @@
                                ORowSetCacheMap::iterator aCacheIter = 
m_aCacheIterators.begin();
                                for(;aCacheIter != 
m_aCacheIterators.end();++aCacheIter)
                                {
-                                       if (    aCacheIter->second.aIterator != 
m_pMatrix->end()
-                                               &&      
aCacheIter->second.aIterator != m_aInsertRow
-                                               && !m_bInserted && !m_bModified 
)
+                                       if ( 
!aCacheIter->second.pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) 
+                                               && aCacheIter->second.aIterator 
!= m_pMatrix->end() && !m_bInserted && !m_bModified )
                                        {
                                                sal_Int16 nDist = 
(aCacheIter->second.aIterator - m_pMatrix->begin());
                                                if ( nDist >= nNewDist )
@@ -908,7 +905,7 @@
                        // the rows behind this can be reused
                        ORowSetMatrix::iterator aIter = m_pMatrix->begin();
                        OSL_ENSURE((nNewStartPos - m_nStartPos - 1) < 
(sal_Int32)m_pMatrix->size(),"Position is behind end()!");
-                       ORowSetMatrix::iterator aEnd  = m_pMatrix->begin() + 
nNewStartPos - m_nStartPos - 1;
+                       ORowSetMatrix::iterator aEnd  = m_pMatrix->begin() + 
(nNewStartPos - m_nStartPos - 1);
 
                        sal_Int32 nPos = m_nStartPos + m_nFetchSize + 1;
                        sal_Bool bCheck = m_pCacheSet->absolute(nPos);
@@ -1405,7 +1402,8 @@
                ORowSetCacheMap::iterator aCacheIter = 
m_aCacheIterators.begin();
                for(;aCacheIter != m_aCacheIterators.end();++aCacheIter)
                {
-                       if ( aCacheIter->second.aIterator != m_pMatrix->end() 
&& aCacheIter->second.aIterator != m_aInsertRow && !m_bInserted && !m_bModified)
+                       if ( 
!aCacheIter->second.pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) 
+                               && aCacheIter->second.aIterator != 
m_pMatrix->end() && !m_bInserted && !m_bModified )
                        {
                                sal_Int16 nDist = (aCacheIter->second.aIterator 
- m_pMatrix->begin());
                                if(nDist < _nDist)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to