Tag: cws_src680_rowsetdel
User: fs      
Date: 06/01/16 02:12:40

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

Log:
 #i55731# fixed the handling when deleting records

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&r2=1.139.16.1
Delta lines:  +193 -209
-----------------------
--- RowSet.cxx  21 Dec 2005 13:33:51 -0000      1.139
+++ RowSet.cxx  16 Jan 2006 10:12:36 -0000      1.139.16.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.cxx,v $
  *
- *  $Revision: 1.139 $
+ *  $Revision: 1.139.16.1 $
  *
- *  last change: $Author: obo $ $Date: 2005/12/21 13:33:51 $
+ *  last change: $Author: fs $ $Date: 2006/01/16 10:12:36 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -134,9 +134,6 @@
 #ifndef _DBHELPER_DBEXCEPTION_HXX_
 #include <connectivity/dbexception.hxx>
 #endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
-#include <connectivity/dbtools.hxx>
-#endif
 #ifndef DBACCESS_CORE_API_SINGLESELECTQUERYCOMPOSER_HXX
 #include "SingleSelectQueryComposer.hxx"
 #endif
@@ -272,19 +269,12 @@
        ,m_nMaxFieldSize(0)
        ,m_nTransactionIsolation(0)
        ,m_nPrivileges(0)
-       ,m_nAsyncUpdateRowCount(0)
        ,m_nMaxRows(0)
        ,m_nQueryTimeOut(0)
        ,m_bUseEscapeProcessing(sal_True)
        ,m_bApplyFilter(sal_False)
-       ,m_bInserted(sal_False)
-       ,m_bDeleted(sal_False)
-       ,m_bUpdated(sal_False)
        ,m_bCreateStatement(sal_True)
-       ,m_bCanceled(sal_False)
-       ,m_bRowObsolete(sal_False)
        ,m_bModified(sal_False)
-       ,m_bOwnsResultRow(sal_False)
        ,m_bRebuildConnOnExecute(sal_False)
        ,m_bNew(sal_False)
        ,m_bIsBookmarable(sal_True)
@@ -713,10 +703,10 @@
                m_aBookmark             = Any();
                m_bBeforeFirst  = sal_True;
                m_bAfterLast    = sal_False;
-               m_bRowCountFinal= sal_False;
                m_bNew                  = sal_False;
                m_bModified             = sal_False;
-               m_nRowCount             = 0;
+               m_bLastKnownRowCountFinal = sal_False;
+        m_nLastKnownRowCount      = 0;
                if ( m_aOldRow.isValid() )
                        m_aOldRow->clearRow();
        }
@@ -1027,14 +1017,14 @@
                if ( !m_aCurrentRow.isNull() )
                        aOldValues = new ORowSetValueVector( 
m_aCurrentRow->getBody() );
                RowChangeEvent aEvt(*this,RowChangeAction::INSERT,1);
-               if(notifyAllListenersRowBeforeChange(aGuard,aEvt))
-               {
+               notifyAllListenersRowBeforeChange(aGuard,aEvt);
+
                        ::osl::MutexGuard aCacheGuard( *m_pMutex);
                        sal_Bool bInserted = m_pCache->insertRow();
 
                        // notification order
                        // - column values
-                       setCurrentRow(sal_False,aOldValues,aGuard); // we don't 
move here
+               setCurrentRow( sal_False, sal_True, aOldValues, aGuard ); // we 
don't move here
 
                        // make sure that our row is set to the new inserted 
row before clearing the inser flags in the cache
                        m_pCache->resetInsertRow(bInserted);
@@ -1054,9 +1044,6 @@
                        // - RowCount/IsRowCountFinal
                        fireRowcount();
                }
-        else
-            throwRowSetVetoException( *this, "The insertion of the record has 
been vetoed." );
-       }
 }
 // -------------------------------------------------------------------------
 sal_Int32 SAL_CALL ORowSet::getRow(  ) throw(SQLException, RuntimeException)
@@ -1083,8 +1070,8 @@
                        aOldValues = new ORowSetValueVector( 
m_aCurrentRow->getBody() );
 
                RowChangeEvent aEvt(*this,RowChangeAction::UPDATE,1);
-               if(notifyAllListenersRowBeforeChange(aGuard,aEvt))
-               {
+               notifyAllListenersRowBeforeChange(aGuard,aEvt);
+
                        m_pCache->updateRow(m_aCurrentRow.operator ->());
                        m_aBookmark             = m_pCache->getBookmark();
                        m_aCurrentRow   = m_pCache->m_aMatrixIter;
@@ -1102,9 +1089,6 @@
                                
fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True);
                        OSL_ENSURE( !m_bModified, "ORowSet::updateRow: just 
updated, but _still_ modified?" );
                }
-        else
-            throwRowSetVetoException( *this, "The update of the record has 
been vetoed." );
-       }
 }
 // -------------------------------------------------------------------------
 void SAL_CALL ORowSet::deleteRow(  ) throw(SQLException, RuntimeException)
@@ -1112,33 +1096,34 @@
        ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
 
        ::osl::ResettableMutexGuard aGuard( *m_pMutex );
-       // deleteRow is not allowed when:
-       // stands before the first row
-       // after the last row
-       // stands on the insert row
-       // the concurrency is read only
-       if(!m_pCache || m_bBeforeFirst || m_bAfterLast || m_bNew || 
m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY || 
((m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE))
-               throwFunctionSequenceException(*this);
+    checkCache();
+
+       if ( m_bBeforeFirst || m_bAfterLast )
+        throwSQLException( "Cannot delete the before-first or after-last 
row.", SQL_INVALID_CURSOR_POSITION, *this );
+    if ( m_bNew )
+        throwSQLException( "Cannot delete the insert-row.", 
SQL_INVALID_CURSOR_POSITION, *this );
+    if  ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
+        throwSQLException( "Result set is read only.", 
SQL_FUNCTION_SEQUENCE_ERROR, *this );
+    if ( ( m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE )
+        throwSQLException( "DELETE privilege not available.", 
SQL_FUNCTION_SEQUENCE_ERROR, *this );
+    if ( rowDeleted() )
+        throwSQLException( "Current row already deleted.", 
SQL_FUNCTION_SEQUENCE_ERROR, *this );
 
        // this call position the cache indirect
-       notifyClonesRowDelete(m_aBookmark);
+    Any aBookmarkToDelete( m_aBookmark );
+       notifyRowSetAndClonesRowDelete( aBookmarkToDelete );
 
-       positionCache();
+       positionCache( MOVE_NONE_REFRESH_ONLY );
 
        ORowSetRow aOldValues;
        if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && 
m_pCache->m_aMatrixIter->isValid() )
                aOldValues = new ORowSetValueVector( 
m_pCache->m_aMatrixIter->getBody() );
 
        RowChangeEvent aEvt(*this,RowChangeAction::DELETE,1);
-       if(notifyAllListenersRowBeforeChange(aGuard,aEvt))
-       {
-               m_nPosition = m_pCache->getRow();
-               m_pCache->deleteRow();
-               notifyClonesRowDeleted(m_aBookmark);
+       notifyAllListenersRowBeforeChange(aGuard,aEvt);
 
-               m_aBookmark             = Any();
-               m_aCurrentRow   = m_pCache->getEnd();
-               m_aCurrentRow.setBookmark(Any());
+    m_pCache->deleteRow();
+       notifyRowSetAndClonesRowDeleted( aBookmarkToDelete );
 
                ORowSetNotifier aNotifier( this );
                        // this will call cancelRowModification on the cache if 
necessary
@@ -1153,9 +1138,6 @@
 
                // - RowCount/IsRowCountFinal
                fireRowcount();
-       }
-    else
-        throwRowSetVetoException( *this, "The deletion of the row has been 
vetoed." );
 }
 
 // -------------------------------------------------------------------------
@@ -1164,16 +1146,18 @@
        ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
 
        ::osl::MutexGuard aGuard( *m_pMutex );
-       if(m_bBeforeFirst || m_bAfterLast)
+       if ( m_bBeforeFirst || m_bAfterLast || rowDeleted() )
                return; // nothing to do so return
 
+    checkCache();
        // cancelRowUpdates is not allowed when:
-       // standing on the insert row
-       // the concurrency is read only
-       if(!m_pCache || m_bNew || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY)
+       // - standing on the insert row
+       // - the concurrency is read only
+    // - the current row is deleted
+       if ( m_bNew || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY )
                throwFunctionSequenceException(*this);
 
-       positionCache();
+       positionCache( MOVE_NONE_REFRESH_ONLY );
 
        m_pCache->cancelRowUpdates();
 
@@ -1221,18 +1205,18 @@
 void ORowSet::notifyAllListeners(::osl::ResettableMutexGuard& _rGuard)
 {
        EventObject aEvt(*m_pMySelf);
-       NOTIFY_LISTERNERS(m_aRowsetListeners,XRowSetListener,rowSetChanged);
+    m_aRowsetListeners.notifyEach( &XRowSetListener::rowSetChanged, aEvt );
 }
 // -------------------------------------------------------------------------
 void ORowSet::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& 
_rGuard)
 {
        EventObject aEvt(*m_pMySelf);
-       NOTIFY_LISTERNERS(m_aRowsetListeners,XRowSetListener,cursorMoved);
+    m_aRowsetListeners.notifyEach( &XRowSetListener::cursorMoved, aEvt );
 }
 // -------------------------------------------------------------------------
-void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& 
_rGuard,const RowChangeEvent &aEvt)
+void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& 
_rGuard, const EventObject& aEvt)
 {
-       NOTIFY_LISTERNERS(m_aRowsetListeners,XRowSetListener,rowChanged);
+    m_aRowsetListeners.notifyEach( &XRowSetListener::rowChanged, aEvt );
 }
 // -------------------------------------------------------------------------
 sal_Bool 
ORowSet::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& 
_rGuard)
@@ -1242,30 +1226,34 @@
        return bCheck;
 }
 // -------------------------------------------------------------------------
-sal_Bool 
ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& 
_rGuard,const RowChangeEvent &aEvt)
+void ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& 
_rGuard,const RowChangeEvent &aEvt)
 {
        
NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveRowChange);
-       return bCheck;
+    if ( !bCheck )
+        throwRowSetVetoException( *this, "The record operation has been 
vetoed." );
 }
 // -------------------------------------------------------------------------
 void ORowSet::fireRowcount()
 {
-       if(m_nRowCount != m_pCache->m_nRowCount)
+    sal_Int32 nCurrentRowCount( impl_getRowCount() );
+    sal_Bool bCurrentRowCountFinal( m_pCache->m_bRowCountFinal );
+
+    if ( m_nLastKnownRowCount != nCurrentRowCount )
        {
                sal_Int32 nHandle = PROPERTY_ID_ROWCOUNT;
                Any aNew,aOld;
-               aNew <<= m_pCache->m_nRowCount;aOld <<= m_nRowCount;
+               aNew <<= nCurrentRowCount; aOld <<= m_nLastKnownRowCount;
                fire(&nHandle,&aNew,&aOld,1,sal_False);
-               m_nRowCount = m_pCache->m_nRowCount;
+               m_nLastKnownRowCount = nCurrentRowCount;
        }
-       if(!m_bRowCountFinal && m_bRowCountFinal != m_pCache->m_bRowCountFinal)
+       if ( !m_bLastKnownRowCountFinal && ( m_bLastKnownRowCountFinal != 
bCurrentRowCountFinal ) )
        {
                sal_Int32 nHandle = PROPERTY_ID_ISROWCOUNTFINAL;
                Any aNew,aOld;
-               aNew <<= bool2any(m_pCache->m_bRowCountFinal);
-               aOld <<= bool2any(m_bRowCountFinal);
+               aNew <<= bool2any( bCurrentRowCountFinal );
+               aOld <<= bool2any( m_bLastKnownRowCountFinal );
                fire(&nHandle,&aNew,&aOld,1,sal_False);
-               m_bRowCountFinal = m_pCache->m_bRowCountFinal;
+               m_bLastKnownRowCountFinal = bCurrentRowCountFinal;
        }
 }
 // -------------------------------------------------------------------------
@@ -1282,11 +1270,18 @@
        if(notifyAllListenersCursorBeforeMove(aGuard))
        {
                // remember old value for fire
+               ORowSetRow aOldValues;
+
                // check before because the resultset could be empty
-               if(m_aBookmark.hasValue())
-                       positionCache();
+               if ( rowDeleted() )
+        {
+                       positionCache( MOVE_BACKWARD );
+                   m_pCache->previous();
+                       setCurrentRow( sal_True, sal_False, aOldValues, aGuard 
);
+        }
+        else
+                       positionCache( MOVE_NONE_REFRESH_ONLY );
 
-               ORowSetRow aOldValues;
                if ( !m_bBeforeFirst && !m_bAfterLast && 
m_pCache->m_aMatrixIter != m_pCache->getEnd() && 
m_pCache->m_aMatrixIter->isValid() )
                        aOldValues = new ORowSetValueVector( 
m_pCache->m_aMatrixIter->getBody() );
 
@@ -1318,14 +1313,23 @@
        ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
 
        ::osl::ResettableMutexGuard aGuard( *m_pMutex );
-
        checkPositioningAllowed();
 
-       if(m_pCache && ( m_pCache->m_bInserted || m_bModified ))
-       {
-               if(notifyAllListenersCursorBeforeMove(aGuard))
+    if ( !m_pCache->m_bInserted && !m_bModified )
+        // nothing to do if we're not on the insertion row, and not modified 
otherwise
+        return;
+
+    if ( rowDeleted() )
+        // this would perhaps even justify a RuntimeException ....
+        // if the current row is deleted, then no write access to this row 
should be possible. So,
+        // m_bModified should be true. Also, as soon as somebody calls 
moveToInsertRow,
+        // our current row should not be deleted anymore. So, we should not 
have survived the above
+        // check "if ( !m_pCache->m_bInserted && !m_bModified )"
+        throwSQLException( "The current row is deleted.", 
SQL_FUNCTION_SEQUENCE_ERROR, *this );
+
+       if ( notifyAllListenersCursorBeforeMove( aGuard ) )
                {
-                       positionCache();
+        positionCache( MOVE_NONE_REFRESH_ONLY );
                        m_pCache->moveToCurrentRow();
 
                        ORowSetNotifier aNotifier( this );
@@ -1339,7 +1343,6 @@
                        // - IsNew
                        aNotifier.fire();
                }
-       }
 }
 // -------------------------------------------------------------------------
 // XRow
@@ -1962,20 +1965,14 @@
        Sequence< sal_Int32 > aRet;
        RowChangeEvent aEvt(*this,RowChangeAction::DELETE,rows.getLength());
        // notify the rowset listeners
-       if(notifyAllListenersRowBeforeChange(aGuard,aEvt))
-       {
+       notifyAllListenersRowBeforeChange(aGuard,aEvt);
+
                // first notify the clones so that they can save their position
                const Any* pBegin = rows.getConstArray();
                const Any* pEnd   = pBegin + rows.getLength();
                for(;pBegin != pEnd;++pBegin)
-               {
-                       notifyClonesRowDelete(*pBegin);
-                       if(compareBookmarks( m_aBookmark,*pBegin) == 0)
-                       {
-                               positionCache();
-                               m_nPosition = m_pCache->getRow();
-                       }
-               }
+               notifyRowSetAndClonesRowDelete(*pBegin);
+
                // now delete the rows
                aRet = m_pCache->deleteRows(rows);
 
@@ -1983,22 +1980,10 @@
                pBegin = rows.getConstArray();
 
                const sal_Int32* pRetBegin      = aRet.getConstArray();
-               const sal_Int32* pRetEnd        = pRetBegin + aRet.getLength();
-               OSL_ENSURE(aRet.getLength() == 
rows.getLength(),"ORowSet::deleteRows: The length of the rows and returnstatus 
is not equal!");
-               for(;pBegin != pEnd;++pBegin)
-               {
-                       if(*pRetBegin)
-                       {
-                               notifyClonesRowDeleted(*pBegin);
-                               if(compareBookmarks( m_aBookmark,*pBegin) == 0)
-                               {
-                                       m_aOldRow->clearRow();
-                                       m_aCurrentRow   = m_pCache->getEnd();
-                                       m_aBookmark             = Any();
-                                       m_aCurrentRow.setBookmark(m_aBookmark);
-                               }
-                       }
-               }
+       OSL_ENSURE(aRet.getLength() == rows.getLength(),"ORowSet::deleteRows: 
The length of the rows and return status is not equal!");
+       for (;pBegin != pEnd;++pBegin)
+               if ( *pRetBegin )
+                       notifyRowSetAndClonesRowDeleted( *pBegin );
 
                aEvt.Rows = aRet.getLength();
 
@@ -2016,14 +2001,15 @@
 
                // - RowCount/IsRowCountFinal
                fireRowcount();
-       }
-    else
-        throwRowSetVetoException( *this, "The deletion of the records has been 
vetoed." );
+
        return aRet;
 }
 // 
-----------------------------------------------------------------------------
-void ORowSet::notifyClonesRowDelete(const Any& _rBookmark)
+void ORowSet::notifyRowSetAndClonesRowDelete(const Any& _rBookmark)
 {
+    // notify ourself
+    onDeleteRow(_rBookmark);
+    // notify the clones
        for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); 
m_aClones.end() != i; i++)
        {
                Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
@@ -2031,13 +2017,16 @@
                {
                        ORowSetClone* pClone = 
reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelImplementationId()));
                        if(pClone)
-                               pClone->rowDelete(_rBookmark);
+                               pClone->onDeleteRow(_rBookmark);
                }
        }
 }
 
//------------------------------------------------------------------------------
-void ORowSet::notifyClonesRowDeleted(const Any& _rBookmark)
+void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark )
 {
+    // notify ourself
+    onDeletedRow(_rBookmark);
+    // notify the clones
        for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); 
m_aClones.end() != i; i++)
        {
                Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
@@ -2045,7 +2034,7 @@
                {
                        ORowSetClone* pClone = 
reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelImplementationId()));
                        if(pClone)
-                               pClone->rowDeleted(_rBookmark);
+                               pClone->onDeletedRow(_rBookmark);
                }
        }
 }
@@ -2530,8 +2519,6 @@
                     ,ORowSetBase(OComponentHelper::rBHelper,_pMutex)
                         ,m_nFetchDirection(rParent.m_nFetchDirection)
                         ,m_nFetchSize(rParent.m_nFetchSize)
-                        ,m_bDeleted(rParent.m_bDeleted)
-                        ,m_bRowObsolete(rParent.m_bRowObsolete)
                         ,m_bIsBookmarable(sal_True)
                         ,m_pParent(&rParent)
 {
@@ -2731,27 +2718,6 @@
        return 0;
 }
 // 
-----------------------------------------------------------------------------
-void ORowSetClone::rowDelete(const ::com::sun::star::uno::Any& _rBookmark)
-{
-       if(compareBookmarks(_rBookmark,m_aBookmark) == 0)
-       {
-               OSL_ENSURE(m_aBookmark.hasValue(),"ORowSetClone::rowDelete: 
Bookmark isn't valid!");
-               ::osl::MutexGuard aGuard( *m_pMutex );
-               m_pCache->moveToBookmark(m_aBookmark);
-               m_nPosition = m_pCache->getRow();
-       }
-}
-// 
-----------------------------------------------------------------------------
-void ORowSetClone::rowDeleted(const ::com::sun::star::uno::Any& _rBookmark)
-{
-       if(compareBookmarks(_rBookmark,m_aBookmark) == 0)
-       {
-               m_aBookmark             = Any();
-               m_aCurrentRow   = m_pCache->getEnd();
-               m_aCurrentRow.setBookmark(Any());
-       }
-}
-// 
-----------------------------------------------------------------------------
 void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 
nHandle,const Any& rValue) throw (Exception)
 {
        switch(nHandle)
@@ -2788,6 +2754,24 @@
 sal_Bool ORowSetClone::isNew( )
 {
        return sal_False;
+}
+
+// -------------------------------------------------------------------------
+void SAL_CALL ORowSetClone::execute(  ) throw(SQLException, RuntimeException)
+{
+    throwFunctionNotSupportedException( "RowSetClone::XRowSet::execute", *this 
);
+}
+
+// -------------------------------------------------------------------------
+void SAL_CALL ORowSetClone::addRowSetListener( const Reference< 
XRowSetListener >& listener ) throw(RuntimeException)
+{
+    throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
+}
+
+// -------------------------------------------------------------------------
+void SAL_CALL ORowSetClone::removeRowSetListener( const Reference< 
XRowSetListener >& listener ) throw(RuntimeException)
+{
+    throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
 }
 
 } // dbaccess

File [changed]: RowSet.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.hxx?r1=1.41&r2=1.41.74.1
Delta lines:  +20 -28
---------------------
--- RowSet.hxx  8 Sep 2005 10:00:41 -0000       1.41
+++ RowSet.hxx  16 Jan 2006 10:12:37 -0000      1.41.74.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.hxx,v $
  *
- *  $Revision: 1.41 $
+ *  $Revision: 1.41.74.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:00:41 $
+ *  last change: $Author: fs $ $Date: 2006/01/16 10:12:37 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -159,19 +159,12 @@
                sal_Int32                                       m_nCommandType;
                sal_Int32                                       
m_nTransactionIsolation;
                sal_Int32                                       m_nPrivileges;
-               sal_Int32                                       
m_nAsyncUpdateRowCount;
+        sal_Int32                   m_nLastKnownRowCount;
+        sal_Bool                    m_bLastKnownRowCountFinal;
                sal_Bool                                        
m_bUseEscapeProcessing ;
                sal_Bool                                        m_bApplyFilter ;
-               sal_Bool                                        m_bFirst ;
-               sal_Bool                                        m_bLast ;
                sal_Bool                                        
m_bCreateStatement ;    // determines we to create a new prepared statement
-               sal_Bool                                        m_bDeleted ;
-               sal_Bool                                        m_bInserted ;
-               sal_Bool                                        m_bUpdated ;
-               sal_Bool                                        
m_bOwnsResultRow ;
-               sal_Bool                                        m_bRowObsolete ;
                sal_Bool                                        m_bModified ;
-               sal_Bool                                        m_bCanceled ;
                sal_Bool                                        
m_bRebuildConnOnExecute ;
                sal_Bool                                        
m_bIsBookmarable ;
                sal_Bool                                        m_bNew ;
@@ -188,10 +181,13 @@
                // fire a change for one column
                // _nPos starts at zero
                void firePropertyChange(sal_Int32 _nPos,const 
::connectivity::ORowSetValue& _rNewValue);
-               // inform the clones that we have deleted some records
-               void notifyClonesRowDeleted(const ::com::sun::star::uno::Any& 
_rBookmark);
-               // inform the clones that we will delete some records
-               void notifyClonesRowDelete(const ::com::sun::star::uno::Any& 
_rBookmark);
+
+        /// 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);
+
+        /// inform the clones (and ourself) that we have deleted a record with 
a given bookmark
+               void notifyRowSetAndClonesRowDeleted(const 
::com::sun::star::uno::Any& _rBookmark);
+
                void checkUpdateIterator();
                const connectivity::ORowSetValue& getInsertValue(sal_Int32 
columnIndex);
                void setParameter(sal_Int32 parameterIndex, const 
connectivity::ORowSetValue& x);
@@ -206,8 +202,8 @@
                virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( 
sal_Int32 _nHandle ) const;
 
                virtual void fireRowcount();
-               virtual sal_Bool 
notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const 
::com::sun::star::sdb::RowChangeEvent &rEvt);
-               virtual void 
notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,const 
::com::sun::star::sdb::RowChangeEvent &rEvt);
+                       void 
notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const 
::com::sun::star::sdb::RowChangeEvent &rEvt);
+                       void 
notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,const 
::com::sun::star::lang::EventObject& rEvt);
                virtual sal_Bool 
notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard);
                virtual void 
notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard);
                virtual void notifyAllListeners(::osl::ResettableMutexGuard& 
_rGuard);
@@ -403,10 +399,6 @@
                sal_Int32                                       
m_nFetchDirection;
                sal_Int32                                       m_nFetchSize;
                sal_Bool                                        
m_bIsBookmarable;
-               sal_Bool                                        m_bFirst : 1;
-               sal_Bool                                        m_bLast : 1;
-               sal_Bool                                        m_bRowObsolete 
: 1;
-               sal_Bool                                        m_bDeleted : 1;
 
        protected:
                // the clone can not insert anything
@@ -453,16 +445,16 @@
                        return 
::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
                }
 
+       // ::com::sun::star::sdbc::XRowSet
+               virtual void SAL_CALL execute(  ) 
throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+               virtual void SAL_CALL addRowSetListener( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >& 
listener ) throw(::com::sun::star::uno::RuntimeException);
+               virtual void SAL_CALL removeRowSetListener( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >& 
listener ) throw(::com::sun::star::uno::RuntimeException);
+
        // comphelper::OPropertyArrayUsageHelper
                virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) 
const;
 
        // cppu::OPropertySetHelper
                virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-
-               // is called when the rowset is going to delete this bookmark 
_rBookmark
-               void rowDelete(const ::com::sun::star::uno::Any& _rBookmark);
-               // is called when the rowset has deleted this bookmark 
_rBookmark
-               void rowDeleted(const ::com::sun::star::uno::Any& _rBookmark);
        };
 
 }




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

Reply via email to