Tag: cws_src680_rowsetdel User: fs Date: 06/01/18 05:58:42 Modified: /dba/dbaccess/source/core/api/ RowSetBase.cxx
Log: #i55731# impl_getRowCount: rowDeleted is not true when we're on the insert row 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.80.12.1&r2=1.80.12.2 Delta lines: +10 -9 -------------------- --- RowSetBase.cxx 16 Jan 2006 10:09:54 -0000 1.80.12.1 +++ RowSetBase.cxx 18 Jan 2006 13:58:39 -0000 1.80.12.2 @@ -4,9 +4,9 @@ * * $RCSfile: RowSetBase.cxx,v $ * - * $Revision: 1.80.12.1 $ + * $Revision: 1.80.12.2 $ * - * last change: $Author: fs $ $Date: 2006/01/16 10:09:54 $ + * last change: $Author: fs $ $Date: 2006/01/18 13:58:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -422,14 +422,15 @@ DBG_TRACE1("DBACCESS ORowSetBase::getBookmark() Clone = %i\n",m_bClone); ::connectivity::checkDisposed(m_rBHelper.bDisposed); ::osl::MutexGuard aGuard( *m_pMutex ); + checkCache(); - if(!m_pCache || m_bBeforeFirst || m_bAfterLast) - { - OSL_ENSURE(0,"Ask for bookmark but we stand on invalid row."); - throwFunctionSequenceException(*m_pMySelf); - } + if ( m_bBeforeFirst || m_bAfterLast ) + throwSQLException( "The rows before the first and after the last row don't have a bookmark.", SQL_INVALID_CURSOR_POSITION, *m_pMySelf ); - OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); + if ( rowDeleted() ) + throwSQLException( "The current row is deleted, and this doesn't have a bookmark.", SQL_INVALID_CURSOR_POSITION, *m_pMySelf ); + + OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::getBookmark: bookmark has no value!" ); return m_aBookmark; } // ------------------------------------------------------------------------- @@ -1318,7 +1319,7 @@ sal_Int32 ORowSetBase::impl_getRowCount() const { sal_Int32 nRowCount( m_pCache->m_nRowCount ); - if ( const_cast< ORowSetBase* >( this )->rowDeleted() ) + if ( const_cast< ORowSetBase* >( this )->rowDeleted() && !m_pCache->m_bInserted ) ++nRowCount; return nRowCount; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
