Tag: cws_src680_stlusagefix01 User: oj Date: 06/01/17 01:00:24 Modified: /dba/dbaccess/source/core/api/ RowSet.cxx, RowSetBase.cxx, RowSetCache.cxx, RowSetCache.hxx, RowSetCacheIterator.cxx /dba/dbaccess/source/core/dataaccess/ datasource.cxx
Log: #i60480# stl usage corrected 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.14.1&r2=1.139.14.2 Delta lines: +5 -5 ------------------- --- RowSet.cxx 16 Jan 2006 13:47:15 -0000 1.139.14.1 +++ RowSet.cxx 17 Jan 2006 09:00:09 -0000 1.139.14.2 @@ -1175,11 +1175,11 @@ 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; File [changed]: RowSetBase.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetBase.cxx?r1=1.80.10.1&r2=1.80.10.2 Delta lines: +14 -4 -------------------- --- RowSetBase.cxx 16 Jan 2006 13:47:16 -0000 1.80.10.1 +++ RowSetBase.cxx 17 Jan 2006 09:00:13 -0000 1.80.10.2 @@ -458,6 +458,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->moveToBookmark(bookmark); + m_pCache->clearModified(); if(bRet) { // notification order @@ -500,6 +501,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->moveRelativeToBookmark(bookmark,rows); + m_pCache->clearModified(); if(bRet) { // notification order @@ -607,6 +609,7 @@ positionCache(); sal_Bool bAfterLast = m_pCache->isAfterLast(); bRet = m_pCache->next(); + m_pCache->clearModified(); if ( bRet || bAfterLast != m_pCache->isAfterLast() ) @@ -723,6 +726,7 @@ { ORowSetRow aOldValues = getOldRow(bWasNew); m_pCache->beforeFirst(); + m_pCache->clearModified(); // notification order // - column values @@ -764,6 +768,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); m_pCache->afterLast(); + m_pCache->clearModified(); // notification order // - column values @@ -803,6 +808,7 @@ sal_Bool bMoved = ( bWasNew || !_aCheckFunctor(this) ); bRet = _aMovementFunctor(m_pCache); + m_pCache->clearModified(); if ( bRet ) { @@ -897,6 +903,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->absolute(row); + m_pCache->clearModified(); if(bRet) { @@ -949,6 +956,7 @@ if ( m_aBookmark.hasValue() ) // #104474# OJ positionCache(); bRet = m_pCache->relative(rows); + m_pCache->clearModified(); if(bRet) { @@ -996,6 +1004,7 @@ if ( m_aBookmark.hasValue() ) // #104474# OJ positionCache(); bRet = m_pCache->previous(); + m_pCache->clearModified(); // if m_bBeforeFirst is false and bRet is false than we stood on the first row if(!m_bBeforeFirst || bRet) @@ -1023,6 +1032,7 @@ DBG_TRACE1("DBACCESS ORowSetBase::setCurrentRow() Clone = %i",m_bClone); m_bBeforeFirst = m_pCache->isBeforeFirst(); m_bAfterLast = m_pCache->isAfterLast(); + //m_pCache->resetInsertRow(sal_True); if(!(m_bBeforeFirst || m_bAfterLast)) { File [changed]: RowSetCache.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.80.10.2&r2=1.80.10.3 Delta lines: +18 -9 -------------------- --- RowSetCache.cxx 17 Jan 2006 06:55:27 -0000 1.80.10.2 +++ RowSetCache.cxx 17 Jan 2006 09:00:17 -0000 1.80.10.3 @@ -1292,7 +1292,7 @@ // (*m_pMatrix)[(m_nPosition - m_nStartPos)] = NULL; // set the deleted row to NULL - for(++aPos;aPos->isValid() && aPos != m_pMatrix->end();++aPos) + for(++aPos;aPos != m_pMatrix->end() && aPos->isValid();++aPos) { *(aPos-1) = *aPos; (*aPos) = NULL; @@ -1302,6 +1302,11 @@ --m_nPosition; } } +// ----------------------------------------------------------------------------- +void ORowSetCache::clearModified( ) +{ + m_bModified = sal_False; +} // ------------------------------------------------------------------------- void ORowSetCache::cancelRowUpdates( ) { @@ -1511,12 +1516,16 @@ void ORowSetCache::clearInsertRow() { // we don't unbound the bookmark column + if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->isValid() ) + { ORowSetValueVector::iterator aIter = (*m_aInsertRow)->begin()+1; - for(;aIter != (*m_aInsertRow)->end();++aIter) + ORowSetValueVector::iterator aEnd = (*m_aInsertRow)->end(); + for(;aIter != aEnd;++aIter) { aIter->setBound(sal_False); aIter->setModified(sal_False); aIter->setNull(); + } // for(;aIter != (*m_aInsertRow)->end();++aIter) } } // ----------------------------------------------------------------------------- File [changed]: RowSetCache.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.hxx?r1=1.25.74.1&r2=1.25.74.2 Delta lines: +4 -3 ------------------- --- RowSetCache.hxx 16 Jan 2006 13:47:16 -0000 1.25.74.1 +++ RowSetCache.hxx 17 Jan 2006 09:00:19 -0000 1.25.74.2 @@ -209,6 +209,7 @@ TORowSetOldRowHelperRef registerOldRow(); void deregisterOldRow(const TORowSetOldRowHelperRef& _rRow); + void clearModified(); // ::com::sun::star::sdbc::XResultSetMetaDataSupplier ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > getMetaData( ); File [changed]: RowSetCacheIterator.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCacheIterator.cxx?r1=1.10.2.1&r2=1.10.2.2 Delta lines: +11 -5 -------------------- --- RowSetCacheIterator.cxx 16 Jan 2006 13:47:16 -0000 1.10.2.1 +++ RowSetCacheIterator.cxx 17 Jan 2006 09:00:20 -0000 1.10.2.2 @@ -128,11 +128,17 @@ // ----------------------------------------------------------------------------- sal_Bool ORowSetCacheIterator::isNull() const { - return !m_pCache || !m_pRowSet || m_aIter == m_pCache->m_aCacheIterators.end() || - ( m_pRowSet->isInsertRow(ORowSetBase::GrantNotifierAccess()) + 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; + } Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: datasource.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.65&r2=1.65.16.1 Delta lines: +2 -2 ------------------- --- datasource.cxx 21 Dec 2005 13:35:18 -0000 1.65 +++ datasource.cxx 17 Jan 2006 09:00:21 -0000 1.65.16.1 @@ -584,7 +584,7 @@ aRet.push_back( *pDataSourceSetting ); } } - + if ( !aRet.empty() ) return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size()); } return Sequence< PropertyValue >(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
