Tag: cws_src680_oj17 User: oj Date: 06/03/09 04:31:43 Modified: /dba/dbaccess/source/core/api/ RowSet.cxx, RowSetBase.cxx
Log: stl iterator usage fix 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.142&r2=1.142.22.1 Delta lines: +9 -7 ------------------- --- RowSet.cxx 6 Feb 2006 16:53:55 -0000 1.142 +++ RowSet.cxx 9 Mar 2006 12:31:39 -0000 1.142.22.1 @@ -4,9 +4,9 @@ * * $RCSfile: RowSet.cxx,v $ * - * $Revision: 1.142 $ + * $Revision: 1.142.22.1 $ * - * last change: $Author: rt $ $Date: 2006/02/06 16:53:55 $ + * last change: $Author: oj $ $Date: 2006/03/09 12:31:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1473,7 +1473,8 @@ // ------------------------------------------------------------------------- Any SAL_CALL ORowSet::getObject( sal_Int32 columnIndex, const Reference< XNameAccess >& typeMap ) throw(SQLException, RuntimeException) { - return Any(); + ::osl::MutexGuard aGuard( *m_pMutex ); + return getInsertValue(columnIndex).makeAny(); } // ------------------------------------------------------------------------- Reference< XRef > SAL_CALL ORowSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -2458,15 +2459,16 @@ // ----------------------------------------------------------------------------- void ORowSet::doCancelModification( ) { - OSL_ENSURE( isModification(), "ORowSet::doCancelModification: invalid call (no cache!)!" ); + //OSL_ENSURE( isModification(), "ORowSet::doCancelModification: invalid call (no cache!)!" ); if ( isModification() ) m_pCache->cancelRowModification(); + m_bModified = sal_False; } // ----------------------------------------------------------------------------- sal_Bool ORowSet::isModification( ) { - return m_pCache && m_pCache->m_bNew; + return isNew(); } // ----------------------------------------------------------------------------- @@ -2749,7 +2751,7 @@ // ----------------------------------------------------------------------------- void ORowSetClone::doCancelModification( ) { - OSL_ENSURE( sal_False, "ORowSetClone::doCancelModification: invalid call!" ); + //OSL_ENSURE( sal_False, "ORowSetClone::doCancelModification: invalid call!" ); } // ----------------------------------------------------------------------------- File [changed]: RowSetBase.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetBase.cxx?r1=1.84&r2=1.84.22.1 Delta lines: +13 -13 --------------------- --- RowSetBase.cxx 6 Feb 2006 16:54:07 -0000 1.84 +++ RowSetBase.cxx 9 Mar 2006 12:31:40 -0000 1.84.22.1 @@ -4,9 +4,9 @@ * * $RCSfile: RowSetBase.cxx,v $ * - * $Revision: 1.84 $ + * $Revision: 1.84.22.1 $ * - * last change: $Author: rt $ $Date: 2006/02/06 16:54:07 $ + * last change: $Author: oj $ $Date: 2006/03/09 12:31:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -406,7 +406,7 @@ ::osl::MutexGuard aGuard( *m_pMutex ); checkCache(); - return Any(); + return getValue(columnIndex).makeAny(); } // ------------------------------------------------------------------------- Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -489,7 +489,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->moveToBookmark(bookmark); - m_pCache->clearModified(); + doCancelModification( ); if(bRet) { // notification order @@ -531,7 +531,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->moveRelativeToBookmark(bookmark,rows); - m_pCache->clearModified(); + doCancelModification( ); if(bRet) { // notification order @@ -638,7 +638,7 @@ positionCache( MOVE_FORWARD ); sal_Bool bAfterLast = m_pCache->isAfterLast(); bRet = m_pCache->next(); - m_pCache->clearModified(); + doCancelModification( ); if ( bRet || bAfterLast != m_pCache->isAfterLast() ) @@ -762,7 +762,7 @@ { ORowSetRow aOldValues = getOldRow(bWasNew); m_pCache->beforeFirst(); - m_pCache->clearModified(); + doCancelModification( ); // notification order // - column values @@ -804,7 +804,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); m_pCache->afterLast(); - m_pCache->clearModified(); + doCancelModification( ); // notification order // - column values @@ -844,7 +844,7 @@ sal_Bool bMoved = ( bWasNew || !_aCheckFunctor(this) ); bRet = _aMovementFunctor(m_pCache); - m_pCache->clearModified(); + doCancelModification( ); if ( bRet ) { @@ -936,7 +936,7 @@ ORowSetRow aOldValues = getOldRow(bWasNew); bRet = m_pCache->absolute(row); - m_pCache->clearModified(); + doCancelModification( ); if(bRet) { @@ -988,7 +988,7 @@ positionCache( rows > 0 ? MOVE_FORWARD : MOVE_BACKWARD ); bRet = m_pCache->relative(rows); - m_pCache->clearModified(); + doCancelModification( ); if(bRet) { @@ -1035,7 +1035,7 @@ positionCache( MOVE_BACKWARD ); bRet = m_pCache->previous(); - m_pCache->clearModified(); + doCancelModification( ); // if m_bBeforeFirst is false and bRet is false than we stood on the first row if(!m_bBeforeFirst || bRet) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
