Tag: cws_src680_dba205b
User: oj      
Date: 2006/08/10 23:14:21

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

Log:
 #i68280# check size of rowcache with keypos

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.87&r2=1.87.4.1
Delta lines:  +11 -6
--------------------
--- RowSetCache.cxx     26 Jul 2006 07:46:13 -0000      1.87
+++ RowSetCache.cxx     11 Aug 2006 06:14:18 -0000      1.87.4.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetCache.cxx,v $
  *
- *  $Revision: 1.87 $
+ *  $Revision: 1.87.4.1 $
  *
- *  last change: $Author: rt $ $Date: 2006/07/26 07:46:13 $
+ *  last change: $Author: oj $ $Date: 2006/08/11 06:14:18 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -428,8 +428,10 @@
                sal_Int32 nKeyPos = (m_aMatrixIter - m_pMatrix->begin());
                m_pMatrix->resize(_nSize);
 
-        CHECK_MATRIX_POS(nKeyPos);
+        if ( nKeyPos < _nSize )
                m_aMatrixIter = m_pMatrix->begin() + nKeyPos;
+        else
+            m_aMatrixIter = m_pMatrix->end();
                m_aMatrixEnd = m_pMatrix->end();
 
                // now adjust their positions because a resize invalid all 
iterators
@@ -442,7 +444,10 @@
                        if ( aPosChangeIter->second )
             {
                 CHECK_MATRIX_POS(*aIter);
+                if ( *aIter < _nSize )
                                aCacheIter->second.aIterator = 
m_pMatrix->begin() + *aIter++;
+                else
+                    aCacheIter->second.aIterator = m_pMatrix->end();
             }
                }
        }




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

Reply via email to