Tag: cws_src680_rowsetdel User: fs Date: 06/01/18 23:12:29 Modified: /dba/dbaccess/source/core/api/ RowSetBase.cxx, RowSetCache.cxx, RowSetCache.hxx
Log: #i55731# removed some unused code from the cache 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.3&r2=1.80.12.4 Delta lines: +10 -7 -------------------- --- RowSetBase.cxx 18 Jan 2006 14:50:28 -0000 1.80.12.3 +++ RowSetBase.cxx 19 Jan 2006 07:12:26 -0000 1.80.12.4 @@ -4,9 +4,9 @@ * * $RCSfile: RowSetBase.cxx,v $ * - * $Revision: 1.80.12.3 $ + * $Revision: 1.80.12.4 $ * - * last change: $Author: fs $ $Date: 2006/01/18 14:50:28 $ + * last change: $Author: fs $ $Date: 2006/01/19 07:12:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -255,11 +255,14 @@ if ( m_bBeforeFirst || m_bAfterLast ) { OSL_ENSURE(0,"ORowSetBase::getValue: Illegal call here (we're before first or after last)!"); - throwFunctionSequenceException(*m_pMySelf); + throwSQLException( "The cursor points to before the first or after the last row.", SQL_INVALID_CURSOR_POSITION, *m_pMySelf ); } + if ( rowDeleted() ) + return m_aEmptyValue; + bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() ); - if ( !bValidCurrentRow && !rowDeleted() ) + if ( !bValidCurrentRow ) { // currentrow is null when the clone moves the window positionCache( MOVE_NONE_REFRESH_ONLY ); @@ -279,7 +282,7 @@ return (*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex]; } - // we should normally reach this here only if we're deleted + // we should normally never reach this return m_aEmptyValue; } // ------------------------------------------------------------------------- @@ -353,7 +356,7 @@ else { 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"); + OSL_ENSURE((m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getBinaryStream: we don't stand on a valid row! Row is equal to end of matrix"); else { if ( rowDeleted() ) @@ -362,7 +365,7 @@ positionCache( MOVE_NONE_REFRESH_ONLY ); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); + OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getBinaryStream: we don't stand on a valid row! Row is null."); return getBinaryStream(columnIndex); } } File [changed]: RowSetCache.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.80.12.3&r2=1.80.12.4 Delta lines: +2 -146 --------------------- --- RowSetCache.cxx 18 Jan 2006 13:59:17 -0000 1.80.12.3 +++ RowSetCache.cxx 19 Jan 2006 07:12:27 -0000 1.80.12.4 @@ -4,9 +4,9 @@ * * $RCSfile: RowSetCache.cxx,v $ * - * $Revision: 1.80.12.3 $ + * $Revision: 1.80.12.4 $ * - * last change: $Author: fs $ $Date: 2006/01/18 13:59:17 $ + * last change: $Author: fs $ $Date: 2006/01/19 07:12:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -450,150 +450,6 @@ Reference< XResultSetMetaData > ORowSetCache::getMetaData( ) { return m_xMetaData; -} -// ------------------------------------------------------------------------- -// XRow -sal_Bool ORowSetCache::wasNull( ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(),"Iterator is equal end()"); - - return (*(*m_aMatrixIter))[m_nLastColumnIndex].isNull(); -} -// ----------------------------------------------------------------------------- -ORowSetValue ORowSetCache::getValue(sal_Int32 columnIndex) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(),"Iterator is equal end()"); - - m_nLastColumnIndex = columnIndex; - return (*(*m_aMatrixIter))[m_nLastColumnIndex]; -} -// ------------------------------------------------------------------------- -::rtl::OUString ORowSetCache::getString( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -sal_Bool ORowSetCache::getBoolean( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -sal_Int8 ORowSetCache::getByte( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -sal_Int16 ORowSetCache::getShort( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -sal_Int32 ORowSetCache::getInt( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -sal_Int64 ORowSetCache::getLong( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -float ORowSetCache::getFloat( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -double ORowSetCache::getDouble( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -Sequence< sal_Int8 > ORowSetCache::getBytes( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -::com::sun::star::util::Date ORowSetCache::getDate( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -::com::sun::star::util::Time ORowSetCache::getTime( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -::com::sun::star::util::DateTime ORowSetCache::getTimestamp( sal_Int32 columnIndex ) -{ - return getValue(columnIndex); -} -// ------------------------------------------------------------------------- -Reference< ::com::sun::star::io::XInputStream > ORowSetCache::getBinaryStream( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(),"Iterator is equal end()"); - - m_nLastColumnIndex = columnIndex; - return new ::comphelper::SequenceInputStream((*(*m_aMatrixIter))[m_nLastColumnIndex].getSequence()); -} -// ------------------------------------------------------------------------- -Reference< ::com::sun::star::io::XInputStream > ORowSetCache::getCharacterStream( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(),"Iterator is equal end()"); - - m_nLastColumnIndex = columnIndex; - return new ::comphelper::SequenceInputStream((*(*m_aMatrixIter))[m_nLastColumnIndex].getSequence()); -} -// ------------------------------------------------------------------------- -Any ORowSetCache::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - return Any(); -} -// ------------------------------------------------------------------------- -Reference< XRef > ORowSetCache::getRef( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - return Reference< XRef >(); -} -// ------------------------------------------------------------------------- -Reference< XBlob > ORowSetCache::getBlob( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - return Reference< XBlob >(); -} -// ------------------------------------------------------------------------- -Reference< XClob > ORowSetCache::getClob( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - return Reference< XClob >(); -} -// ------------------------------------------------------------------------- -Reference< XArray > ORowSetCache::getArray( sal_Int32 columnIndex ) -{ - if(m_bAfterLast) - throwFunctionSequenceException(m_xSet.get()); - - return Reference< XArray >(); } // ------------------------------------------------------------------------- File [changed]: RowSetCache.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.hxx?r1=1.25.76.1&r2=1.25.76.2 Delta lines: +2 -25 -------------------- --- RowSetCache.hxx 16 Jan 2006 10:12:23 -0000 1.25.76.1 +++ RowSetCache.hxx 19 Jan 2006 07:12:27 -0000 1.25.76.2 @@ -4,9 +4,9 @@ * * $RCSfile: RowSetCache.hxx,v $ * - * $Revision: 1.25.76.1 $ + * $Revision: 1.25.76.2 $ * - * last change: $Author: fs $ $Date: 2006/01/16 10:12:23 $ + * last change: $Author: fs $ $Date: 2006/01/19 07:12:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -172,7 +172,6 @@ void rotateCacheIterator(sal_Int16 _nDist); void updateValue(sal_Int32 columnIndex,const connectivity::ORowSetValue& x); - connectivity::ORowSetValue getValue(sal_Int32 columnIndex); // checks and set the flags isAfterLast isLast and position when afterlast is true void checkPositionFlags(); void checkUpdateConditions(sal_Int32 columnIndex); @@ -212,28 +211,6 @@ // ::com::sun::star::sdbc::XResultSetMetaDataSupplier ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > getMetaData( ); - - // ::com::sun::star::sdbc::XRow - sal_Bool wasNull( ); - ::rtl::OUString getString( sal_Int32 columnIndex ); - sal_Bool getBoolean( sal_Int32 columnIndex ); - sal_Int8 getByte( sal_Int32 columnIndex ); - sal_Int16 getShort( sal_Int32 columnIndex ); - sal_Int32 getInt( sal_Int32 columnIndex ); - sal_Int64 getLong( sal_Int32 columnIndex ); - float getFloat( sal_Int32 columnIndex ); - double getDouble( sal_Int32 columnIndex ); - ::com::sun::star::uno::Sequence< sal_Int8 > getBytes( sal_Int32 columnIndex ); - ::com::sun::star::util::Date getDate( sal_Int32 columnIndex ); - ::com::sun::star::util::Time getTime( sal_Int32 columnIndex ); - ::com::sun::star::util::DateTime getTimestamp( sal_Int32 columnIndex ); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getBinaryStream( sal_Int32 columnIndex ); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getCharacterStream( sal_Int32 columnIndex ); - ::com::sun::star::uno::Any getObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > getRef( sal_Int32 columnIndex ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > getBlob( sal_Int32 columnIndex ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > getClob( sal_Int32 columnIndex ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > getArray( sal_Int32 columnIndex ); // ::com::sun::star::sdbcx::XRowLocate ::com::sun::star::uno::Any getBookmark( ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
