summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/paintfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r--sw/source/core/layout/paintfrm.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b06341cb9ecb..12536c52a054 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -864,7 +864,7 @@ static void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect const & rLRect )
// Discriminate vertically stretched rect from horizontally stretched
// and restrict minimum nHalfLWidth to 1
- tools::Long nHalfLWidth = std::max( static_cast<tools::Long>(std::min( rLRect.Width( ), rLRect.Height( ) ) / 2), 1L );
+ tools::Long nHalfLWidth = std::max( std::min( rLRect.Width( ), rLRect.Height( ) ) / 2, tools::Long(1) );
if ( rLRect.Height( ) > rLRect.Width( ) )
{
@@ -1237,7 +1237,7 @@ static tools::Long lcl_AlignWidth( const tools::Long nWidth, SwPaintProperties c
const tools::Long nW = nWidth % properties.nSPixelSzW;
if ( !nW || nW > properties.nSHalfPixelSzW )
- return std::max(1L, nWidth - properties.nSHalfPixelSzW);
+ return std::max(tools::Long(1), nWidth - properties.nSHalfPixelSzW);
}
return nWidth;
}
@@ -1249,7 +1249,7 @@ static tools::Long lcl_AlignHeight( const tools::Long nHeight, SwPaintProperties
const tools::Long nH = nHeight % properties.nSPixelSzH;
if ( !nH || nH > properties.nSHalfPixelSzH )
- return std::max(1L, nHeight - properties.nSHalfPixelSzH);
+ return std::max(tools::Long(1), nHeight - properties.nSHalfPixelSzH);
}
return nHeight;
}
@@ -5396,8 +5396,8 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
if( bGrid )
{
nY -= nGrid;
- SwTwips nPosY = std::max( aInter.Left(), nY );
- SwTwips nHeight = std::min(nRight, aTmp.Pos().X())-nPosY;
+ SwTwips nPosY = std::max( SwTwips(aInter.Left()), nY );
+ SwTwips nHeight = std::min(nRight, SwTwips(aTmp.Pos().X()))-nPosY;
if( nHeight > 0 )
{
if( bCell )
@@ -5429,8 +5429,8 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
nY -= nRuby;
if( bBorder )
{
- SwTwips nPos = std::max( aInter.Left(), nY );
- SwTwips nW = std::min(nRight, aTmp.Pos().X()) - nPos;
+ SwTwips nPos = std::max( SwTwips(aInter.Left()), nY );
+ SwTwips nW = std::min(nRight, SwTwips(aTmp.Pos().X())) - nPos;
SwRect aVert( Point( nPos, aGrid.Top() ),
Size( nW, 1 ) );
if( nW > 0 )
@@ -5455,7 +5455,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
{
nY -= nGrid;
SwTwips nHeight = aTmp.Pos().X()
- - std::max(aInter.Left(), nY );
+ - std::max(SwTwips(aInter.Left()), nY );
if( nHeight > 0 )
{
if( bCell )
@@ -5487,8 +5487,8 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co
nY -= nRuby;
if( bBorder )
{
- SwTwips nPos = std::max( aInter.Left(), nY );
- SwTwips nW = std::min(nRight, aTmp.Pos().X()) - nPos;
+ SwTwips nPos = std::max( SwTwips(aInter.Left()), nY );
+ SwTwips nW = std::min(nRight, SwTwips(aTmp.Pos().X())) - nPos;
SwRect aVert( Point( nPos, aGrid.Top() ),
Size( nW, 1 ) );
if( nW > 0 )
@@ -6507,7 +6507,7 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
const bool bHori = rP1.Y() == rP2.Y();
// use pointers to member function in order to unify flow
- typedef long (Point::*pmfPtGet)() const;
+ typedef tools::Long (Point::*pmfPtGet)() const;
typedef void (Point::*pmfPtSet)(tools::Long);
const pmfPtGet pDirPtX = &Point::X;
const pmfPtGet pDirPtY = &Point::Y;