diff options
Diffstat (limited to 'vcl/source/gdi/regband.cxx')
-rw-r--r-- | vcl/source/gdi/regband.cxx | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx index 14f45b4beafd..08c94bc2ebc6 100644 --- a/vcl/source/gdi/regband.cxx +++ b/vcl/source/gdi/regband.cxx @@ -63,7 +63,7 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom ) mpPrevBand = NULL; mpFirstSep = NULL; mpFirstBandPoint = NULL; - mbTouched = FALSE; + mbTouched = sal_False; } // ----------------------------------------------------------------------- @@ -212,8 +212,8 @@ void ImplRegionBand::ProcessPoints() // generate separations from lines and process union with existing // separations -BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, - BOOL bEndPoint, LineType eLineType ) +sal_Bool ImplRegionBand::InsertPoint( long nX, long nLineId, + sal_Bool bEndPoint, LineType eLineType ) { if ( !mpFirstBandPoint ) { @@ -223,7 +223,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, mpFirstBandPoint->mbEndPoint = bEndPoint; mpFirstBandPoint->meLineType = eLineType; mpFirstBandPoint->mpNextBandPoint = NULL; - return TRUE; + return sal_True; } // look if line allready touched the band @@ -242,8 +242,8 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, { // if we've only got one point => replace first point pRegionBandPoint->mnX = nX; - pRegionBandPoint->mbEndPoint = TRUE; - return TRUE; + pRegionBandPoint->mbEndPoint = sal_True; + return sal_True; } else { @@ -267,7 +267,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, } } else - return FALSE; + return sal_False; } // use next element @@ -298,7 +298,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, else pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint; - return TRUE; + return sal_True; } // use next element @@ -317,7 +317,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId, // connections to the new point pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -351,7 +351,7 @@ void ImplRegionBand::ScaleX( double fHorzScale ) // // combine overlaping sparations -BOOL ImplRegionBand::OptimizeBand() +sal_Bool ImplRegionBand::OptimizeBand() { ImplRegionBandSep* pPrevSep = 0; ImplRegionBandSep* pSep = mpFirstSep; @@ -389,7 +389,7 @@ BOOL ImplRegionBand::OptimizeBand() pSep = pSep->mpNextSep; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -404,7 +404,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight ) mpFirstSep = new ImplRegionBandSep; mpFirstSep->mnXLeft = nXLeft; mpFirstSep->mnXRight = nXRight; - mpFirstSep->mbRemoved = FALSE; + mpFirstSep->mbRemoved = sal_False; mpFirstSep->mpNextSep = NULL; return; } @@ -425,7 +425,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight ) pNewSep = new ImplRegionBandSep; pNewSep->mnXLeft = nXLeft; pNewSep->mnXRight = nXRight; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; pNewSep->mpNextSep = pSep; if ( pSep == mpFirstSep ) @@ -452,7 +452,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight ) pNewSep = new ImplRegionBandSep; pNewSep->mnXLeft = nXLeft; pNewSep->mnXRight = nXRight; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; pSep->mpNextSep = pNewSep; pNewSep->mpNextSep = NULL; @@ -473,7 +473,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight ) DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Intersect(): nxLeft > nXRight" ); // band has been touched - mbTouched = TRUE; + mbTouched = sal_True; // band empty? -> nothing to do if ( !mpFirstSep ) @@ -486,7 +486,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight ) // new separation completly outside? -> remove separation if ( (nXRight < pSep->mnXLeft) || (nXLeft > pSep->mnXRight) ) // will be removed from the optimizer - pSep->mbRemoved = TRUE; + pSep->mbRemoved = sal_True; // new separation overlaping from left? -> reduce right boundary if ( (nXLeft <= pSep->mnXLeft) && @@ -520,7 +520,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight ) DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Exclude(): nxLeft > nXRight" ); // band has been touched - mbTouched = TRUE; + mbTouched = sal_True; // band empty? -> nothing to do if ( !mpFirstSep ) @@ -532,14 +532,14 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight ) ImplRegionBandSep* pSep = mpFirstSep; while ( pSep ) { - BOOL bSepProcessed = FALSE; + sal_Bool bSepProcessed = sal_False; // new separation completely overlapping? -> remove separation if ( (nXLeft <= pSep->mnXLeft) && (nXRight >= pSep->mnXRight) ) { // will be removed from the optimizer - pSep->mbRemoved = TRUE; - bSepProcessed = TRUE; + pSep->mbRemoved = sal_True; + bSepProcessed = sal_True; } // new separation overlaping from left? -> reduce boundary @@ -548,7 +548,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight ) if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) ) { pSep->mnXLeft = nXRight+1; - bSepProcessed = TRUE; + bSepProcessed = sal_True; } } @@ -558,7 +558,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight ) if ( (nXLeft <= pSep->mnXRight) && (nXRight > pSep->mnXRight) ) { pSep->mnXRight = nXLeft-1; - bSepProcessed = TRUE; + bSepProcessed = sal_True; } } @@ -571,7 +571,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight ) pNewSep = new ImplRegionBandSep; pNewSep->mnXLeft = pSep->mnXLeft; pNewSep->mnXRight = nXLeft-1; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; pSep->mnXLeft = nXRight+1; @@ -651,7 +651,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) mpFirstSep = new ImplRegionBandSep; mpFirstSep->mnXLeft = nXLeft; mpFirstSep->mnXRight = nXRight; - mpFirstSep->mbRemoved = FALSE; + mpFirstSep->mbRemoved = sal_False; mpFirstSep->mpNextSep = NULL; return; } @@ -680,7 +680,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) pNewSep->mnXLeft = nXLeft; pNewSep->mnXRight = nXRight; pNewSep->mpNextSep = pSep; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; // connections from the new separation pNewSep->mpNextSep = pSep; @@ -696,7 +696,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) else if( nXLeft == nOldLeft && nXRight == nOldRight ) { // #3 - pSep->mbRemoved = TRUE; + pSep->mbRemoved = sal_True; pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop break; } @@ -729,7 +729,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) // cannot break here, simply mark segment as removed, // and go on with adapted nXLeft/nXRight - pSep->mbRemoved = TRUE; + pSep->mbRemoved = sal_True; } else { @@ -809,7 +809,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) pNewSep->mnXLeft = nXLeft; pNewSep->mnXRight = nXRight; pNewSep->mpNextSep = pSep->mpNextSep; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; // connections from the new separation pSep->mpNextSep = pNewSep; @@ -831,7 +831,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) pNewSep->mnXLeft = nXLeft; pNewSep->mnXRight = nXRight; pNewSep->mpNextSep = NULL; - pNewSep->mbRemoved = FALSE; + pNewSep->mbRemoved = sal_False; // connections from the new separation pPrevSep->mpNextSep = pNewSep; @@ -842,50 +842,50 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight ) // ----------------------------------------------------------------------- -BOOL ImplRegionBand::IsInside( long nX ) +sal_Bool ImplRegionBand::IsInside( long nX ) { ImplRegionBandSep* pSep = mpFirstSep; while ( pSep ) { if ( (pSep->mnXLeft <= nX) && (pSep->mnXRight >= nX) ) - return TRUE; + return sal_True; pSep = pSep->mpNextSep; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ImplRegionBand::IsOver( long nLeft, long nRight ) +sal_Bool ImplRegionBand::IsOver( long nLeft, long nRight ) { ImplRegionBandSep* pSep = mpFirstSep; while ( pSep ) { if ( (pSep->mnXLeft < nRight) && (pSep->mnXRight > nLeft) ) - return TRUE; + return sal_True; pSep = pSep->mpNextSep; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -BOOL ImplRegionBand::IsInside( long nLeft, long nRight ) +sal_Bool ImplRegionBand::IsInside( long nLeft, long nRight ) { ImplRegionBandSep* pSep = mpFirstSep; while ( pSep ) { if ( (pSep->mnXLeft >= nLeft) && (nRight <= pSep->mnXRight) ) - return TRUE; + return sal_True; pSep = pSep->mpNextSep; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -912,7 +912,7 @@ long ImplRegionBand::GetXRightBoundary() const // ----------------------------------------------------------------------- -BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const +sal_Bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const { ImplRegionBandSep* pOwnRectBandSep = mpFirstSep; ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep; @@ -922,12 +922,12 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const long nOwnXLeft = pOwnRectBandSep->mnXLeft; long nSecondXLeft = pSecondRectBandSep->mnXLeft; if ( nOwnXLeft != nSecondXLeft ) - return FALSE; + return sal_False; long nOwnXRight = pOwnRectBandSep->mnXRight; long nSecondXRight = pSecondRectBandSep->mnXRight; if ( nOwnXRight != nSecondXRight ) - return FALSE; + return sal_False; // get next separation from current band pOwnRectBandSep = pOwnRectBandSep->mpNextSep; @@ -938,9 +938,9 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const // differnt number of separations? if ( pOwnRectBandSep || pSecondRectBandSep ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- |