diff options
Diffstat (limited to 'sw/source/core/text/itrpaint.cxx')
-rw-r--r-- | sw/source/core/text/itrpaint.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 88c8236887ad..75493bad82be 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -83,14 +83,14 @@ SwLinePortion *SwTextPainter::CalcPaintOfst( const SwRect &rPaint ) { SwLinePortion *pLast = nullptr; // 7529 and 4757: not <= nPaintOfst - while( pPor && static_cast<SwTwips>(GetInfo().X() + pPor->Width() + (pPor->Height()/2)) + while( pPor && GetInfo().X() + pPor->Width() + (pPor->Height()/2) < nPaintOfst ) { if( pPor->InSpaceGrp() && GetInfo().GetSpaceAdd() ) { tools::Long nTmp = GetInfo().X() +pPor->Width() + pPor->CalcSpacing( GetInfo().GetSpaceAdd(), GetInfo() ); - if( static_cast<SwTwips>(nTmp + (pPor->Height()/2)) >= nPaintOfst ) + if( nTmp + (pPor->Height()/2) >= nPaintOfst ) break; GetInfo().X( nTmp ); GetInfo().SetIdx( GetInfo().GetIdx() + pPor->GetLen() ); @@ -178,7 +178,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, && GetDropLines() >= GetLineNr(); } - sal_uInt32 nTmpHeight, nTmpAscent; + sal_uInt16 nTmpHeight, nTmpAscent; CalcAscentAndHeight( nTmpAscent, nTmpHeight ); // bClip decides if there's a need to clip @@ -192,7 +192,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( GetInfo().GetPos().X() < rPaint.Left() || GetInfo().GetPos().Y() < rPaint.Top() || - GetInfo().GetPos().Y() + static_cast<SwTwips>(nTmpHeight) > rPaint.Top() + rPaint.Height() ) + GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() ) { bClip = false; rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); @@ -347,7 +347,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, // A safety distance of half the height is added, so that // TTF-"f" isn't overlapping into the page margin. if( bClip && - static_cast<SwTwips>(GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 )) > nMaxRight ) + GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight ) { bClip = false; rClip.ChgClip( rPaint, m_pFrame, m_pCurr->HasUnderscore() ); @@ -480,7 +480,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, SwTwips nDiff = GetInfo().Y() + nTmpHeight - nTmpAscent - GetTextFrame()->getFrameArea().Bottom(); if( ( nDiff > 0 && (GetEnd() < TextFrameIndex(GetInfo().GetText().getLength()) || - ( nDiff > static_cast<SwTwips>(nTmpHeight)/2 && GetPrevLine() ) ) ) || + ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || (nDiff >= 0 && bNextUndersized) ) { |