incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1401294 [2/4] - in /incubator/ooo/trunk/main: canvas/source/vcl/ cppcanvas/source/mtfrenderer/ drawinglayer/source/primitive2d/ filter/source/graphicfilter/eps/ sd/source/ui/slidesorter/view/ svx/source/sdr/overlay/ svx/source/sdr/properti...
Date Tue, 23 Oct 2012 13:46:30 GMT
Modified: incubator/ooo/trunk/main/vcl/source/gdi/outmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/outmap.cxx?rev=1401294&r1=1401293&r2=1401294&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/outmap.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/outmap.cxx Tue Oct 23 13:46:28 2012
@@ -40,7 +40,6 @@
 #include <vcl/outdev.hxx>
 
 #include <svdata.hxx>
-#include <region.h>
 #include <window.h>
 #include <outdev.h>
 #include <salgdi.hxx>
@@ -798,8 +797,6 @@ Rectangle OutputDevice::ImplDevicePixelT
 
 Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const
 {
-	DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
-
 	if ( !mnOutOffX && !mnOutOffY )
 		return rRegion;
 
@@ -1274,46 +1271,51 @@ basegfx::B2DPolyPolygon OutputDevice::Lo
 Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
 {
 	DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-	DBG_CHKOBJ( &rLogicRegion, Region, ImplDbgTestRegion );
-
-	RegionType eType = rLogicRegion.GetType();
 
-	if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
+	if(!mbMap || rLogicRegion.IsNull() || rLogicRegion.IsEmpty())
+    {
 		return rLogicRegion;
+    }
 
-	Region			aRegion;
-	const ImplRegion& rImplRegion = *rLogicRegion.ImplGetImplRegion();
-	const PolyPolygon* pPolyPoly = rImplRegion.mpPolyPoly;
-	const basegfx::B2DPolyPolygon* pB2DPolyPoly = rImplRegion.mpB2DPolyPoly;
-
-	if ( pPolyPoly )
-		aRegion = Region( LogicToPixel( *pPolyPoly ) );
-	else if( pB2DPolyPoly )
-	{
-		basegfx::B2DPolyPolygon aTransformedPoly = *pB2DPolyPoly;
-		const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation();
-		aTransformedPoly.transform( rTransformationMatrix );
-		aRegion = Region( aTransformedPoly );
-	}
-	else
-	{
-		long				nX;
-		long				nY;
-		long				nWidth;
-		long				nHeight;
-		ImplRegionInfo		aInfo;
-		sal_Bool				bRegionRect;
-
-		aRegion.ImplBeginAddRect();
-		bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
-		while ( bRegionRect )
-		{
-			Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
-			aRegion.ImplAddRect( LogicToPixel( aRect ) );
-			bRegionRect = rLogicRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
-		}
-		aRegion.ImplEndAddRect();
-	}
+	Region aRegion;
+
+    if(rLogicRegion.getB2DPolyPolygon())
+    {
+        aRegion = Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon()));
+    }
+    else if(rLogicRegion.getPolyPolygon())
+    {
+        aRegion = Region(LogicToPixel(*rLogicRegion.getPolyPolygon()));
+    }
+    else if(rLogicRegion.getRegionBand())
+    {
+        RectangleVector aRectangles;
+        rLogicRegion.GetRegionRectangles(aRectangles);
+        const RectangleVector& rRectangles(aRectangles); // needed to make the '!=' work
+
+        // make reverse run to fill new region bottom-up, this will speed it up due to the
used data structuring
+        for(RectangleVector::const_reverse_iterator aRectIter(rRectangles.rbegin()); aRectIter
!= rRectangles.rend(); aRectIter++)
+        {
+            aRegion.Union(LogicToPixel(*aRectIter));
+        }
+
+        //long nX(0);
+		//long nY(0);
+		//long nWidth(0);
+		//long nHeight(0);
+		//ImplRegionInfo aInfo;
+		//aRegion.ImplBeginAddRect();
+        //bool bRegionRect(rLogicRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight));
+        //
+        //while(bRegionRect)
+		//{
+		//	const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
+		//	aRegion.ImplAddRect(LogicToPixel(aRect));
+		//	bRegionRect = rLogicRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight);
+		//}
+        //
+        //aRegion.ImplEndAddRect();
+    }
 
 	return aRegion;
 }
@@ -1477,41 +1479,54 @@ basegfx::B2DPolygon OutputDevice::LogicT
 
 // -----------------------------------------------------------------------
 
-Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
-								   const MapMode& rMapMode ) const
+Region OutputDevice::LogicToPixel( const Region& rLogicRegion, const MapMode& rMapMode
) const
 {
 	DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-	DBG_CHKOBJ( &rLogicRegion, Region, ImplDbgTestRegion );
 
-	RegionType eType = rLogicRegion.GetType();
-
-	if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
+	if(rMapMode.IsDefault() || rLogicRegion.IsNull() || rLogicRegion.IsEmpty())
+    {
 		return rLogicRegion;
+    }
 
-	Region			aRegion;
-	PolyPolygon*	pPolyPoly = rLogicRegion.ImplGetImplRegion()->mpPolyPoly;
+	Region aRegion;
 
-	if( pPolyPoly )
-		aRegion = Region( LogicToPixel( *pPolyPoly, rMapMode ) );
-	else
-	{
-		long				nX;
-		long				nY;
-		long				nWidth;
-		long				nHeight;
-		ImplRegionInfo		aInfo;
-		sal_Bool				bRegionRect;
-
-		aRegion.ImplBeginAddRect();
-		bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
-		while ( bRegionRect )
-		{
-			Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
-			aRegion.ImplAddRect( LogicToPixel( aRect, rMapMode ) );
-			bRegionRect = rLogicRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
-		}
-		aRegion.ImplEndAddRect();
-	}
+    if(rLogicRegion.getB2DPolyPolygon())
+    {
+        aRegion = Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon(), rMapMode));
+    }
+    else if(rLogicRegion.getPolyPolygon())
+    {
+        aRegion = Region(LogicToPixel(*rLogicRegion.getPolyPolygon(), rMapMode));
+    }
+    else if(rLogicRegion.getRegionBand())
+    {
+        RectangleVector aRectangles;
+        rLogicRegion.GetRegionRectangles(aRectangles);
+        const RectangleVector& rRectangles(aRectangles); // needed to make the '!=' work
+
+        // make reverse run to fill new region bottom-up, this will speed it up due to the
used data structuring
+        for(RectangleVector::const_reverse_iterator aRectIter(rRectangles.rbegin()); aRectIter
!= rRectangles.rend(); aRectIter++)
+        {
+            aRegion.Union(LogicToPixel(*aRectIter, rMapMode));
+        }
+
+		//long nX(0);
+		//long nY(0);
+		//long nWidth(0);
+		//long nHeight(0);
+		//ImplRegionInfo aInfo;
+		//aRegion.ImplBeginAddRect();
+		//bool bRegionRect(rLogicRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight));
+        //
+		//while(bRegionRect)
+		//{
+		//	const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
+		//	aRegion.ImplAddRect(LogicToPixel(aRect, rMapMode));
+		//	bRegionRect = rLogicRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight);
+		//}
+        //
+        //aRegion.ImplEndAddRect();
+    }
 
 	return aRegion;
 }
@@ -1651,44 +1666,51 @@ basegfx::B2DPolyPolygon OutputDevice::Pi
 Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
 {
 	DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-	DBG_CHKOBJ( &rDeviceRegion, Region, ImplDbgTestRegion );
 
-	RegionType eType = rDeviceRegion.GetType();
-
-	if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
+	if(!mbMap || rDeviceRegion.IsNull() || rDeviceRegion.IsEmpty())
+    {
 		return rDeviceRegion;
+    }
 
-	Region			aRegion;
-	basegfx::B2DPolyPolygon* pB2DPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpB2DPolyPoly;
-	PolyPolygon* pPolyPoly = pB2DPolyPoly ? 0 : rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+	Region aRegion;
 
-    if ( pB2DPolyPoly ) // conversion with B2DPolyPolygon lost polygon-based ClipRegion
+    if(rDeviceRegion.getB2DPolyPolygon())
     {
-		aRegion = Region( PixelToLogic( *pB2DPolyPoly ) );
+        aRegion = Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon()));
     }
-	else if ( pPolyPoly )
+    else if(rDeviceRegion.getPolyPolygon())
     {
-		aRegion = Region( PixelToLogic( *pPolyPoly ) );
+	    aRegion = Region(PixelToLogic(*rDeviceRegion.getPolyPolygon()));
+    }
+    else if(rDeviceRegion.getRegionBand())
+    {
+        RectangleVector aRectangles;
+        rDeviceRegion.GetRegionRectangles(aRectangles);
+        const RectangleVector& rRectangles(aRectangles); // needed to make the '!=' work
+
+        // make reverse run to fill new region bottom-up, this will speed it up due to the
used data structuring
+        for(RectangleVector::const_reverse_iterator aRectIter(rRectangles.rbegin()); aRectIter
!= rRectangles.rend(); aRectIter++)
+        {
+            aRegion.Union(PixelToLogic(*aRectIter));
+        }
+
+		//long nX(0);
+		//long nY(0);
+		//long nWidth(0);
+		//long nHeight(0);
+		//ImplRegionInfo aInfo;
+		//aRegion.ImplBeginAddRect();
+		//bool bRegionRect(rDeviceRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight));
+        //
+		//while(bRegionRect)
+		//{
+		//	const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
+		//	aRegion.ImplAddRect(PixelToLogic(aRect));
+		//	bRegionRect = rDeviceRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight);
+		//}
+        //
+        //aRegion.ImplEndAddRect();
     }
-	else
-	{
-		long				nX;
-		long				nY;
-		long				nWidth;
-		long				nHeight;
-		ImplRegionInfo		aInfo;
-		sal_Bool				bRegionRect;
-
-		aRegion.ImplBeginAddRect();
-		bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
-		while ( bRegionRect )
-		{
-			Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
-			aRegion.ImplAddRect( PixelToLogic( aRect ) );
-			bRegionRect = rDeviceRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
-		}
-		aRegion.ImplEndAddRect();
-	}
 
 	return aRegion;
 }
@@ -1856,41 +1878,54 @@ basegfx::B2DPolyPolygon OutputDevice::Pi
 
 // -----------------------------------------------------------------------
 
-Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
-								   const MapMode& rMapMode ) const
+Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& rMapMode
) const
 {
 	DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-	DBG_CHKOBJ( &rDeviceRegion, Region, ImplDbgTestRegion );
-
-	RegionType eType = rDeviceRegion.GetType();
 
-	if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
+	if(rMapMode.IsDefault() || rDeviceRegion.IsNull() || rDeviceRegion.IsEmpty())
+    {
 		return rDeviceRegion;
+    }
+
+	Region aRegion;
+    
+    if(rDeviceRegion.getB2DPolyPolygon())
+    {
+        aRegion = Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon(), rMapMode));
+    }
+    else if(rDeviceRegion.getPolyPolygon())
+    {
+	    aRegion = Region(PixelToLogic(*rDeviceRegion.getPolyPolygon(), rMapMode));
+    }
+    else if(rDeviceRegion.getRegionBand())
+    {
+        RectangleVector aRectangles;
+        rDeviceRegion.GetRegionRectangles(aRectangles);
+        const RectangleVector& rRectangles(aRectangles); // needed to make the '!=' work
 
-	Region			aRegion;
-	PolyPolygon*	pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+        // make reverse run to fill new region bottom-up, this will speed it up due to the
used data structuring
+        for(RectangleVector::const_reverse_iterator aRectIter(rRectangles.rbegin()); aRectIter
!= rRectangles.rend(); aRectIter++)
+        {
+            aRegion.Union(PixelToLogic(*aRectIter, rMapMode));
+        }
 
-	if ( pPolyPoly )
-		aRegion = Region( PixelToLogic( *pPolyPoly, rMapMode ) );
-	else
-	{
-		long				nX;
-		long				nY;
-		long				nWidth;
-		long				nHeight;
-		ImplRegionInfo		aInfo;
-		sal_Bool				bRegionRect;
-
-		aRegion.ImplBeginAddRect();
-		bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
-		while ( bRegionRect )
-		{
-			Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
-			aRegion.ImplAddRect( PixelToLogic( aRect, rMapMode ) );
-			bRegionRect = rDeviceRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
-		}
-		aRegion.ImplEndAddRect();
-	}
+		//long nX(0);
+		//long nY(0);
+		//long nWidth(0);
+		//long nHeight(0);
+		//ImplRegionInfo aInfo;
+		//aRegion.ImplBeginAddRect();
+		//bool bRegionRect(rDeviceRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight));
+        //
+		//while(bRegionRect)
+		//{
+		//	const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
+		//	aRegion.ImplAddRect(PixelToLogic(aRect, rMapMode));
+		//	bRegionRect = rDeviceRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight);
+		//}
+        //
+        //aRegion.ImplEndAddRect();
+    }
 
 	return aRegion;
 }

Modified: incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl2.cxx?rev=1401294&r1=1401293&r2=1401294&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl2.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl2.cxx Tue Oct 23 13:46:28 2012
@@ -886,7 +886,7 @@ void PDFWriterImpl::playMetafile( const 
 					    else
 					    {
 					        Region aReg( pA->GetRegion() );
-					        m_rOuterFace.SetClipRegion( aReg.ConvertToB2DPolyPolygon() );
+					        m_rOuterFace.SetClipRegion( aReg.GetAsB2DPolyPolygon() );
 					    }
 					}
 					else
@@ -905,7 +905,7 @@ void PDFWriterImpl::playMetafile( const 
 				{
 				    const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*)
pAction;
 				    Region aReg( pA->GetRegion() );
-				    m_rOuterFace.IntersectClipRegion( aReg.ConvertToB2DPolyPolygon() );
+				    m_rOuterFace.IntersectClipRegion( aReg.GetAsB2DPolyPolygon() );
 				}
 				break;
 

Modified: incubator/ooo/trunk/main/vcl/source/gdi/regband.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/regband.cxx?rev=1401294&r1=1401293&r2=1401294&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/regband.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/regband.cxx Tue Oct 23 13:46:28 2012
@@ -59,7 +59,7 @@ ImplRegionBand::ImplRegionBand( long nTo
 	mpPrevBand			= NULL;
 	mpFirstSep			= NULL;
 	mpFirstBandPoint	= NULL;
-	mbTouched			= sal_False;
+	mbTouched			= false;
 }
 
 // -----------------------------------------------------------------------
@@ -208,8 +208,8 @@ void ImplRegionBand::ProcessPoints()
 // generate separations from lines and process union with existing
 // separations
 
-sal_Bool ImplRegionBand::InsertPoint( long nX, long nLineId,
-								  sal_Bool bEndPoint, LineType eLineType )
+bool ImplRegionBand::InsertPoint( long nX, long nLineId,
+								  bool bEndPoint, LineType eLineType )
 {
 	if ( !mpFirstBandPoint )
 	{
@@ -219,7 +219,7 @@ sal_Bool ImplRegionBand::InsertPoint( lo
 		mpFirstBandPoint->mbEndPoint	  = bEndPoint;
 		mpFirstBandPoint->meLineType	  = eLineType;
 		mpFirstBandPoint->mpNextBandPoint = NULL;
-		return sal_True;
+		return true;
 	}
 
 	// look if line allready touched the band
@@ -238,8 +238,8 @@ sal_Bool ImplRegionBand::InsertPoint( lo
 					{
 						// if we've only got one point => replace first point
 						pRegionBandPoint->mnX = nX;
-						pRegionBandPoint->mbEndPoint = sal_True;
-						return sal_True;
+						pRegionBandPoint->mbEndPoint = true;
+						return true;
 					}
 					else
 					{
@@ -263,7 +263,7 @@ sal_Bool ImplRegionBand::InsertPoint( lo
 				}
 			}
 			else
-				return sal_False;
+				return false;
 		}
 
 		// use next element
@@ -294,7 +294,7 @@ sal_Bool ImplRegionBand::InsertPoint( lo
 			else
 				pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
 
-			return sal_True;
+			return true;
 		}
 
 		// use next element
@@ -313,7 +313,7 @@ sal_Bool ImplRegionBand::InsertPoint( lo
 	// connections to the new point
 	pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
 
-	return sal_True;
+	return true;
 }
 
 // -----------------------------------------------------------------------
@@ -347,7 +347,7 @@ void ImplRegionBand::ScaleX( double fHor
 //
 // combine overlaping sparations
 
-sal_Bool ImplRegionBand::OptimizeBand()
+bool ImplRegionBand::OptimizeBand()
 {
 	ImplRegionBandSep* pPrevSep = 0;
 	ImplRegionBandSep* pSep = mpFirstSep;
@@ -385,7 +385,7 @@ sal_Bool ImplRegionBand::OptimizeBand()
 		pSep = pSep->mpNextSep;
 	}
 
-	return sal_True;
+	return true;
 }
 
 // -----------------------------------------------------------------------
@@ -400,7 +400,7 @@ void ImplRegionBand::Union( long nXLeft,
 		mpFirstSep				= new ImplRegionBandSep;
 		mpFirstSep->mnXLeft 	= nXLeft;
 		mpFirstSep->mnXRight	= nXRight;
-		mpFirstSep->mbRemoved	= sal_False;
+		mpFirstSep->mbRemoved	= false;
 		mpFirstSep->mpNextSep	= NULL;
 		return;
 	}
@@ -421,7 +421,7 @@ void ImplRegionBand::Union( long nXLeft,
 			pNewSep 			= new ImplRegionBandSep;
 			pNewSep->mnXLeft	= nXLeft;
 			pNewSep->mnXRight	= nXRight;
-			pNewSep->mbRemoved	= sal_False;
+			pNewSep->mbRemoved	= false;
 
 			pNewSep->mpNextSep = pSep;
 			if ( pSep == mpFirstSep )
@@ -448,7 +448,7 @@ void ImplRegionBand::Union( long nXLeft,
 			pNewSep 			= new ImplRegionBandSep;
 			pNewSep->mnXLeft	= nXLeft;
 			pNewSep->mnXRight	= nXRight;
-			pNewSep->mbRemoved	= sal_False;
+			pNewSep->mbRemoved	= false;
 
 			pSep->mpNextSep 	= pNewSep;
 			pNewSep->mpNextSep	= NULL;
@@ -469,7 +469,7 @@ void ImplRegionBand::Intersect( long nXL
 	DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Intersect(): nxLeft > nXRight" );
 
 	// band has been touched
-	mbTouched = sal_True;
+	mbTouched = true;
 
 	// band empty? -> nothing to do
 	if ( !mpFirstSep )
@@ -482,7 +482,7 @@ void ImplRegionBand::Intersect( long nXL
 		// new separation completly outside? -> remove separation
 		if ( (nXRight < pSep->mnXLeft) || (nXLeft > pSep->mnXRight) )
 			// will be removed from the optimizer
-			pSep->mbRemoved = sal_True;
+			pSep->mbRemoved = true;
 
 		// new separation overlaping from left? -> reduce right boundary
 		if ( (nXLeft <= pSep->mnXLeft) &&
@@ -516,7 +516,7 @@ void ImplRegionBand::Exclude( long nXLef
 	DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Exclude(): nxLeft > nXRight" );
 
 	// band has been touched
-	mbTouched = sal_True;
+	mbTouched = true;
 
 	// band empty? -> nothing to do
 	if ( !mpFirstSep )
@@ -528,14 +528,14 @@ void ImplRegionBand::Exclude( long nXLef
 	ImplRegionBandSep* pSep = mpFirstSep;
 	while ( pSep  )
 	{
-		sal_Bool bSepProcessed = sal_False;
+		bool bSepProcessed = false;
 
 		// new separation completely overlapping? -> remove separation
 		if ( (nXLeft <= pSep->mnXLeft) && (nXRight >= pSep->mnXRight) )
 		{
 			// will be removed from the optimizer
-			pSep->mbRemoved = sal_True;
-			bSepProcessed = sal_True;
+			pSep->mbRemoved = true;
+			bSepProcessed = true;
 		}
 
 		// new separation overlaping from left? -> reduce boundary
@@ -544,7 +544,7 @@ void ImplRegionBand::Exclude( long nXLef
 			if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) )
 			{
 				pSep->mnXLeft = nXRight+1;
-				bSepProcessed = sal_True;
+				bSepProcessed = true;
 			}
 		}
 
@@ -554,7 +554,7 @@ void ImplRegionBand::Exclude( long nXLef
 			if ( (nXLeft <= pSep->mnXRight) && (nXRight > pSep->mnXRight) )
 			{
 				pSep->mnXRight = nXLeft-1;
-				bSepProcessed = sal_True;
+				bSepProcessed = true;
 			}
 		}
 
@@ -567,7 +567,7 @@ void ImplRegionBand::Exclude( long nXLef
 				pNewSep 			= new ImplRegionBandSep;
 				pNewSep->mnXLeft	= pSep->mnXLeft;
 				pNewSep->mnXRight	= nXLeft-1;
-				pNewSep->mbRemoved	= sal_False;
+				pNewSep->mbRemoved	= false;
 
 				pSep->mnXLeft = nXRight+1;
 
@@ -647,7 +647,7 @@ void ImplRegionBand::XOr( long nXLeft, l
 		mpFirstSep				= new ImplRegionBandSep;
 		mpFirstSep->mnXLeft 	= nXLeft;
 		mpFirstSep->mnXRight	= nXRight;
-		mpFirstSep->mbRemoved	= sal_False;
+		mpFirstSep->mbRemoved	= false;
 		mpFirstSep->mpNextSep	= NULL;
 		return;
 	}
@@ -676,7 +676,7 @@ void ImplRegionBand::XOr( long nXLeft, l
                 pNewSep->mnXLeft    = nXLeft;
                 pNewSep->mnXRight   = nXRight;
                 pNewSep->mpNextSep  = pSep;
-                pNewSep->mbRemoved  = sal_False;
+                pNewSep->mbRemoved  = false;
             
                 // connections from the new separation
                 pNewSep->mpNextSep = pSep;
@@ -692,7 +692,7 @@ void ImplRegionBand::XOr( long nXLeft, l
             else if( nXLeft == nOldLeft && nXRight == nOldRight )
             {
                 // #3
-                pSep->mbRemoved = sal_True;
+                pSep->mbRemoved = true;
                 pPrevSep = NULL; // do not run accidentally into the "right" case when breaking
the loop
                 break;
             }
@@ -725,7 +725,7 @@ void ImplRegionBand::XOr( long nXLeft, l
 
                     // cannot break here, simply mark segment as removed,
                     // and go on with adapted nXLeft/nXRight
-                    pSep->mbRemoved = sal_True;
+                    pSep->mbRemoved = true;
                 }
                 else
                 {
@@ -805,7 +805,7 @@ void ImplRegionBand::XOr( long nXLeft, l
                     pNewSep->mnXLeft    = nXLeft;
                     pNewSep->mnXRight   = nXRight;
                     pNewSep->mpNextSep  = pSep->mpNextSep;
-                    pNewSep->mbRemoved  = sal_False;
+                    pNewSep->mbRemoved  = false;
                 
                     // connections from the new separation
                     pSep->mpNextSep = pNewSep;
@@ -827,7 +827,7 @@ void ImplRegionBand::XOr( long nXLeft, l
         pNewSep->mnXLeft    = nXLeft;
         pNewSep->mnXRight   = nXRight;
         pNewSep->mpNextSep  = NULL;
-        pNewSep->mbRemoved  = sal_False;
+        pNewSep->mbRemoved  = false;
         
         // connections from the new separation
         pPrevSep->mpNextSep = pNewSep;
@@ -838,50 +838,50 @@ void ImplRegionBand::XOr( long nXLeft, l
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplRegionBand::IsInside( long nX )
+bool ImplRegionBand::IsInside( long nX )
 {
 	ImplRegionBandSep* pSep = mpFirstSep;
 	while ( pSep )
 	{
 		if ( (pSep->mnXLeft <= nX) && (pSep->mnXRight >= nX) )
-			return sal_True;
+			return true;
 
 		pSep = pSep->mpNextSep;
 	}
 
-	return sal_False;
+	return false;
 }
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplRegionBand::IsOver( long nLeft, long nRight )
+bool ImplRegionBand::IsOver( long nLeft, long nRight )
 {
 	ImplRegionBandSep* pSep = mpFirstSep;
 	while ( pSep )
 	{
 		if ( (pSep->mnXLeft < nRight) && (pSep->mnXRight > nLeft) )
-			return sal_True;
+			return true;
 
 		pSep = pSep->mpNextSep;
 	}
 
-	return sal_False;
+	return false;
 }
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplRegionBand::IsInside( long nLeft, long nRight )
+bool ImplRegionBand::IsInside( long nLeft, long nRight )
 {
 	ImplRegionBandSep* pSep = mpFirstSep;
 	while ( pSep )
 	{
 		if ( (pSep->mnXLeft >= nLeft) && (nRight <= pSep->mnXRight) )
-			return sal_True;
+			return true;
 
 		pSep = pSep->mpNextSep;
 	}
 
-	return sal_False;
+	return false;
 }
 
 // -----------------------------------------------------------------------
@@ -908,7 +908,7 @@ long ImplRegionBand::GetXRightBoundary()
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
+bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
 {
 	ImplRegionBandSep*	 pOwnRectBandSep = mpFirstSep;
 	ImplRegionBandSep*	 pSecondRectBandSep = rRegionBand.mpFirstSep;
@@ -918,12 +918,12 @@ sal_Bool ImplRegionBand::operator==( con
 		long nOwnXLeft = pOwnRectBandSep->mnXLeft;
 		long nSecondXLeft = pSecondRectBandSep->mnXLeft;
 		if ( nOwnXLeft != nSecondXLeft )
-			return sal_False;
+			return false;
 
 		long nOwnXRight = pOwnRectBandSep->mnXRight;
 		long nSecondXRight = pSecondRectBandSep->mnXRight;
 		if ( nOwnXRight != nSecondXRight )
-			return sal_False;
+			return false;
 
 		// get next separation from current band
 		pOwnRectBandSep = pOwnRectBandSep->mpNextSep;
@@ -934,9 +934,9 @@ sal_Bool ImplRegionBand::operator==( con
 
 	// differnt number of separations?
 	if ( pOwnRectBandSep || pSecondRectBandSep )
-		return sal_False;
+		return false;
 
-	return sal_True;
+	return true;
 }
 
 // -----------------------------------------------------------------------



Mime
View raw message