diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-01-02 22:00:00 +0100 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-01-03 10:54:53 +0000 |
commit | c9c5c94771f22919ec82351b3b9b3096af96a508 (patch) | |
tree | 1632f2438645a80c9c4bb1f6804ecfbe7bb264c6 /vcl | |
parent | 2f01d2a42a5afecd7827a939cd0f5d6793cba47e (diff) |
avoid some numeric type conversions
Change-Id: I89329ae1dc2c46b6412fcefd31cdb3dcd907354d
Reviewed-on: https://gerrit.libreoffice.org/32658
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/text.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 70497c52e3d9..fc4e3021f4d0 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -206,8 +206,8 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) { - int nX = rSalLayout.DrawBase().X(); - int nY = rSalLayout.DrawBase().Y(); + long nX = rSalLayout.DrawBase().X(); + long nY = rSalLayout.DrawBase().Y(); Rectangle aBoundRect; rSalLayout.DrawBase() = Point( 0, 0 ); @@ -215,8 +215,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) if( !rSalLayout.GetBoundRect( *mpGraphics, aBoundRect ) ) { // guess vertical text extents if GetBoundRect failed - int nRight = rSalLayout.GetTextWidth(); - int nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent; + long nRight = rSalLayout.GetTextWidth(); + long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent; long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent; aBoundRect = Rectangle( 0, -nTop, nRight, nHeight - nTop ); } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index b2a3c4754ece..e1d8bc5dc67c 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -251,8 +251,8 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, if( bDrawnOk && IsLineColor() ) { const basegfx::B2DVector aHairlineWidth(1,1); - const int nPolyCount = aB2DPolyPolygon.count(); - for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) + const sal_uInt32 nPolyCount = aB2DPolyPolygon.count(); + for( sal_uInt32 nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const basegfx::B2DPolygon aOnePoly = aB2DPolyPolygon.getB2DPolygon( nPolyIdx ); mpGraphics->DrawPolyLine( @@ -354,8 +354,8 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly mpGraphics->SetFillColor(); // draw the border line const basegfx::B2DVector aLineWidths( 1, 1 ); - const int nPolyCount = aB2DPolyPolygon.count(); - for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) + const sal_uInt32 nPolyCount = aB2DPolyPolygon.count(); + for( sal_uInt32 nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const basegfx::B2DPolygon& rPolygon = aB2DPolyPolygon.getB2DPolygon( nPolyIdx ); bDrawn = mpGraphics->DrawPolyLine( |