summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/frmcrsr.cxx8
-rw-r--r--sw/source/core/text/itrform2.cxx8
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/txtfly.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx2
5 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 48ba68d3a81f..303a529e3484 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -382,12 +382,12 @@ bool SwTextFrame::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
if ( aRectFnSet.IsVert() )
{
if ( aRectFnSet.IsVertL2R() )
- nMaxY = std::min( aRectFnSet.GetPrtBottom(*pFrame), nUpperMaxY );
+ nMaxY = std::min( SwTwips(aRectFnSet.GetPrtBottom(*pFrame)), nUpperMaxY );
else
- nMaxY = std::max( aRectFnSet.GetPrtBottom(*pFrame), nUpperMaxY );
+ nMaxY = std::max( SwTwips(aRectFnSet.GetPrtBottom(*pFrame)), nUpperMaxY );
}
else
- nMaxY = std::min( aRectFnSet.GetPrtBottom(*pFrame), nUpperMaxY );
+ nMaxY = std::min( SwTwips(aRectFnSet.GetPrtBottom(*pFrame)), nUpperMaxY );
if ( pFrame->IsEmpty() || ! aRectFnSet.GetHeight(pFrame->getFramePrintArea()) )
{
Point aPnt1 = pFrame->getFrameArea().Pos() + pFrame->getFramePrintArea().Pos();
@@ -1407,7 +1407,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
nFirst = nFirst - nDist;
else
nFirst = 0;
- nDist = std::max( nDist, GetLineSpace() );
+ nDist = std::max( nDist, SwTwips(GetLineSpace()) );
nDist += nLineHeight;
nDiff -= nFirst;
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index fb064af7d3c9..aa4ba00b8d8d 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2069,7 +2069,7 @@ void SwTextFormatter::CalcUnclipped( SwTwips& rTop, SwTwips& rBottom )
OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(),
"SwTextFormatter::CalcUnclipped with unswapped frame" );
- tools::Long nFlyAsc, nFlyDesc;
+ SwTwips nFlyAsc, nFlyDesc;
m_pCurr->MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc );
rTop = Y() + GetCurr()->GetAscent();
rBottom = rTop + nFlyDesc;
@@ -2096,7 +2096,7 @@ void SwTextFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart,
aTmpInf.SetIdx( nStartIdx );
aTmpInf.SetPos( aStart );
- tools::Long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
+ SwTwips nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
pCurrent->MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc );
const sal_uInt16 nTmpHeight = pCurrent->GetRealHeight();
@@ -2215,7 +2215,7 @@ void SwTextFormatter::AlignFlyInCntBase( tools::Long nBaseLine ) const
nFlags |= AsCharFlags::Reverse;
}
- tools::Long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
+ SwTwips nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
while( pPos )
{
@@ -2577,7 +2577,7 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
// aBase.X() = Offset in the line after the current position
// aBase.Y() = LineIter.Y() + Ascent of the current position
- tools::Long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
+ SwTwips nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc;
// i#11859 - use new method <SwLineLayout::MaxAscentDescent(..)>
// to change line spacing behaviour at paragraph - Compatibility to MS Word
//SwLinePortion *pPos = pCurr->GetFirstPortion();
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 866eaf929979..61fd156e191c 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -143,7 +143,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
SwLinePortion *pPor = bEndPor ? m_pCurr->GetFirstPortion() : CalcPaintOfst( rPaint );
// Optimization!
- SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
+ SwTwips nMaxRight = std::min<SwTwips>( rPaint.Right(), Right() );
const SwTwips nTmpLeft = GetInfo().X();
//compatibility setting: allow tabstop text to exceed right margin
if (GetInfo().GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::TAB_OVER_MARGIN))
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 46851c08d7ad..a5fb1f6b6731 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -983,7 +983,7 @@ SwTwips SwTextFly::CalcMinBottom() const
{
const SwRect& aBound( pAnchoredObj->GetObjRectWithSpaces() );
if( aBound.Top() < nEndOfFrame )
- nRet = std::max( nRet, aBound.Bottom() );
+ nRet = std::max( nRet, SwTwips(aBound.Bottom()) );
}
}
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 3b954b6f857d..d1a5f9054462 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -3152,7 +3152,7 @@ SwTestFormat::SwTestFormat( SwTextFrame* pTextFrame, const SwFrame* pPre, SwTwip
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*pFrame);
- aRectFnSet.SetHeight( aPrt, std::max( 0L , aRectFnSet.GetHeight(pFrame->getFrameArea()) - aRectFnSet.GetTop(aPrt) - nLower ) );
+ aRectFnSet.SetHeight( aPrt, std::max( tools::Long(0) , aRectFnSet.GetHeight(pFrame->getFrameArea()) - aRectFnSet.GetTop(aPrt) - nLower ) );
aRectFnSet.SetWidth( aPrt, aRectFnSet.GetWidth(pFrame->getFrameArea()) - ( rAttrs.CalcLeft( pFrame ) + rAttrs.CalcRight( pFrame ) ) );
}