Tag: cws_src680_dba30 User: fs Date: 05/09/29 23:00:38 Modified: /dba/dbaccess/source/core/api/ RowSetBase.cxx
Log: RESYNC: (1.75-1.77); FILE MERGED 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.75.6.1&r2=1.75.6.2 Delta lines: +33 -59 --------------------- --- RowSetBase.cxx 6 Apr 2005 07:14:12 -0000 1.75.6.1 +++ RowSetBase.cxx 30 Sep 2005 06:00:35 -0000 1.75.6.2 @@ -1,22 +1,20 @@ /************************************************************************* * + * OpenOffice.org - a multi-platform office productivity suite + * * $RCSfile$ * * $Revision$ * * last change: $Author$ $Date$ * - * The Contents of this file are made available subject to the terms of - * either of the following licenses - * - * - GNU Lesser General Public License Version 2.1 - * - Sun Industry Standards Source License Version 1.1 + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. * - * Sun Microsystems Inc., October, 2000 * * GNU Lesser General Public License Version 2.1 * ============================================= - * Copyright 2000 by Sun Microsystems, Inc. + * Copyright 2005 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or @@ -33,30 +31,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * - * - * Sun Industry Standards Source License Version 1.1 - * ================================================= - * The contents of this file are subject to the Sun Industry Standards - * Source License Version 1.1 (the "License"); You may not use this file - * except in compliance with the License. You may obtain a copy of the - * License at http://www.openoffice.org/license.html. - * - * Software provided under this License is provided on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, - * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. - * See the License for the specific provisions governing your rights and - * obligations concerning the Software. - * - * The Initial Developer of the Original Code is: Sun Microsystems, Inc. - * - * Copyright: 2000 by Sun Microsystems, Inc. - * - * All Rights Reserved. - * - * Contributor(s): _______________________________________ - * - * ************************************************************************/ #ifndef DBACCESS_CORE_API_ROWSETBASE_HXX #include "RowSetBase.hxx" @@ -264,7 +238,7 @@ ::osl::MutexGuard aGuard( *m_pMutex ); checkCache(); - return ((m_nLastColumnIndex != -1) && m_aCurrentRow && m_aCurrentRow != m_pCache->getEnd() && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid()) ? (*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True; + return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? (*(*m_aCurrentRow))[m_nLastColumnIndex].isNull() : sal_True; } // ----------------------------------------------------------------------------- const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex) @@ -273,26 +247,26 @@ checkCache(); OSL_ENSURE(!(m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: Illegal call here (we're before first or after last)!"); - if ( m_aCurrentRow && m_aCurrentRow != m_pCache->getEnd() && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid() ) + if ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() ) { #if OSL_DEBUG_LEVEL > 0 ORowSetMatrix::iterator aCacheEnd = m_pCache->getEnd(); ORowSetMatrix::iterator aCurrentRow = m_aCurrentRow; #endif - OSL_ENSURE(m_aCurrentRow && m_aCurrentRow <= m_pCache->getEnd(),"Invalid iterator set for currentrow!"); + OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow <= m_pCache->getEnd(),"Invalid iterator set for currentrow!"); return (*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex]; } else { // currentrow is null when the clone move the window - if(!m_aCurrentRow || m_aCurrentRow.isNull()) + if ( m_aCurrentRow.isNull() ) { positionCache(); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); + OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); return getValue(columnIndex); } - OSL_ENSURE(m_aCurrentRow && (m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix"); + OSL_ENSURE(!m_aCurrentRow.isNull() && (m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix"); } // we should normally never reach this here return m_aEmptyValue; @@ -363,18 +337,18 @@ ::osl::MutexGuard aGuard( *m_pMutex ); checkCache(); - if(m_aCurrentRow && m_aCurrentRow != m_pCache->getEnd()) + if( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd()) return new ::comphelper::SequenceInputStream((*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex].getSequence()); else { - if(m_aCurrentRow) + 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"); else { positionCache(); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); + OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); return getBinaryStream(columnIndex); } } @@ -1046,7 +1020,7 @@ m_aBookmark = m_pCache->getBookmark(); OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(m_aCurrentRow,"CurrentRow is null!"); + OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is null!"); m_aCurrentRow.setBookmark(m_aBookmark); OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd(),"Position of matrix iterator isn't valid!"); OSL_ENSURE(m_aCurrentRow->isValid(),"Currentrow isn't valid"); @@ -1057,7 +1031,7 @@ sal_Int32 nNewRow = m_pCache->getRow(); OSL_ENSURE(nOldRow == nNewRow,"Old position is not equal to new postion"); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(m_aCurrentRow,"CurrentRow is nul after positionCache!"); + OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); } else { @@ -1075,7 +1049,7 @@ { positionCache(); m_aCurrentRow = m_pCache->m_aMatrixIter; - OSL_ENSURE(m_aCurrentRow,"CurrentRow is nul after positionCache!"); + OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
