User: hr      
Date: 06/01/25 05:43:59

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

Log:
 INTEGRATION: CWS stlusagefix01 (1.10.2); FILE MERGED
 2006/01/17 09:00:20 oj 1.10.2.2: #i60480# stl usage corrected
 2006/01/16 13:47:16 oj 1.10.2.1: #i60480# fix stl usage

File Changes:

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

File [changed]: RowSetCacheIterator.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCacheIterator.cxx?r1=1.10&r2=1.11
Delta lines:  +24 -6
--------------------
--- RowSetCacheIterator.cxx     12 Jan 2006 17:20:39 -0000      1.10
+++ RowSetCacheIterator.cxx     25 Jan 2006 13:43:56 -0000      1.11
@@ -38,11 +38,16 @@
 #ifndef DBACCESS_CORE_API_ROWSETCACHE_HXX
 #include "RowSetCache.hxx"
 #endif
+#ifndef DBACCESS_CORE_API_ROWSETBASE_HXX
+#include "RowSetBase.hxx"
+#endif
+
 
 using namespace dbaccess;
 ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH)
 : m_pCache(_rRH.m_pCache)
 , m_aIter(_rRH.m_aIter)
+,m_pRowSet(_rRH.m_pRowSet)
 {
 }
 // 
-----------------------------------------------------------------------------
@@ -58,6 +63,7 @@
 
        m_pCache = _rRH.m_pCache;
        m_aIter  = _rRH.m_aIter;
+       m_pRowSet = _rRH.m_pRowSet;
 
        return *this;
 }
@@ -75,7 +81,7 @@
 // 
-----------------------------------------------------------------------------
 const ORowSetRow& ORowSetCacheIterator::operator *() const
 {
-       if ( m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
+       if ( !m_pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) && 
m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
        {
                OSL_ENSURE(m_aIter->second.aBookmark.hasValue(),"bookmark has 
no value!");
                m_pCache->moveToBookmark(m_aIter->second.aBookmark);
@@ -91,7 +97,7 @@
 // 
-----------------------------------------------------------------------------
 const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
 {
-       if ( m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
+       if ( !m_pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) && 
m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
        {
                OSL_ENSURE(m_aIter->second.aBookmark.hasValue(),"bookmark has 
no value!");
                m_pCache->moveToBookmark(m_aIter->second.aBookmark);
@@ -122,5 +128,17 @@
 // 
-----------------------------------------------------------------------------
 sal_Bool ORowSetCacheIterator::isNull() const
 {
-       return !m_pCache || m_aIter == m_pCache->m_aCacheIterators.end() || 
m_aIter->second.aIterator == m_pCache->m_pMatrix->end();
+       sal_Bool bRet = !m_pCache || !m_pRowSet || m_aIter == 
m_pCache->m_aCacheIterators.end();
+       if ( !bRet )
+       {
+               ORowSetCacheIterator_Helper aHelper = m_aIter->second;
+               bRet = ( 
m_pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess())
+                       ? 
+                       m_aIter->second.aIterator == 
m_pCache->m_pInsertMatrix->end()
+                       :
+                       m_aIter->second.aIterator == m_pCache->m_pMatrix->end()
+               );
+       }
+       return  bRet;
+               
 }




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

Reply via email to