Tag: cws_src680_dba202b
User: oj      
Date: 05/12/11 23:50:24

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

Log:
 #i55731# correct postion when deleting a row

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.79&r2=1.79.26.1
Delta lines:  +5 -3
-------------------
--- RowSetBase.cxx      13 Oct 2005 17:09:45 -0000      1.79
+++ RowSetBase.cxx      12 Dec 2005 07:50:21 -0000      1.79.26.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetBase.cxx,v $
  *
- *  $Revision: 1.79 $
+ *  $Revision: 1.79.26.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/10/13 17:09:45 $
+ *  last change: $Author: oj $ $Date: 2005/12/12 07:50:21 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -267,6 +267,8 @@
        }
        else
        {       // currentrow is null when the clone move the window
+               if ( m_pCache->m_bDeleted )
+                       return m_aEmptyValue;
                if ( m_aCurrentRow.isNull() )
                {
                        positionCache();

File [changed]: RowSetCache.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.78&r2=1.78.46.1
Delta lines:  +14 -17
---------------------
--- RowSetCache.cxx     23 Sep 2005 12:03:25 -0000      1.78
+++ RowSetCache.cxx     12 Dec 2005 07:50:21 -0000      1.78.46.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSetCache.cxx,v $
  *
- *  $Revision: 1.78 $
+ *  $Revision: 1.78.46.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 12:03:25 $
+ *  last change: $Author: oj $ $Date: 2005/12/12 07:50:21 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -304,18 +304,18 @@
                        sal_Bool bNoInsert = sal_False;
 
                        Sequence< ::rtl::OUString> 
aNames(xColumns->getElementNames());
-                       const ::rtl::OUString* pBegin   = 
aNames.getConstArray();
-                       const ::rtl::OUString* pEnd             = pBegin + 
aNames.getLength();
-                       for(;pBegin != pEnd;++pBegin)
+                       const ::rtl::OUString* pIter    = 
aNames.getConstArray();
+                       const ::rtl::OUString* pEnd             = pIter + 
aNames.getLength();
+                       for(;pIter != pEnd;++pIter)
                        {
                                Reference<XPropertySet> xColumn;
-                               
::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
+                               
::cppu::extractInterface(xColumn,xColumns->getByName(*pIter));
                                OSL_ENSURE(xColumn.is(),"Column in table is 
null!");
                                if(xColumn.is())
                                {
                                        sal_Int32 nNullable = 0;
                                        
xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable;
-                                       if(nNullable == ColumnValue::NO_NULLS 
&& aColumnNames.find(*pBegin) == aColumnNames.end())
+                                       if(nNullable == ColumnValue::NO_NULLS 
&& aColumnNames.find(*pIter) == aColumnNames.end())
                                        { // we found a column where null is 
not allowed so we can't insert new values
                                                bNoInsert = sal_True;
                                                break; // one column is enough
@@ -1476,7 +1476,7 @@
                }
                m_aMatrixIter = m_pMatrix->end();
 
-               --m_nPosition;
+               //--m_nPosition;
        }
 }
 // -------------------------------------------------------------------------
@@ -1543,20 +1543,17 @@
        Sequence< sal_Int32 > aRet(rows.getLength());
        sal_Int32 *pRet = aRet.getArray();
 
-       const Any *pBegin       = rows.getConstArray();
-       const Any *pEnd         = pBegin + rows.getLength();
+       const Any *pIter        = rows.getConstArray();
+       const Any *pEnd         = pIter + rows.getLength();
 
-       sal_Int32 nOldPosition;
-       for(;pBegin != pEnd;++pBegin,++pRet)
+       for(;pIter != pEnd;++pIter,++pRet)
        {
                // first we have to position our own and then we have to 
position our CacheSet again,
                // it could be repositioned in the moveToBookmark call
-               if ( moveToBookmark(*pBegin) && 
m_pCacheSet->moveToBookmark(*pBegin) )
+               if ( moveToBookmark(*pIter) && 
m_pCacheSet->moveToBookmark(*pIter) )
                {
-                       nOldPosition = m_nPosition;
                        deleteRow();
-                       *pRet = (nOldPosition != m_nPosition) ? 1 : 0;
-                       nOldPosition = m_nPosition;
+                       *pRet = (m_bDeleted) ? 1 : 0;
                }
        }
        return aRet;




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

Reply via email to