User: hr      
Date: 06/01/25 05:42:55

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

Log:
 INTEGRATION: CWS stlusagefix01 (1.139.14); FILE MERGED
 2006/01/17 09:00:09 oj 1.139.14.2: #i60480# stl usage corrected
 2006/01/16 13:47:15 oj 1.139.14.1: #i60480# fix stl 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.139&r2=1.140
Delta lines:  +11 -15
---------------------
--- RowSet.cxx  21 Dec 2005 13:33:51 -0000      1.139
+++ RowSet.cxx  25 Jan 2006 13:42:53 -0000      1.140
@@ -1032,13 +1032,13 @@
                        ::osl::MutexGuard aCacheGuard( *m_pMutex);
                        sal_Bool bInserted = m_pCache->insertRow();
 
+                       // make sure that our row is set to the new inserted 
row before clearing the inser flags in the cache
+                       m_pCache->resetInsertRow(bInserted);
+
                        // notification order
                        // - column values
                        setCurrentRow(sal_False,aOldValues,aGuard); // we don't 
move here
 
-                       // make sure that our row is set to the new inserted 
row before clearing the inser flags in the cache
-                       m_pCache->resetInsertRow(bInserted);
-
                        // - rowChanged
                        notifyAllListenersRowChanged(aGuard,aEvt);
 
@@ -1175,12 +1175,12 @@
 
        positionCache();
 
-       m_pCache->cancelRowUpdates();
-
        ORowSetRow aOldValues;
        if ( !m_aCurrentRow.isNull() )
                aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() );
 
+       m_pCache->cancelRowUpdates();
+
        m_aBookmark             = m_pCache->getBookmark();
        m_aCurrentRow   = m_pCache->m_aMatrixIter;
        m_aCurrentRow.setBookmark(m_aBookmark);
@@ -1359,7 +1359,6 @@
        if ( m_pCache && ( m_pCache->m_bInserted || m_bModified) )
                return  (*(*m_pCache->m_aInsertRow))[m_nLastColumnIndex = 
columnIndex];
 
-       OSL_ENSURE(m_aCurrentRow != m_pCache->m_aInsertRow,"Current row stand 
on the insert row but all flags are wrong!");
        return getValue(columnIndex);
 }
 // -------------------------------------------------------------------------
@@ -1692,7 +1691,7 @@
                                                m_pCache->m_nPrivileges = 
Privilege::SELECT;
                                        }
                                        m_pCache->setMaxRowSize(m_nFetchSize);
-                                       m_aCurrentRow   = 
m_pCache->createIterator();
+                                       m_aCurrentRow   = 
m_pCache->createIterator(this);
                                        m_aOldRow = m_pCache->registerOldRow();
                                        // now we can clear the parameter row
                                        m_aParameterRow.clear();
@@ -1749,8 +1748,7 @@
                                                                                
                                                                                
                i+1,
                                                                                
         m_xActiveConnection->getMetaData(),
                                                                                
                                                                                
                aDescription,
-                                                                               
                                                                                
                m_aCurrentRow,
-                                                                               
                                                                                
                m_pCache->getEnd());
+                                                                               
                                                                                
                m_aCurrentRow);
                                                                        
aColumnMap.insert(StringMap::value_type(sName,0));
                                                                        
aColumns->push_back(pColumn);
                                                                        
pColumn->setName(sName);
@@ -1835,8 +1833,7 @@
                                                                                
                                                                                
        i,
                                                                                
     m_xActiveConnection->getMetaData(),
                                                                                
                                                                                
        aDescription,
-                                                                               
                                                                                
        m_aCurrentRow,
-                                                                               
                                                                                
        m_pCache->getEnd());
+                                                                               
                                                                                
        m_aCurrentRow);
                                                                
aColumns->push_back(pColumn);
                                                                
if(!sName.getLength())
                                                                {
@@ -2500,7 +2497,7 @@
 // 
-----------------------------------------------------------------------------
 void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
 {
-       if(!m_pCache || columnIndex <= 0 || m_aCurrentRow.isNull() || 
m_aCurrentRow == m_pCache->getEnd() || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
+       if ( !m_pCache || columnIndex <= 0 || m_aCurrentRow.isNull() || 
m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
                throwFunctionSequenceException(*this);
 }
 // 
-----------------------------------------------------------------------------
@@ -2545,7 +2542,7 @@
        m_bAfterLast                    = rParent.m_bAfterLast;
        m_pCache                                = rParent.m_pCache;
        m_aBookmark                             = rParent.m_aBookmark;
-       m_aCurrentRow                   = m_pCache->createIterator();
+       m_aCurrentRow                   = m_pCache->createIterator(this);
        m_xNumberFormatTypes    = rParent.m_xNumberFormatTypes;
 
        m_aOldRow = m_pCache->registerOldRow();
@@ -2575,8 +2572,7 @@
                                                                                
                                        i,
                                                             
rParent.m_xActiveConnection->getMetaData(),
                                                                                
                                        aDescription,
-                                                                               
                                        m_aCurrentRow,
-                                                                               
                                        m_pCache->getEnd());
+                                                                               
                                        m_aCurrentRow);
                aColumns->push_back(pColumn);
                pColumn->setName(*pBegin);
                aNames.push_back(*pBegin);




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

Reply via email to