diff options
author | Herbert Dürr <hdu@apache.org> | 2013-12-17 16:47:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-31 10:45:02 +0000 |
commit | 5033fa376f33250eb41d7734c6ff7ffc44201d2d (patch) | |
tree | 6064028de49d30785665236eaa08335ff92ee02f /vcl/quartz/salgdicommon.cxx | |
parent | d6f9ddb0aaa3fd9e3877f94a3147c68dd64bc77e (diff) |
Resolves: #i123840# normalize SalGraphics point count argument types...
to sal_uInt32
The old mixture of sal_uInt32, ULONG, sal_uLong, sal_uIntPtr gets
consolidated. 4e9 points are more than enough for a SalGraphics.
(cherry picked from commit 03f5dce97331acc1a5e832f956d711a5dc0aac0e)
Conflicts:
vcl/aqua/source/gdi/salgdi.cxx
vcl/generic/print/genpspgraphics.cxx
vcl/inc/os2/salgdi.h
vcl/inc/quartz/salgdi.h
vcl/inc/salgdi.hxx
vcl/os2/source/gdi/salgdi.cxx
vcl/os2/source/gdi/salgdi2.cxx
vcl/source/gdi/salgdilayout.cxx
vcl/unx/generic/gdi/salgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
Change-Id: Iddf806256c7e5403158635e3f5f0049e9382500f
Diffstat (limited to 'vcl/quartz/salgdicommon.cxx')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index d5c1f8892be9..57e8eb172c3d 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -398,13 +398,13 @@ static void DrawPattern50( void*, CGContextRef rContext ) CGContextFillPath( rContext ); } -static void getBoundRect( sal_uLong nPoints, const SalPoint *pPtAry, long &rX, long& rY, long& rWidth, long& rHeight ) +static void getBoundRect( sal_uInt32 nPoints, const SalPoint *pPtAry, long &rX, long& rY, long& rWidth, long& rHeight ) { long nX1 = pPtAry->mnX; long nX2 = nX1; long nY1 = pPtAry->mnY; long nY2 = nY1; - for( sal_uLong n = 1; n < nPoints; n++ ) + for( sal_uInt32 n = 1; n < nPoints; n++ ) { if( pPtAry[n].mnX < nX1 ) { @@ -872,7 +872,7 @@ bool AquaSalGraphics::drawPolyLine( return true; } -sal_Bool AquaSalGraphics::drawPolyLineBezier( sal_uLong, const SalPoint*, const sal_uInt8* ) +sal_Bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { return sal_False; } @@ -933,7 +933,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * // find bound rect long leftX = 0, topY = 0, maxWidth = 0, maxHeight = 0; getBoundRect( pPoints[0], ppPtAry[0], leftX, topY, maxWidth, maxHeight ); - for( sal_uLong n = 1; n < nPolyCount; n++ ) + for( sal_uInt32 n = 1; n < nPolyCount; n++ ) { long nX = leftX, nY = topY, nW = maxWidth, nH = maxHeight; getBoundRect( pPoints[n], ppPtAry[n], nX, nY, nW, nH ); @@ -979,9 +979,9 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * CGContextBeginPath( mrContext ); if( IsPenVisible() ) { - for( sal_uLong nPoly = 0; nPoly < nPolyCount; nPoly++ ) + for( sal_uInt32 nPoly = 0; nPoly < nPolyCount; nPoly++ ) { - const sal_uLong nPoints = pPoints[nPoly]; + const sal_uInt32 nPoints = pPoints[nPoly]; if( nPoints > 1 ) { const SalPoint *pPtAry = ppPtAry[nPoly]; @@ -989,7 +989,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * alignLinePoint( pPtAry, fX, fY ); CGContextMoveToPoint( mrContext, fX, fY ); pPtAry++; - for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) + for( sal_uInt32 nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) { alignLinePoint( pPtAry, fX, fY ); CGContextAddLineToPoint( mrContext, fX, fY ); @@ -1000,15 +1000,15 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * } else { - for( sal_uLong nPoly = 0; nPoly < nPolyCount; nPoly++ ) + for( sal_uInt32 nPoly = 0; nPoly < nPolyCount; nPoly++ ) { - const sal_uLong nPoints = pPoints[nPoly]; + const sal_uInt32 nPoints = pPoints[nPoly]; if( nPoints > 1 ) { const SalPoint *pPtAry = ppPtAry[nPoly]; CGContextMoveToPoint( mrContext, pPtAry->mnX, pPtAry->mnY ); pPtAry++; - for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) + for( sal_uInt32 nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) { CGContextAddLineToPoint( mrContext, pPtAry->mnX, pPtAry->mnY ); } @@ -1022,7 +1022,7 @@ void AquaSalGraphics::drawPolyPolygon( sal_uInt32 nPolyCount, const sal_uInt32 * RefreshRect( leftX, topY, maxWidth, maxHeight ); } -void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) +void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry ) { if( nPoints <= 1 ) return; @@ -1057,7 +1057,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) alignLinePoint( pPtAry, fX, fY ); CGContextMoveToPoint( mrContext, fX, fY ); pPtAry++; - for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) + for( sal_uInt32 nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) { alignLinePoint( pPtAry, fX, fY ); CGContextAddLineToPoint( mrContext, fX, fY ); @@ -1067,7 +1067,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) { CGContextMoveToPoint( mrContext, pPtAry->mnX, pPtAry->mnY ); pPtAry++; - for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) + for( sal_uInt32 nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) { CGContextAddLineToPoint( mrContext, pPtAry->mnX, pPtAry->mnY ); } @@ -1078,7 +1078,7 @@ void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry ) RefreshRect( nX, nY, nWidth, nHeight ); } -sal_Bool AquaSalGraphics::drawPolygonBezier( sal_uLong, const SalPoint*, const sal_uInt8* ) +sal_Bool AquaSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { return sal_False; } @@ -1116,7 +1116,7 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) } -void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry ) +void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) { if( nPoints < 1 ) { @@ -1135,7 +1135,7 @@ void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry ) alignLinePoint( pPtAry, fX, fY ); CGContextMoveToPoint( mrContext, fX, fY ); pPtAry++; - for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) + for( sal_uInt32 nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ ) { alignLinePoint( pPtAry, fX, fY ); CGContextAddLineToPoint( mrContext, fX, fY ); @@ -1391,7 +1391,7 @@ void AquaSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalIn } } -void AquaSalGraphics::invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nSalFlags ) +void AquaSalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nSalFlags ) { CGPoint* CGpoints ; if ( CheckContext() ) |