diff options
Diffstat (limited to 'editeng/source/misc/txtrange.cxx')
-rw-r--r-- | editeng/source/misc/txtrange.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 61e4a5253ced..a69fd59439c2 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -196,7 +196,7 @@ public: SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, const Range& rRange ) - : aBoolArr( 4, 4 ), pLongArr( pLong ), pTextRanger( pRanger ), + : pLongArr( pLong ), pTextRanger( pRanger ), nTop( rRange.Min() ), nBottom( rRange.Max() ), bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ), bConcat( FALSE ), bRotate( pRanger->IsVertical() ) @@ -291,7 +291,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) bToggle = FALSE; USHORT nIdx = 0; USHORT nCount = pLongArr->Count(); - DBG_ASSERT( nCount == 2 * aBoolArr.Count(), "NoteRange: Incompatible Sizes" ); + DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin ) ++nIdx; BOOL bOdd = nIdx % 2 ? TRUE : FALSE; @@ -300,7 +300,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) { // Dann wird ein neues eingefuegt ... pLongArr->Insert( nMin, nIdx ); pLongArr->Insert( nMax, nIdx + 1 ); - aBoolArr.Insert( bToggle, nIdx / 2 ); + aBoolArr.insert( aBoolArr.begin() + nIdx / 2, bToggle ); } else { // ein vorhandes Intervall erweitern ... @@ -332,9 +332,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) USHORT nStop = nMaxIdx + nDiff; for( USHORT i = nMaxIdx; i < nStop; ++i ) bToggle ^= aBoolArr[ i ]; - aBoolArr.Remove( nMaxIdx, nDiff ); + aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) ); } - DBG_ASSERT( nMaxIdx < aBoolArr.Count(), "NoteRange: Too much deleted" ); + DBG_ASSERT( nMaxIdx < aBoolArr.size(), "NoteRange: Too much deleted" ); aBoolArr[ nMaxIdx ] ^= bToggle; } } @@ -479,13 +479,13 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) void SvxBoundArgs::Add() { USHORT nLongIdx = 1; - USHORT nCount = aBoolArr.Count(); + size_t nCount = aBoolArr.size(); if( nCount && ( !bInner || !pTextRanger->IsSimple() ) ) { - BOOL bDelete = aBoolArr[ 0 ]; + BOOL bDelete = aBoolArr.front(); if( bInner ) bDelete = !bDelete; - for( USHORT nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx ) + for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx ) { if( bDelete ) { @@ -497,7 +497,7 @@ void SvxBoundArgs::Add() next /= 2; nBoolIdx = nBoolIdx - next; nCount = nCount - next; - aBoolArr.Remove( nBoolIdx, next ); + aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) ); if( nBoolIdx ) aBoolArr[ nBoolIdx - 1 ] = FALSE; #if OSL_DEBUG_LEVEL > 1 @@ -508,7 +508,7 @@ void SvxBoundArgs::Add() bDelete = nBoolIdx < nCount && aBoolArr[ nBoolIdx ]; nLongIdx += 2; DBG_ASSERT( nLongIdx == 2*nBoolIdx+1, "BoundArgs: Array-Idx Confusion" ); - DBG_ASSERT( aBoolArr.Count()*2 == pLongArr->Count(), + DBG_ASSERT( aBoolArr.size()*2 == pLongArr->Count(), "BoundArgs: Array-Count: Confusion" ); } } @@ -538,7 +538,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) DBG_ASSERT( pPoly, "Nothing to do?" ); SvLongs *pOld = pLongArr; pLongArr = new SvLongs( 2, 8 ); - aBoolArr.Remove( 0, aBoolArr.Count() ); + aBoolArr.clear(); bInner = FALSE; Calc( *pPoly ); USHORT nCount = pLongArr->Count(); |