User: obo Date: 06/01/16 07:27:45 Modified: /dba/dbaccess/source/core/api/ RowSetCache.cxx
Log: INTEGRATION: CWS dba202b (1.78.46); FILE MERGED 2006/01/12 13:06:31 fs 1.78.46.3: reverted incomplete fix for #i55731#, will be done in another CWS 2005/12/27 11:22:58 oj 1.78.46.2: RESYNC: (1.78-1.79); FILE MERGED 2005/12/12 07:50:21 oj 1.78.46.1: #i55731# correct postion when deleting a row File Changes: Directory: /dba/dbaccess/source/core/api/ ========================================= File [changed]: RowSetCache.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSetCache.cxx?r1=1.80&r2=1.81 Delta lines: +10 -13 --------------------- --- RowSetCache.cxx 3 Jan 2006 16:13:57 -0000 1.80 +++ RowSetCache.cxx 16 Jan 2006 15:27:42 -0000 1.81 @@ -303,18 +303,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 @@ -1542,20 +1542,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]
