summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/regband.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/regband.cxx')
-rw-r--r--vcl/source/gdi/regband.cxx86
1 files changed, 43 insertions, 43 deletions
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index e22b37c0970c..21c82cd51f3a 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -64,7 +64,7 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
mpPrevBand = NULL;
mpFirstSep = NULL;
mpFirstBandPoint = NULL;
- mbTouched = FALSE;
+ mbTouched = sal_False;
}
// -----------------------------------------------------------------------
@@ -213,8 +213,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 )
{
@@ -224,7 +224,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
@@ -243,8 +243,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
{
@@ -268,7 +268,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
}
}
else
- return FALSE;
+ return sal_False;
}
// use next element
@@ -299,7 +299,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
else
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// use next element
@@ -318,7 +318,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -352,7 +352,7 @@ void ImplRegionBand::ScaleX( double fHorzScale )
//
// combine overlaping sparations
-BOOL ImplRegionBand::OptimizeBand()
+sal_Bool ImplRegionBand::OptimizeBand()
{
ImplRegionBandSep* pPrevSep = 0;
ImplRegionBandSep* pSep = mpFirstSep;
@@ -390,7 +390,7 @@ BOOL ImplRegionBand::OptimizeBand()
pSep = pSep->mpNextSep;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -405,7 +405,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;
}
@@ -426,7 +426,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 )
@@ -453,7 +453,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;
@@ -474,7 +474,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 )
@@ -487,7 +487,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) &&
@@ -521,7 +521,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 )
@@ -533,14 +533,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
@@ -549,7 +549,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) )
{
pSep->mnXLeft = nXRight+1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -559,7 +559,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXLeft <= pSep->mnXRight) && (nXRight > pSep->mnXRight) )
{
pSep->mnXRight = nXLeft-1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -572,7 +572,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;
@@ -652,7 +652,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;
}
@@ -681,7 +681,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;
@@ -697,7 +697,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;
}
@@ -730,7 +730,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
{
@@ -810,7 +810,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;
@@ -832,7 +832,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;
@@ -843,50 +843,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;
}
// -----------------------------------------------------------------------
@@ -913,7 +913,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;
@@ -923,12 +923,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;
@@ -939,9 +939,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;
}
// -----------------------------------------------------------------------