Tag: cws_src680_warnings01
User: sb      
Date: 06/04/07 13:45:50

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

Log:
 RESYNC: (1.10-1.13); FILE MERGED

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.14.1&r2=1.10.14.2
Delta lines:  +28 -6
--------------------
--- RowSetCacheIterator.cxx     24 Mar 2006 15:35:47 -0000      1.10.14.1
+++ RowSetCacheIterator.cxx     7 Apr 2006 20:45:48 -0000       1.10.14.2
@@ -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_aIter(_rRH.m_aIter)
 , m_pCache(_rRH.m_pCache)
+,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() && 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() && 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,21 @@
 // 
-----------------------------------------------------------------------------
 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()
+                       ? 
+                       m_aIter->second.aIterator == 
m_pCache->m_pInsertMatrix->end()
+                       :
+                       m_aIter->second.aIterator == m_pCache->m_pMatrix->end()
+               );
+       }
+       return  bRet;
+}
+// 
-----------------------------------------------------------------------------
+::osl::Mutex* ORowSetCacheIterator::getMutex() const
+{
+       return m_pRowSet ? m_pRowSet->getMutex() : NULL;
 }




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

Reply via email to