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

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

Log:
 INTEGRATION: CWS hr18 (1.75.88); FILE MERGED
 2005/08/10 16:39:36 hr 1.75.88.1: #i51878#,#i53108#: cleanup STL iterator usage

File Changes:

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

File [changed]: RowSetBase.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetBase.cxx?r1=1.75&r2=1.76
Delta lines:  +12 -12
---------------------
--- RowSetBase.cxx      18 Mar 2005 10:05:00 -0000      1.75
+++ RowSetBase.cxx      5 Sep 2005 08:57:38 -0000       1.76
@@ -264,7 +264,7 @@
        ::osl::MutexGuard aGuard( *m_pMutex );
        checkCache();
 
-       return ((m_nLastColumnIndex != -1) && m_aCurrentRow && m_aCurrentRow != 
m_pCache->getEnd() && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid()) ? 
(*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True;
+       return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && 
m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? 
(*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True;
 }
 // 
-----------------------------------------------------------------------------
 const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
@@ -273,26 +273,26 @@
        checkCache();
        OSL_ENSURE(!(m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: 
Illegal call here (we're before first or after last)!");
 
-       if ( m_aCurrentRow && m_aCurrentRow != m_pCache->getEnd() && 
!m_aCurrentRow.isNull() && m_aCurrentRow->isValid() )
+       if ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && 
m_aCurrentRow->isValid() )
        {
 #if OSL_DEBUG_LEVEL > 0
                ORowSetMatrix::iterator aCacheEnd = m_pCache->getEnd();
                ORowSetMatrix::iterator aCurrentRow = m_aCurrentRow;
 #endif
-               OSL_ENSURE(m_aCurrentRow && m_aCurrentRow <= 
m_pCache->getEnd(),"Invalid iterator set for currentrow!");
+               OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow <= 
m_pCache->getEnd(),"Invalid iterator set for currentrow!");
                return (*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex];
        }
        else
        {       // currentrow is null when the clone move the window
-               if(!m_aCurrentRow || m_aCurrentRow.isNull())
+               if ( m_aCurrentRow.isNull() )
                {
                        positionCache();
                        m_aCurrentRow   = m_pCache->m_aMatrixIter;
 
-                       OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we 
don't stand on a valid row! Row is null.");
+                       
OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a 
valid row! Row is null.");
                        return getValue(columnIndex);
                }
-               OSL_ENSURE(m_aCurrentRow && (m_bBeforeFirst || 
m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is 
equal to end of matrix");
+               OSL_ENSURE(!m_aCurrentRow.isNull() && (m_bBeforeFirst || 
m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is 
equal to end of matrix");
        }
        // we should normally never reach this here
        return m_aEmptyValue;
@@ -363,18 +363,18 @@
        ::osl::MutexGuard aGuard( *m_pMutex );
        checkCache();
 
-       if(m_aCurrentRow && m_aCurrentRow != m_pCache->getEnd())
+       if( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd())
                return new 
::comphelper::SequenceInputStream((*(*m_aCurrentRow))[m_nLastColumnIndex = 
columnIndex].getSequence());
        else
        {
-               if(m_aCurrentRow)
+               if(!m_aCurrentRow.isNull())
                        OSL_ENSURE((m_bBeforeFirst || 
m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is 
equal to end of matrix");
                else
                {
                        positionCache();
                        m_aCurrentRow   = m_pCache->m_aMatrixIter;
 
-                       OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we 
don't stand on a valid row! Row is null.");
+                       
OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a 
valid row! Row is null.");
                        return getBinaryStream(columnIndex);
                }
        }
@@ -1046,7 +1046,7 @@
                m_aBookmark             = m_pCache->getBookmark();
                OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!");
                m_aCurrentRow   = m_pCache->m_aMatrixIter;
-               OSL_ENSURE(m_aCurrentRow,"CurrentRow is null!");
+               OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is null!");
                m_aCurrentRow.setBookmark(m_aBookmark);
                OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow != 
m_pCache->getEnd(),"Position of matrix iterator isn't valid!");
                OSL_ENSURE(m_aCurrentRow->isValid(),"Currentrow isn't valid");
@@ -1057,7 +1057,7 @@
                sal_Int32 nNewRow = m_pCache->getRow();
                OSL_ENSURE(nOldRow == nNewRow,"Old position is not equal to new 
postion");
                m_aCurrentRow   = m_pCache->m_aMatrixIter;
-               OSL_ENSURE(m_aCurrentRow,"CurrentRow is nul after 
positionCache!");
+               OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after 
positionCache!");
        }
        else
        {
@@ -1075,7 +1075,7 @@
                {
                        positionCache();
                        m_aCurrentRow   = m_pCache->m_aMatrixIter;
-                       OSL_ENSURE(m_aCurrentRow,"CurrentRow is nul after 
positionCache!");
+                       OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul 
after positionCache!");
                }
        }
 




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

Reply via email to