Tag: cws_src680_rowsetdel
User: fs      
Date: 06/01/20 04:09:22

Modified:
 /dba/dbaccess/source/core/api/
  RowSet.cxx, RowSet.hxx, RowSetBase.cxx, RowSetBase.hxx

Log:
 #i55731# slightly corrected onDeleteRow/onDeletedRow

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.139.16.5&r2=1.139.16.6
Delta lines:  +7 -7
-------------------
--- RowSet.cxx  20 Jan 2006 09:02:48 -0000      1.139.16.5
+++ RowSet.cxx  20 Jan 2006 12:09:17 -0000      1.139.16.6
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.cxx,v $
  *
- *  $Revision: 1.139.16.5 $
+ *  $Revision: 1.139.16.6 $
  *
- *  last change: $Author: fs $ $Date: 2006/01/20 09:02:48 $
+ *  last change: $Author: fs $ $Date: 2006/01/20 12:09:17 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1115,7 +1115,7 @@
     positionCache( MOVE_NONE_REFRESH_ONLY );
     sal_Int32 nDeletePosition = m_pCache->getRow();
 
-    notifyRowSetAndClonesRowDelete( aBookmarkToDelete, nDeletePosition );
+    notifyRowSetAndClonesRowDelete( aBookmarkToDelete );
 
        ORowSetRow aOldValues;
        if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && 
m_pCache->m_aMatrixIter->isValid() )
@@ -1983,7 +1983,7 @@
         sal_Int32 nDeletePosition = m_pCache->getRow();
 
         // first notify the clones so that they can save their position
-               notifyRowSetAndClonesRowDelete( *row, nDeletePosition );
+               notifyRowSetAndClonesRowDelete( *row );
 
         // now delete the row
         if ( !m_pCache->deleteRow() )
@@ -2014,10 +2014,10 @@
     return aResults;
 }
 // 
-----------------------------------------------------------------------------
-void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark, sal_Int32 
_nPos )
+void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
 {
     // notify ourself
-    onDeleteRow( _rBookmark, _nPos );
+    onDeleteRow( _rBookmark );
     // notify the clones
        for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); 
m_aClones.end() != i; i++)
        {
@@ -2026,7 +2026,7 @@
                {
                        ORowSetClone* pClone = 
reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelImplementationId()));
                        if(pClone)
-                               pClone->onDeleteRow( _rBookmark, _nPos );
+                               pClone->onDeleteRow( _rBookmark );
                }
        }
 }

File [changed]: RowSet.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.hxx?r1=1.41.74.2&r2=1.41.74.3
Delta lines:  +3 -3
-------------------
--- RowSet.hxx  20 Jan 2006 09:02:49 -0000      1.41.74.2
+++ RowSet.hxx  20 Jan 2006 12:09:18 -0000      1.41.74.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.hxx,v $
  *
- *  $Revision: 1.41.74.2 $
+ *  $Revision: 1.41.74.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/01/20 09:02:49 $
+ *  last change: $Author: fs $ $Date: 2006/01/20 12:09:18 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -183,7 +183,7 @@
                void firePropertyChange(sal_Int32 _nPos,const 
::connectivity::ORowSetValue& _rNewValue);
 
         /// informs the clones (and ourself) that we are going to delete a 
record with a given bookmark
-               void notifyRowSetAndClonesRowDelete( const 
::com::sun::star::uno::Any& _rBookmark, sal_Int32 _nPos );
+               void notifyRowSetAndClonesRowDelete( const 
::com::sun::star::uno::Any& _rBookmark );
 
         /// inform the clones (and ourself) that we have deleted a record with 
a given bookmark
                void notifyRowSetAndClonesRowDeleted( const 
::com::sun::star::uno::Any& _rBookmark, sal_Int32 _nPos );

File [changed]: RowSetBase.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetBase.cxx?r1=1.80.12.7&r2=1.80.12.8
Delta lines:  +9 -10
--------------------
--- RowSetBase.cxx      20 Jan 2006 09:02:50 -0000      1.80.12.7
+++ RowSetBase.cxx      20 Jan 2006 12:09:18 -0000      1.80.12.8
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetBase.cxx,v $
  *
- *  $Revision: 1.80.12.7 $
+ *  $Revision: 1.80.12.8 $
  *
- *  last change: $Author: fs $ $Date: 2006/01/20 09:02:50 $
+ *  last change: $Author: fs $ $Date: 2006/01/20 12:09:18 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1303,7 +1303,7 @@
        return Any();
 }
 // 
-----------------------------------------------------------------------------
-void ORowSetBase::onDeleteRow( const Any& _rBookmark, sal_Int32 _nPos )
+void ORowSetBase::onDeleteRow( const Any& _rBookmark )
 {
     if ( rowDeleted() )
         // not interested in
@@ -1312,7 +1312,10 @@
        ::osl::MutexGuard aGuard( *m_pMutex );
        OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::onDeleteRow: Bookmark 
isn't valid!" );
        if ( compareBookmarks( _rBookmark, m_aBookmark ) == 0 )
-               m_nDeletedPosition = _nPos;
+    {
+        positionCache( MOVE_NONE_REFRESH_ONLY );
+               m_nDeletedPosition = m_pCache->getRow();
+    }
 }
 // 
-----------------------------------------------------------------------------
 void ORowSetBase::onDeletedRow( const Any& _rBookmark, sal_Int32 _nPos )
@@ -1322,12 +1325,8 @@
         // if we're a clone, and on a deleted row, and the main RowSet deleted 
another
         // row (only the main RowSet can, clones can't), which is *before* our
         // deleted position, then we have to adjust this position
-        if ( m_bClone )
-        {
-            DBG_ASSERT( _nPos != m_nDeletedPosition, 
"ORowSetBase::onDeletedRow: deleted the same row again?" );
-            if ( _nPos < m_nDeletedPosition )
+        if ( m_bClone && ( _nPos < m_nDeletedPosition ) )
                 --m_nDeletedPosition;
-        }
         return;
     }
 

File [changed]: RowSetBase.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetBase.hxx?r1=1.32.74.3&r2=1.32.74.4
Delta lines:  +3 -3
-------------------
--- RowSetBase.hxx      20 Jan 2006 09:02:51 -0000      1.32.74.3
+++ RowSetBase.hxx      20 Jan 2006 12:09:19 -0000      1.32.74.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetBase.hxx,v $
  *
- *  $Revision: 1.32.74.3 $
+ *  $Revision: 1.32.74.4 $
  *
- *  last change: $Author: fs $ $Date: 2006/01/20 09:02:51 $
+ *  last change: $Author: fs $ $Date: 2006/01/20 12:09:19 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -351,7 +351,7 @@
                virtual void SAL_CALL removeRowSetListener( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >& 
listener ) throw(::com::sun::star::uno::RuntimeException) = 0;
 
                // is called when the rowset is going to delete this bookmark 
_rBookmark
-               void onDeleteRow( const ::com::sun::star::uno::Any& _rBookmark, 
sal_Int32 _nPos );
+               void onDeleteRow( const ::com::sun::star::uno::Any& _rBookmark 
);
                // is called when the rowset has deleted this bookmark 
_rBookmark
                void onDeletedRow( const ::com::sun::star::uno::Any& 
_rBookmark, sal_Int32 _nPos );
 




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

Reply via email to