Tag: cws_src680_dba201b
User: oj      
Date: 05/09/20 23:45:13

Modified:
 /dba/dbaccess/source/core/api/
  RowSet.cxx

Log:
 RESYNC: (1.133-1.135); FILE MERGED

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.133.44.2&r2=1.133.44.3
Delta lines:  +36 -51
---------------------
--- RowSet.cxx  26 Jul 2005 10:50:32 -0000      1.133.44.2
+++ RowSet.cxx  21 Sep 2005 06:45:08 -0000      1.133.44.3
@@ -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_ROWSET_HXX
@@ -370,6 +344,17 @@
 
        m_aParameterRow.clear(); // because it was constructed with one element 
as default
 }
+
+ORowSet::~ORowSet()
+{
+       if ( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose )
+       {
+               OSL_ENSURE(0, "Please check who doesn't dispose this 
component!");
+               osl_incrementInterlockedCount( &m_refCount );
+               dispose();
+       }
+}
+
 // 
-----------------------------------------------------------------------------
 Any ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
 {
@@ -1152,7 +1137,7 @@
                notifyClonesRowDeleted(m_aBookmark);
 
                m_aBookmark             = Any();
-               m_aCurrentRow   = NULL;
+               m_aCurrentRow   = ORowSetCacheIterator();
                m_aCurrentRow.setBookmark(Any());
 
                ORowSetNotifier aNotifier( this );
@@ -1374,7 +1359,7 @@
        if ( m_pCache && ( m_pCache->m_bInserted || m_bModified) )
                return  (*(*m_pCache->m_aInsertRow))[m_nLastColumnIndex = 
columnIndex];
 
-       OSL_ENSURE(m_pCache->m_aInsertRow != m_aCurrentRow,"Current row stand 
on the insert row but all flags are wrong!");
+       OSL_ENSURE(m_aCurrentRow != m_pCache->m_aInsertRow,"Current row stand 
on the insert row but all flags are wrong!");
        return getValue(columnIndex);
 }
 // -------------------------------------------------------------------------
@@ -2514,7 +2499,7 @@
 // 
-----------------------------------------------------------------------------
 void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
 {
-       if(!m_pCache || columnIndex <= 0 || m_aCurrentRow == NULL || 
m_aCurrentRow == m_pCache->getEnd() || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
+       if(!m_pCache || columnIndex <= 0 || m_aCurrentRow.isNull() || 
m_aCurrentRow == m_pCache->getEnd() || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
                throwFunctionSequenceException(*this);
 }
 // 
-----------------------------------------------------------------------------
@@ -2760,7 +2745,7 @@
        if(compareBookmarks(_rBookmark,m_aBookmark) == 0)
        {
                m_aBookmark             = Any();
-               m_aCurrentRow   = NULL;
+               m_aCurrentRow   = ORowSetCacheIterator();
                m_aCurrentRow.setBookmark(Any());
        }
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to