diff options
Diffstat (limited to 'vcl/source/gdi/outdev.cxx')
-rwxr-xr-x | vcl/source/gdi/outdev.cxx | 276 |
1 files changed, 138 insertions, 138 deletions
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 001b4e0b4043..69caa0105999 100755 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -121,9 +121,9 @@ struct ImplObjStack Point* mpRefPoint; TextAlign meTextAlign; RasterOp meRasterOp; - ULONG mnTextLayoutMode; + sal_uLong mnTextLayoutMode; LanguageType meTextLanguage; - USHORT mnFlags; + sal_uInt16 mnFlags; }; // ----------------------------------------------------------------------- @@ -227,11 +227,11 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr long nY; long nWidth; long nHeight; - ULONG nRectCount; + sal_uLong nRectCount; ImplRegionInfo aInfo; - BOOL bRegionRect; - BOOL bClipRegion = TRUE; - const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter() + sal_Bool bRegionRect; + sal_Bool bClipRegion = sal_True; + const sal_Bool bClipDeviceBounds( !pOutDev->GetPDFWriter() && pOutDev->GetOutDevType() != OUTDEV_PRINTER ); nRectCount = rRegion.GetRectCount(); @@ -266,7 +266,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr aTmpRect.GetHeight(), pOutDev ) ) { - bClipRegion = FALSE; + bClipRegion = sal_False; } } else @@ -277,7 +277,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr 1, 1, pOutDev ) ) { - bClipRegion = FALSE; + bClipRegion = sal_False; } } DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't create region" ); @@ -292,7 +292,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr while ( bRegionRect ) { if ( !pGraphics->UnionClipRegion( nX, nY, nWidth, nHeight, pOutDev ) ) - bClipRegion = FALSE; + bClipRegion = sal_False; DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" ); bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight ); } @@ -318,7 +318,7 @@ Polygon ImplSubdivideBezier( const Polygon& rPoly ) PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly ) { - USHORT i, nPolys = rPolyPoly.Count(); + sal_uInt16 i, nPolys = rPolyPoly.Count(); PolyPolygon aPolyPoly( nPolys ); for( i=0; i<nPolys; ++i ) aPolyPoly.Insert( ImplSubdivideBezier( rPolyPoly.GetObject(i) ) ); @@ -329,7 +329,7 @@ PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly ) // ======================================================================= // #100127# Extracted from OutputDevice::DrawPolyPolygon() -void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly ) +void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly ) { // AW: This crashes on empty PolyPolygons, avoid that if(!nPoly) @@ -337,28 +337,28 @@ void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPo sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF]; PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF]; - BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; + sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; sal_uInt32* pPointAry; PCONSTSALPOINT* pPointAryAry; - const BYTE** pFlagAryAry; - USHORT i = 0, j = 0, last = 0; - BOOL bHaveBezier = sal_False; + const sal_uInt8** pFlagAryAry; + sal_uInt16 i = 0, j = 0, last = 0; + sal_Bool bHaveBezier = sal_False; if ( nPoly > OUTDEV_POLYPOLY_STACKBUF ) { pPointAry = new sal_uInt32[nPoly]; pPointAryAry = new PCONSTSALPOINT[nPoly]; - pFlagAryAry = new const BYTE*[nPoly]; + pFlagAryAry = new const sal_uInt8*[nPoly]; } else { pPointAry = aStackAry1; pPointAryAry = aStackAry2; - pFlagAryAry = (const BYTE**)aStackAry3; + pFlagAryAry = (const sal_uInt8**)aStackAry3; } do { const Polygon& rPoly = rPolyPoly.GetObject( i ); - USHORT nSize = rPoly.GetSize(); + sal_uInt16 nSize = rPoly.GetSize(); if ( nSize ) { pPointAry[j] = nSize; @@ -462,33 +462,33 @@ OutputDevice::OutputDevice() : mnTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT; meOutDevType = OUTDEV_DONTKNOW; meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW; - mbMap = FALSE; - mbMapIsDefault = TRUE; - mbClipRegion = FALSE; - mbBackground = FALSE; - mbOutput = TRUE; - mbDevOutput = FALSE; - mbOutputClipped = FALSE; + mbMap = sal_False; + mbMapIsDefault = sal_True; + mbClipRegion = sal_False; + mbBackground = sal_False; + mbOutput = sal_True; + mbDevOutput = sal_False; + mbOutputClipped = sal_False; maTextColor = Color( COL_BLACK ); maOverlineColor = Color( COL_TRANSPARENT ); meTextAlign = maFont.GetAlign(); meRasterOp = ROP_OVERPAINT; mnAntialiasing = 0; meTextLanguage = 0; // TODO: get default from configuration? - mbLineColor = TRUE; - mbFillColor = TRUE; - mbInitLineColor = TRUE; - mbInitFillColor = TRUE; - mbInitFont = TRUE; - mbInitTextColor = TRUE; - mbInitClipRegion = TRUE; - mbClipRegionSet = FALSE; - mbKerning = FALSE; - mbNewFont = TRUE; - mbTextLines = FALSE; - mbTextSpecial = FALSE; - mbRefPoint = FALSE; - mbEnableRTL = FALSE; // mirroring must be explicitly allowed (typically for windows only) + mbLineColor = sal_True; + mbFillColor = sal_True; + mbInitLineColor = sal_True; + mbInitFillColor = sal_True; + mbInitFont = sal_True; + mbInitTextColor = sal_True; + mbInitClipRegion = sal_True; + mbClipRegionSet = sal_False; + mbKerning = sal_False; + mbNewFont = sal_True; + mbTextLines = sal_False; + mbTextSpecial = sal_False; + mbRefPoint = sal_False; + mbEnableRTL = sal_False; // mirroring must be explicitly allowed (typically for windows only) // struct ImplMapRes maMapRes.mnMapOfsX = 0; @@ -512,7 +512,7 @@ OutputDevice::~OutputDevice() if ( GetUnoGraphicsList() ) { - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); if ( pWrapper ) pWrapper->ReleaseAllGraphics( this ); delete mpUnoGraphicsList; @@ -579,7 +579,7 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const // ----------------------------------------------------------------------- -void OutputDevice::EnableRTL( BOOL bEnable ) +void OutputDevice::EnableRTL( sal_Bool bEnable ) { mbEnableRTL = (bEnable != 0); if( meOutDevType == OUTDEV_VIRDEV ) @@ -604,11 +604,11 @@ void OutputDevice::EnableRTL( BOOL bEnable ) mpAlphaVDev->EnableRTL( bEnable ); } -BOOL OutputDevice::ImplHasMirroredGraphics() +sal_Bool OutputDevice::ImplHasMirroredGraphics() { // HOTFIX for #i55719# if( meOutDevType == OUTDEV_PRINTER ) - return FALSE; + return sal_False; return ( ImplGetGraphics() && (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ); } @@ -637,7 +637,7 @@ void OutputDevice::ImplReMirror( Region &rRegion ) const long nWidth; long nHeight; ImplRegionInfo aInfo; - BOOL bRegionRect; + sal_Bool bRegionRect; Region aMirroredRegion; bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight ); @@ -659,13 +659,13 @@ int OutputDevice::ImplGetGraphics() const DBG_TESTSOLARMUTEX(); if ( mpGraphics ) - return TRUE; + return sal_True; - mbInitLineColor = TRUE; - mbInitFillColor = TRUE; - mbInitFont = TRUE; - mbInitTextColor = TRUE; - mbInitClipRegion = TRUE; + mbInitLineColor = sal_True; + mbInitFillColor = sal_True; + mbInitFont = sal_True; + mbInitTextColor = sal_True; + mbInitClipRegion = sal_True; ImplSVData* pSVData = ImplGetSVData(); if ( meOutDevType == OUTDEV_WINDOW ) @@ -689,7 +689,7 @@ int OutputDevice::ImplGetGraphics() const { // steal the wingraphics from the other outdev mpGraphics = pReleaseOutDev->mpGraphics; - pReleaseOutDev->ImplReleaseGraphics( FALSE ); + pReleaseOutDev->ImplReleaseGraphics( sal_False ); } else { @@ -799,15 +799,15 @@ int OutputDevice::ImplGetGraphics() const { mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp ); mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- -void OutputDevice::ImplReleaseGraphics( BOOL bRelease ) +void OutputDevice::ImplReleaseGraphics( sal_Bool bRelease ) { DBG_TESTSOLARMUTEX(); @@ -963,7 +963,7 @@ void OutputDevice::ImplInvalidateViewTransform() // ----------------------------------------------------------------------- -BOOL OutputDevice::ImplIsRecordLayout() const +sal_Bool OutputDevice::ImplIsRecordLayout() const { return mpOutDevData && mpOutDevData->mpRecordLayout; } @@ -1004,7 +1004,7 @@ void OutputDevice::ImplInitLineColor() else mpGraphics->SetLineColor(); - mbInitLineColor = FALSE; + mbInitLineColor = sal_False; } // ----------------------------------------------------------------------- @@ -1027,7 +1027,7 @@ void OutputDevice::ImplInitFillColor() else mpGraphics->SetFillColor(); - mbInitFillColor = FALSE; + mbInitFillColor = sal_False; } // ----------------------------------------------------------------------- @@ -1057,43 +1057,43 @@ void OutputDevice::ImplInitClipRegion() if ( mbClipRegion ) aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) ); if ( aRegion.IsEmpty() ) - mbOutputClipped = TRUE; + mbOutputClipped = sal_True; else { - mbOutputClipped = FALSE; + mbOutputClipped = sal_False; ImplSelectClipRegion( aRegion ); } - mbClipRegionSet = TRUE; + mbClipRegionSet = sal_True; } else { if ( mbClipRegion ) { if ( maRegion.IsEmpty() ) - mbOutputClipped = TRUE; + mbOutputClipped = sal_True; else { - mbOutputClipped = FALSE; + mbOutputClipped = sal_False; ImplSelectClipRegion( // #102532# Respect output offset also for clip region ImplPixelToDevicePixel( maRegion ) ); } - mbClipRegionSet = TRUE; + mbClipRegionSet = sal_True; } else { if ( mbClipRegionSet ) { mpGraphics->ResetClipRegion(); - mbClipRegionSet = FALSE; + mbClipRegionSet = sal_False; } - mbOutputClipped = FALSE; + mbOutputClipped = sal_False; } } - mbInitClipRegion = FALSE; + mbInitClipRegion = sal_False; } // ----------------------------------------------------------------------- @@ -1107,15 +1107,15 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion ) if ( mbClipRegion ) { maRegion = Region( REGION_NULL ); - mbClipRegion = FALSE; - mbInitClipRegion = TRUE; + mbClipRegion = sal_False; + mbInitClipRegion = sal_True; } } else { maRegion = *pRegion; - mbClipRegion = TRUE; - mbInitClipRegion = TRUE; + mbClipRegion = sal_True; + mbInitClipRegion = sal_True; } } @@ -1494,11 +1494,11 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) // which prevents reliable undoing of the "triangle thingy" parameter // so the toolspoly -> b2dpoly conversion has to be done manually ::basegfx::B2DPolyPolygon aB2DPolyPolygon; - for( USHORT nPolyIdx = 0; nPolyIdx < rPolyPolygon.Count(); ++nPolyIdx ) + for( sal_uInt16 nPolyIdx = 0; nPolyIdx < rPolyPolygon.Count(); ++nPolyIdx ) { const Polygon& rPolygon = rPolyPolygon[ nPolyIdx ]; ::basegfx::B2DPolygon aB2DPoly; - for( USHORT nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx ) + for( sal_uInt16 nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx ) { const Point& rPoint = rPolygon[ nPointIdx ]; const ::basegfx::B2DPoint aB2DPoint( rPoint.X(), rPoint.Y() ); @@ -1535,10 +1535,10 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) mpGraphics->EndSetClipRegion(); // and mark the clip status as ready - mbOutputClipped = FALSE; - mbClipRegion = TRUE; - mbClipRegionSet = TRUE; - mbInitClipRegion = FALSE; + mbOutputClipped = sal_False; + mbClipRegion = sal_True; + mbClipRegionSet = sal_True; + mbInitClipRegion = sal_False; return; } @@ -1555,13 +1555,13 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) sal_Int32 maxy = SAL_MIN_INT32; sal_Int32 miny = SAL_MAX_INT32; sal_uInt32 dwNumTriangles = 0; - for(USHORT i=0; i<rPolyPolygon.Count(); ++i) + for(sal_uInt16 i=0; i<rPolyPolygon.Count(); ++i) { const Polygon &rPoly = rPolyPolygon.GetObject(i); const sal_Int32 dwNumVertices = rPoly.GetSize(); if(!(dwNumVertices % 3)) { - for(USHORT j=0; j<rPoly.GetSize(); ++j) + for(sal_uInt16 j=0; j<rPoly.GetSize(); ++j) { const Point &p = rPoly.GetPoint(j); if(p.Y() < miny) @@ -1579,20 +1579,20 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) // indicates that no output needs to be produced // since the clipping region did not provide any // visible areas. - mbOutputClipped = TRUE; + mbOutputClipped = sal_True; // indicates that a clip region has been // presented to the output device. - mbClipRegion = TRUE; + mbClipRegion = sal_True; // indicates that the set clipping region // has been processed. - mbClipRegionSet = TRUE; + mbClipRegionSet = sal_True; // under 'normal' circumstances a new clipping region // needs to be processed by ImplInitClipRegion(), // which we need to circumvent. - mbInitClipRegion = FALSE; + mbInitClipRegion = sal_False; return; } @@ -1605,13 +1605,13 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) // the polypolygon has already been triangulated since we don't // want to use the basegfx-types here. this could be leveraged // after the tools-types had been removed. - for(USHORT i=0; i<rPolyPolygon.Count(); ++i) + for(sal_uInt16 i=0; i<rPolyPolygon.Count(); ++i) { const Polygon &rPoly = rPolyPolygon.GetObject(i); - const USHORT dwNumVertices = rPoly.GetSize(); + const sal_uInt16 dwNumVertices = rPoly.GetSize(); if(!(dwNumVertices % 3)) { - for(USHORT j=0; j<dwNumVertices; j+=3) + for(sal_uInt16 j=0; j<dwNumVertices; j+=3) { const Point &p0 = rPoly.GetPoint(j+0); const Point &p1 = rPoly.GetPoint(j+1); @@ -1794,16 +1794,16 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) // indicates that a clip region has been // presented to the output device. - mbClipRegion = TRUE; + mbClipRegion = sal_True; // indicates that the set clipping region // has been processed. - mbClipRegionSet = TRUE; + mbClipRegionSet = sal_True; // under 'normal' circumstances a new clipping region // needs to be processed by ImplInitClipRegion(), // which we need to circumvent. - mbInitClipRegion = FALSE; + mbInitClipRegion = sal_False; } // ----------------------------------------------------------------------- @@ -1814,7 +1814,7 @@ void OutputDevice::SetClipRegion() DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( Region(), FALSE ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( Region(), sal_False ) ); ImplSetClipRegion( NULL ); @@ -1831,7 +1831,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, TRUE ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, sal_True ) ); if ( rRegion.GetType() == REGION_NULL ) ImplSetClipRegion( NULL ); @@ -1873,7 +1873,7 @@ void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) // feed region to metafile if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, TRUE ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, sal_True ) ); ImplSetTriangleClipRegion( rPolyPolygon ); @@ -1927,7 +1927,7 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove ) maRegion.Move( ImplLogicWidthToDevicePixel( nHorzMove ), ImplLogicHeightToDevicePixel( nVertMove ) ); - mbInitClipRegion = TRUE; + mbInitClipRegion = sal_True; } if( mpAlphaVDev ) @@ -1946,8 +1946,8 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect ) Rectangle aRect = LogicToPixel( rRect ); maRegion.Intersect( aRect ); - mbClipRegion = TRUE; - mbInitClipRegion = TRUE; + mbClipRegion = sal_True; + mbInitClipRegion = sal_True; if( mpAlphaVDev ) mpAlphaVDev->IntersectClipRegion( rRect ); @@ -1970,8 +1970,8 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion ) Region aRegion = LogicToPixel( rRegion ); maRegion.Intersect( aRegion ); - mbClipRegion = TRUE; - mbInitClipRegion = TRUE; + mbClipRegion = sal_True; + mbInitClipRegion = sal_True; } if( mpAlphaVDev ) @@ -1980,7 +1980,7 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion ) // ----------------------------------------------------------------------- -void OutputDevice::SetDrawMode( ULONG nDrawMode ) +void OutputDevice::SetDrawMode( sal_uLong nDrawMode ) { DBG_TRACE1( "OutputDevice::SetDrawMode( %lx )", nDrawMode ); DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -2004,7 +2004,7 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp ) if ( meRasterOp != eRasterOp ) { meRasterOp = eRasterOp; - mbInitLineColor = mbInitFillColor = TRUE; + mbInitLineColor = mbInitFillColor = sal_True; if( mpGraphics || ImplGetGraphics() ) mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp ); @@ -2022,12 +2022,12 @@ void OutputDevice::SetLineColor() DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) ); + mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); if ( mbLineColor ) { - mbInitLineColor = TRUE; - mbLineColor = FALSE; + mbInitLineColor = sal_True; + mbLineColor = sal_False; maLineColor = Color( COL_TRANSPARENT ); } @@ -2060,7 +2060,7 @@ void OutputDevice::SetLineColor( const Color& rColor ) } else if( mnDrawMode & DRAWMODE_GRAYLINE ) { - const UINT8 cLum = aColor.GetLuminance(); + const sal_uInt8 cLum = aColor.GetLuminance(); aColor = Color( cLum, cLum, cLum ); } else if( mnDrawMode & DRAWMODE_SETTINGSLINE ) @@ -2078,14 +2078,14 @@ void OutputDevice::SetLineColor( const Color& rColor ) } if( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( aColor, TRUE ) ); + mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) ); if( ImplIsColorTransparent( aColor ) ) { if ( mbLineColor ) { - mbInitLineColor = TRUE; - mbLineColor = FALSE; + mbInitLineColor = sal_True; + mbLineColor = sal_False; maLineColor = Color( COL_TRANSPARENT ); } } @@ -2093,8 +2093,8 @@ void OutputDevice::SetLineColor( const Color& rColor ) { if( maLineColor != aColor ) { - mbInitLineColor = TRUE; - mbLineColor = TRUE; + mbInitLineColor = sal_True; + mbLineColor = sal_True; maLineColor = aColor; } } @@ -2111,12 +2111,12 @@ void OutputDevice::SetFillColor() DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( Color(), FALSE ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color(), sal_False ) ); if ( mbFillColor ) { - mbInitFillColor = TRUE; - mbFillColor = FALSE; + mbInitFillColor = sal_True; + mbFillColor = sal_False; maFillColor = Color( COL_TRANSPARENT ); } @@ -2149,7 +2149,7 @@ void OutputDevice::SetFillColor( const Color& rColor ) } else if( mnDrawMode & DRAWMODE_GRAYFILL ) { - const UINT8 cLum = aColor.GetLuminance(); + const sal_uInt8 cLum = aColor.GetLuminance(); aColor = Color( cLum, cLum, cLum ); } else if( mnDrawMode & DRAWMODE_NOFILL ) @@ -2171,14 +2171,14 @@ void OutputDevice::SetFillColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( aColor, TRUE ) ); + mpMetaFile->AddAction( new MetaFillColorAction( aColor, sal_True ) ); if ( ImplIsColorTransparent( aColor ) ) { if ( mbFillColor ) { - mbInitFillColor = TRUE; - mbFillColor = FALSE; + mbInitFillColor = sal_True; + mbFillColor = sal_False; maFillColor = Color( COL_TRANSPARENT ); } } @@ -2186,8 +2186,8 @@ void OutputDevice::SetFillColor( const Color& rColor ) { if ( maFillColor != aColor ) { - mbInitFillColor = TRUE; - mbFillColor = TRUE; + mbInitFillColor = sal_True; + mbFillColor = sal_True; maFillColor = aColor; } } @@ -2204,7 +2204,7 @@ void OutputDevice::SetBackground() DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); maBackground = Wallpaper(); - mbBackground = FALSE; + mbBackground = sal_False; if( mpAlphaVDev ) mpAlphaVDev->SetBackground(); @@ -2220,9 +2220,9 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground ) maBackground = rBackground; if( rBackground.GetStyle() == WALLPAPER_NULL ) - mbBackground = FALSE; + mbBackground = sal_False; else - mbBackground = TRUE; + mbBackground = sal_True; if( mpAlphaVDev ) mpAlphaVDev->SetBackground( rBackground ); @@ -2236,9 +2236,9 @@ void OutputDevice::SetRefPoint() DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( Point(), FALSE ) ); + mpMetaFile->AddAction( new MetaRefPointAction( Point(), sal_False ) ); - mbRefPoint = FALSE; + mbRefPoint = sal_False; maRefPoint.X() = maRefPoint.Y() = 0L; if( mpAlphaVDev ) @@ -2253,9 +2253,9 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, TRUE ) ); + mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, sal_True ) ); - mbRefPoint = TRUE; + mbRefPoint = sal_True; maRefPoint = rRefPoint; if( mpAlphaVDev ) @@ -2566,7 +2566,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly ) if( mpMetaFile ) mpMetaFile->AddAction( new MetaPolyLineAction( rPoly ) ); - USHORT nPoints = rPoly.GetSize(); + sal_uInt16 nPoints = rPoly.GetSize(); if ( !IsDeviceOutputNecessary() || !mbLineColor || (nPoints < 2) || ImplIsRecordLayout() ) return; @@ -2616,7 +2616,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const BYTE* pFlgAry = aPoly.GetConstFlagAry(); + const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = ImplSubdivideBezier(aPoly); @@ -2664,7 +2664,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo) { - USHORT nPoints(rPoly.GetSize()); + sal_uInt16 nPoints(rPoly.GetSize()); if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; @@ -2736,7 +2736,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly ) if( mpMetaFile ) mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) ); - USHORT nPoints = rPoly.GetSize(); + sal_uInt16 nPoints = rPoly.GetSize(); if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || (nPoints < 2) || ImplIsRecordLayout() ) return; @@ -2799,7 +2799,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const BYTE* pFlgAry = aPoly.GetConstFlagAry(); + const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = ImplSubdivideBezier(aPoly); @@ -2826,7 +2826,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly ) if( mpMetaFile ) mpMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) ); - USHORT nPoly = rPolyPoly.Count(); + sal_uInt16 nPoly = rPolyPoly.Count(); if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || !nPoly || ImplIsRecordLayout() ) return; @@ -3158,7 +3158,7 @@ void OutputDevice::DrawPolyLine( // ----------------------------------------------------------------------- -void OutputDevice::Push( USHORT nFlags ) +void OutputDevice::Push( sal_uInt16 nFlags ) { DBG_TRACE( "OutputDevice::Push()" ); DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -3348,7 +3348,7 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) // ----------------------------------------------------------------------- -void OutputDevice::EnableOutput( BOOL bEnable ) +void OutputDevice::EnableOutput( sal_Bool bEnable ) { mbOutput = (bEnable != 0); @@ -3368,7 +3368,7 @@ void OutputDevice::SetSettings( const AllSettings& rSettings ) // ----------------------------------------------------------------------- -USHORT OutputDevice::GetBitCount() const +sal_uInt16 OutputDevice::GetBitCount() const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -3382,12 +3382,12 @@ USHORT OutputDevice::GetBitCount() const return 0; } - return (USHORT)mpGraphics->GetBitCount(); + return (sal_uInt16)mpGraphics->GetBitCount(); } // ----------------------------------------------------------------------- -USHORT OutputDevice::GetAlphaBitCount() const +sal_uInt16 OutputDevice::GetAlphaBitCount() const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); @@ -3402,17 +3402,17 @@ USHORT OutputDevice::GetAlphaBitCount() const // ----------------------------------------------------------------------- -ULONG OutputDevice::GetColorCount() const +sal_uLong OutputDevice::GetColorCount() const { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); - const USHORT nBitCount = GetBitCount(); - return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (ULONG) 1 ) << nBitCount) ); + const sal_uInt16 nBitCount = GetBitCount(); + return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (sal_uLong) 1 ) << nBitCount) ); } // ----------------------------------------------------------------------- -BOOL OutputDevice::HasAlpha() +sal_Bool OutputDevice::HasAlpha() { return mpAlphaVDev != NULL; } |