29 #if OSL_DEBUG_LEVEL > 2
30 #define CHECKIDX( p, n, i, c ) CheckIdx( p, n, i, c );
31 void CheckIdx(
BlockInfo** ppInf, sal_uInt16 nBlock,
sal_uLong nSize, sal_uInt16 nCur )
33 assert( !nSize || nCur < nBlock );
36 for( sal_uInt16 nCnt = 0; nCnt < nBlock; ++nCnt, ++ppInf )
38 nIdx += (*ppInf)->nElem;
40 assert( !nCnt || (*(ppInf-1))->nEnd + 1 == (*ppInf)->nStart );
45 #define CHECKIDX( p, n, i, c )
78 Remove( ( to < from ) ? ( from + 1 ) : from );
109 else if( pos < p->nStart &&
m_nCur > 0 )
117 sal_uInt16 lower = 0, upper =
m_nBlock - 1;
121 sal_uInt16
n = lower + ( upper - lower ) / 2;
122 cur = ( n == cur ) ? n+1 : n;
213 else if( pos == m_nSize )
239 auto pFrom = q->
mvData.begin() + nCount;
240 auto pTo = pFrom + 1;
244 ++((*pTo)->m_nOffset);
282 if( pos != p->nElem )
284 int nCount = p->nElem - sal_uInt16(pos);
285 auto pFrom = p->mvData.begin() + p->nElem;
286 auto pTo = pFrom + 1;
290 ++( *pTo )->m_nOffset;
310 sal_uInt16 nBlkdel = 0;
312 sal_uInt16 nBlk1 = cur;
320 sal_uInt16 nel = p->
nElem - sal_uInt16(pos);
322 nel = sal_uInt16(nElem);
326 auto pTo = p->
mvData.begin() + pos;
327 auto pFrom = pTo + nel;
332 (*pTo)->m_nOffset = (*pTo)->m_nOffset - nel;
355 for( sal_uInt16
i = nBlk1del;
i < ( nBlk1del + nBlkdel );
i++ )
358 if( ( nBlk1del + nBlkdel ) <
m_nBlock )
360 memmove(
m_ppInf.get() + nBlk1del,
m_ppInf.get() + nBlk1del + nBlkdel,
379 if( nBlk1 != (
m_nBlock - 1 ) && m_nSize )
411 sal_uInt16 nLast = 0;
412 sal_uInt16 nBlkdel = 0;
418 for( sal_uInt16 cur = 0; cur <
m_nBlock; ++cur )
426 if( nLast && ( n > nLast ) && ( nLast < nMax ) )
439 auto pFrom = p->
mvData.begin();
444 (*pElem)->m_pBlock = pLast;
445 (*pElem)->m_nOffset = nOff++;
463 pElem = p->
mvData.begin();
469 (*pElem)->m_nOffset = (*pElem)->m_nOffset - n;
497 if(
m_nCur >= nFirstChgPos )
sal_uInt16 m_nCur
last used block
#define CHECKIDX(p, n, i, c)
BigPtrArray * pBigArr
in this array the block is located
sal_uInt16 nElem
number of elements
sal_uInt16 m_nBlock
number of blocks
sal_uLong m_nSize
number of elements
sal_uInt16 Index2Block(sal_uLong) const
block search
void Move(sal_uLong from, sal_uLong to)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void Replace(sal_uLong pos, BigPtrEntry *p)
void BlockDel(sal_uInt16)
some blocks were deleted
std::unique_ptr< BlockInfo *[]> m_ppInf
block info
const sal_uInt16 nBlockGrowSize
Resize block management by this constant.
void Insert(BigPtrEntry *p, sal_uLong pos)
sal_uInt16 m_nMaxBlock
current max. number of blocks
sal_uInt16 Compress()
Compress the array.
std::array< BigPtrEntry *, MAXENTRY > mvData
data block
BlockInfo * InsBlock(sal_uInt16)
insert block
void UpdIndex(sal_uInt16)
recalculate indices
BigPtrEntry * operator[](sal_uLong) const
sal_uLong nEnd
start- and end index
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
void Remove(sal_uLong pos, sal_uLong n=1)