User: rt      
Date: 05/09/05 01:57:06

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

Log:
 INTEGRATION: CWS hr18 (1.133.94); FILE MERGED
 2005/08/10 16:25:26 hr 1.133.94.1: #i51878#,#i53108#: cleanup STL iterator 
usage

File Changes:

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

File [changed]: RowSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.cxx?r1=1.133&r2=1.134
Delta lines:  +15 -4
--------------------
--- RowSet.cxx  10 Mar 2005 16:30:55 -0000      1.133
+++ RowSet.cxx  5 Sep 2005 08:57:04 -0000       1.134
@@ -370,6 +370,17 @@
 
        m_aParameterRow.clear(); // because it was constructed with one element 
as default
 }
+
+ORowSet::~ORowSet()
+{
+       if ( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose )
+       {
+               OSL_ENSURE(0, "Please check who doesn't dispose this 
component!");
+               osl_incrementInterlockedCount( &m_refCount );
+               dispose();
+       }
+}
+
 // 
-----------------------------------------------------------------------------
 Any ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
 {
@@ -1152,7 +1163,7 @@
                notifyClonesRowDeleted(m_aBookmark);
 
                m_aBookmark             = Any();
-               m_aCurrentRow   = NULL;
+               m_aCurrentRow   = ORowSetCacheIterator();
                m_aCurrentRow.setBookmark(Any());
 
                ORowSetNotifier aNotifier( this );
@@ -1371,7 +1382,7 @@
        if ( m_pCache && ( m_pCache->m_bInserted || m_bModified) )
                return  (*(*m_pCache->m_aInsertRow))[m_nLastColumnIndex = 
columnIndex];
 
-       OSL_ENSURE(m_pCache->m_aInsertRow != m_aCurrentRow,"Current row stand 
on the insert row but all flags are wrong!");
+       OSL_ENSURE(m_aCurrentRow != m_pCache->m_aInsertRow,"Current row stand 
on the insert row but all flags are wrong!");
        return getValue(columnIndex);
 }
 // -------------------------------------------------------------------------
@@ -2511,7 +2522,7 @@
 // 
-----------------------------------------------------------------------------
 void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
 {
-       if(!m_pCache || columnIndex <= 0 || m_aCurrentRow == NULL || 
m_aCurrentRow == m_pCache->getEnd() || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
+       if(!m_pCache || columnIndex <= 0 || m_aCurrentRow.isNull() || 
m_aCurrentRow == m_pCache->getEnd() || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
                throwFunctionSequenceException(*this);
 }
 // 
-----------------------------------------------------------------------------
@@ -2757,7 +2768,7 @@
        if(compareBookmarks(_rBookmark,m_aBookmark) == 0)
        {
                m_aBookmark             = Any();
-               m_aCurrentRow   = NULL;
+               m_aCurrentRow   = ORowSetCacheIterator();
                m_aCurrentRow.setBookmark(Any());
        }
 }




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

Reply via email to