Lines Matching refs:nIndex

174 void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )  in Insert()  argument
177 DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" ); in Insert()
187 if ( nCount == nIndex ) in Insert()
195 memcpy( pNewNodes, pNodes, nIndex*sizeof(PVOID) ); in Insert()
196 memcpy( pNewNodes + nIndex + 1, in Insert()
197 pNodes + nIndex, in Insert()
198 (nCount-nIndex)*sizeof(PVOID) ); in Insert()
207 if ( nIndex < nCount ) in Insert()
209 memmove( pNodes + nIndex + 1, in Insert()
210 pNodes + nIndex, in Insert()
211 (nCount-nIndex)*sizeof(PVOID) ); in Insert()
216 pNodes[nIndex] = p; in Insert()
230 CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ) in Split() argument
240 if ( ( nIndex == nCount ) || ( nIndex == 0 ) ) in Split()
260 if ( nIndex > nMiddle ) in Split()
269 if ( nIndex == nCount ) in Split()
277 nIndex = nIndex - nMiddle; // MSVC warns here if += is used in Split()
279 if ( nIndex ) in Split()
280 memcpy( pNewBlock->pNodes, pNodes+nMiddle, nIndex*sizeof(PVOID) ); in Split()
283 pNewBlock->pNodes[nIndex] = p; in Split()
286 memcpy( pNewBlock->pNodes+nIndex+1, in Split()
287 pNodes+nMiddle+nIndex, in Split()
288 (nCount-nMiddle-nIndex) * sizeof(PVOID) ); in Split()
313 if ( nIndex == 0 ) in Split()
322 memcpy( pNewBlock->pNodes, pNodes, nIndex*sizeof(PVOID) ); in Split()
325 pNewBlock->pNodes[nIndex] = p; in Split()
328 if ( nIndex != nMiddle ) in Split()
330 memcpy( pNewBlock->pNodes+nIndex+1, in Split()
331 pNodes+nIndex, in Split()
332 (nMiddle-nIndex) * sizeof(PVOID) ); in Split()
367 void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize ) in Remove() argument
372 void* pOld = pNodes[nIndex]; in Remove()
385 if ( nIndex == nCount ) in Remove()
393 memcpy( pNewNodes, pNodes, nIndex*sizeof(PVOID) ); in Remove()
394 memcpy( pNewNodes + nIndex, pNodes + nIndex+1, in Remove()
395 (nCount-nIndex)*sizeof(PVOID) ); in Remove()
405 if ( nIndex < nCount ) in Remove()
407 memmove( pNodes + nIndex, pNodes + nIndex + 1, in Remove()
408 (nCount-nIndex)*sizeof(PVOID) ); in Remove()
426 inline void* CBlock::Replace( void* p, sal_uInt16 nIndex ) in Replace() argument
431 void* pOld = pNodes[nIndex]; in Replace()
432 pNodes[nIndex] = p; in Replace()
447 inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex ) in GetObjectPtr() argument
451 return &(pNodes[nIndex]); in GetObjectPtr()
755 void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex ) in ImpInsert() argument
767 pFirstBlock->Insert( p, nIndex, nReSize ); in ImpInsert()
776 CBlock* pNewBlock = pBlock->Split( p, nIndex, nReSize ); in ImpInsert()
790 if ( nIndex <= nCurIndex ) in ImpInsert()
806 if ( nIndex <= nCurIndex ) in ImpInsert()
818 pBlock->Insert( p, nIndex, nReSize ); in ImpInsert()
821 if ( (pBlock == pCurBlock) && (nIndex <= nCurIndex) ) in ImpInsert()
855 void Container::Insert( void* p, sal_uIntPtr nIndex ) in Insert() argument
857 if ( nCount <= nIndex ) in Insert()
868 while ( pTemp->Count() < nIndex ) in Insert()
870 nIndex -= pTemp->Count(); in Insert()
874 ImpInsert( p, pTemp, (sal_uInt16)nIndex ); in Insert()
890 sal_uIntPtr nIndex = GetPos( pOld ); in Insert() local
891 if ( nIndex != CONTAINER_ENTRY_NOTFOUND ) in Insert()
892 Insert( pNew, nIndex ); in Insert()
905 void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex ) in ImpRemove() argument
915 pOld = pBlock->GetObject( nIndex ); in ImpRemove()
950 pOld = pBlock->GetObject( nIndex ); in ImpRemove()
956 pOld = pBlock->Remove( nIndex, nReSize ); in ImpRemove()
960 ((nIndex < nCurIndex) || ((nCurIndex == pBlock->Count()) && nCurIndex)) ) in ImpRemove()
1001 void* Container::Remove( sal_uIntPtr nIndex ) in Remove() argument
1004 if ( nCount <= nIndex ) in Remove()
1010 while ( pTemp->Count() <= nIndex ) in Remove()
1012 nIndex -= pTemp->Count(); in Remove()
1016 return ImpRemove( pTemp, (sal_uInt16)nIndex ); in Remove()
1050 void* Container::Replace( void* p, sal_uIntPtr nIndex ) in Replace() argument
1055 if ( nCount <= nIndex ) in Replace()
1061 while ( pTemp->Count() <= nIndex ) in Replace()
1063 nIndex -= pTemp->Count(); in Replace()
1067 return pTemp->Replace( p, (sal_uInt16)nIndex ); in Replace()
1309 void** Container::GetObjectPtr( sal_uIntPtr nIndex ) in GetObjectPtr() argument
1314 if ( nCount <= nIndex ) in GetObjectPtr()
1320 while ( pTemp->Count() <= nIndex ) in GetObjectPtr()
1322 nIndex -= pTemp->Count(); in GetObjectPtr()
1327 return pTemp->GetObjectPtr( (sal_uInt16)nIndex ); in GetObjectPtr()
1341 void* Container::GetObject( sal_uIntPtr nIndex ) const in GetObject()
1346 if ( nCount <= nIndex ) in GetObject()
1352 while ( pTemp->Count() <= nIndex ) in GetObject()
1354 nIndex -= pTemp->Count(); in GetObject()
1359 return pTemp->GetObject( (sal_uInt16)nIndex ); in GetObject()
1510 void* Container::Seek( sal_uIntPtr nIndex ) in Seek() argument
1515 if ( nCount <= nIndex ) in Seek()
1521 while ( pTemp->Count() <= nIndex ) in Seek()
1523 nIndex -= pTemp->Count(); in Seek()
1529 nCurIndex = (sal_uInt16)nIndex; in Seek()