summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/anchoredobject.cxx4
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/calcmove.cxx24
-rw-r--r--sw/source/core/layout/colfrm.cxx10
-rw-r--r--sw/source/core/layout/flowfrm.cxx14
-rw-r--r--sw/source/core/layout/fly.cxx20
-rw-r--r--sw/source/core/layout/flycnt.cxx8
-rw-r--r--sw/source/core/layout/flylay.cxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx22
-rw-r--r--sw/source/core/layout/ftnfrm.cxx4
-rw-r--r--sw/source/core/layout/laycache.cxx6
-rw-r--r--sw/source/core/layout/pagechg.cxx16
-rw-r--r--sw/source/core/layout/paintfrm.cxx56
-rw-r--r--sw/source/core/layout/tabfrm.cxx60
-rw-r--r--sw/source/core/layout/trvlfrm.cxx16
-rw-r--r--sw/source/core/layout/wsfrm.cxx14
16 files changed, 141 insertions, 141 deletions
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 478a4a78bb68..ab4a193a5673 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -669,8 +669,8 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const
const SvxULSpaceItem& rUL = rFmt.GetULSpace();
const SvxLRSpaceItem& rLR = rFmt.GetLRSpace();
{
- maObjRectWithSpaces.Top ( Max( maObjRectWithSpaces.Top() - long(rUL.GetUpper()), 0L ));
- maObjRectWithSpaces.Left( Max( maObjRectWithSpaces.Left()- long(rLR.GetLeft()), 0L ));
+ maObjRectWithSpaces.Top ( std::max( maObjRectWithSpaces.Top() - long(rUL.GetUpper()), 0L ));
+ maObjRectWithSpaces.Left( std::max( maObjRectWithSpaces.Left()- long(rLR.GetLeft()), 0L ));
maObjRectWithSpaces.SSize().Height() += rUL.GetLower();
maObjRectWithSpaces.SSize().Width() += rLR.GetRight();
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 447f55d4b44a..5bd0c2d487e5 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1067,7 +1067,7 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
const text::TextColumn* pArray = aSetColumns.getConstArray();
aColumns.clear();
//max count is 64k here - this is something the array can't do
- sal_uInt16 nCount = Min( (sal_uInt16)aSetColumns.getLength(),
+ sal_uInt16 nCount = std::min( (sal_uInt16)aSetColumns.getLength(),
(sal_uInt16) 0x3fff );
sal_uInt16 nWidthSum = 0;
// #101224# one column is no column
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 44059617882d..884bfbad4226 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -113,7 +113,7 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool
}
SWRECTFN( this )
SWRECTFNX( pNewUpper )
- if( Abs( (pNewUpper->Prt().*fnRectX->fnGetWidth)() -
+ if( std::abs( (pNewUpper->Prt().*fnRectX->fnGetWidth)() -
(GetUpper()->Prt().*fnRect->fnGetWidth)() ) > 1 ) {
// In this case, only a _WouldFit with test move is possible
nMoveAnyway = 2;
@@ -671,10 +671,10 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot
}
else
nTmp = pObj->GetObjRect().Bottom();
- nMax = Max( nTmp, nMax );
+ nMax = std::max( nTmp, nMax );
}
++nMax; // Lower edge vs. height!
- rBot = Max( rBot, nMax );
+ rBot = std::max( rBot, nMax );
}
void SwPageFrm::MakeAll()
@@ -722,7 +722,7 @@ void SwPageFrm::MakeAll()
nWidth = pSh->GetBrowseWidth();
nWidth += + 2 * aBorder.Width();
- nWidth = Max( nWidth, 2L * aBorder.Width() + 4L*MM50 );
+ nWidth = std::max( nWidth, 2L * aBorder.Width() + 4L*MM50 );
Frm().Width( nWidth );
SwLayoutFrm *pBody = FindBodyCont();
@@ -760,7 +760,7 @@ void SwPageFrm::MakeAll()
( pFrm->Frm().Height() < pFrm->Prt().Height() )
)
{
- nTmp = Min( nTmp, pFrm->Frm().Height() );
+ nTmp = std::min( nTmp, pFrm->Frm().Height() );
}
else
{
@@ -770,7 +770,7 @@ void SwPageFrm::MakeAll()
nTmp += pFrm->Frm().Height() - pFrm->Prt().Height();
}
if ( !pFrm->IsBodyFrm() )
- nTmp = Min( nTmp, pFrm->Frm().Height() );
+ nTmp = std::min( nTmp, pFrm->Frm().Height() );
nBot += nTmp;
// Here we check whether paragraph anchored objects
// protrude outside the Body/FtnCont.
@@ -789,11 +789,11 @@ void SwPageFrm::MakeAll()
// visible area.
if ( !GetPrev() && !GetNext() )
{
- nBot = Max( nBot, pSh->VisArea().Height() );
+ nBot = std::max( nBot, pSh->VisArea().Height() );
}
// #i35143# - Assure, that the page
// doesn't exceed the defined browse height.
- Frm().Height( Min( nBot, BROWSE_HEIGHT ) );
+ Frm().Height( std::min( nBot, BROWSE_HEIGHT ) );
}
Prt().Left ( pAttrs->CalcLeftLine() + aBorder.Width() );
Prt().Top ( nTop );
@@ -1007,7 +1007,7 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() )
{
- nMinWidth = Max( nMinWidth,
+ nMinWidth = std::max( nMinWidth,
bFly ? rFmt.GetFrmSize().GetWidth()
: pObj->GetObjRect().Width() );
}
@@ -1017,8 +1017,8 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
long nWidth = nWidthArea - 2 * ( IsVertical() ? aBorder.Height() : aBorder.Width() );
nWidth -= (Prt().*fnRect->fnGetLeft)();
nWidth -= rAttrs.CalcRightLine();
- nWidth = Max( nMinWidth, nWidth );
- (Prt().*fnRect->fnSetWidth)( Min( nWidth,
+ nWidth = std::max( nMinWidth, nWidth );
+ (Prt().*fnRect->fnSetWidth)( std::min( nWidth,
(Prt().*fnRect->fnGetWidth)() ) );
}
@@ -1026,7 +1026,7 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
{
// The PrtArea should already be at least MINLAY wide, matching the
// minimal values of the UI
- (Prt().*fnRect->fnSetWidth)( Min( long(MINLAY),
+ (Prt().*fnRect->fnSetWidth)( std::min( long(MINLAY),
(Frm().*fnRect->fnGetWidth)() ) );
SwTwips nTmp = (Frm().*fnRect->fnGetWidth)() -
(Prt().*fnRect->fnGetWidth)();
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 2e0f2226cdfc..a73a8b425973 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -274,7 +274,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
bAdjustAttributes = sal_True;
else
{
- sal_uInt16 nCount = Min( rNew.GetColumns().size(), rOld.GetColumns().size() );
+ sal_uInt16 nCount = std::min( rNew.GetColumns().size(), rOld.GetColumns().size() );
for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( !(rOld.GetColumns()[i] == rNew.GetColumns()[i]) )
{
@@ -393,16 +393,16 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
{
if ( i == 0 )
{
- aLR.SetRight( Max( nRight, nMin ) );
+ aLR.SetRight( std::max( nRight, nMin ) );
}
else if ( i == pAttr->GetNumCols() - 1 )
{
- aLR.SetLeft ( Max( nLeft, nMin ) );
+ aLR.SetLeft ( std::max( nLeft, nMin ) );
}
else
{
- aLR.SetLeft ( Max( nLeft, nMin ) );
- aLR.SetRight( Max( nRight, nMin ) );
+ aLR.SetLeft ( std::max( nLeft, nMin ) );
+ aLR.SetRight( std::max( nRight, nMin ) );
}
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index a8bc8fe7b33e..14bfc39b80f6 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1511,7 +1511,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// former consideration
if ( pOwn->IsTxtFrm() )
{
- nAdd = Max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace() );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace() );
}
nUpper += nAdd;
}
@@ -1537,7 +1537,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
}
else
{
- nAdd = Max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace( true ) );
}
}
nUpper += nAdd;
@@ -1545,7 +1545,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
}
else
{
- nUpper = Max( static_cast<long>(nPrevLowerSpace),
+ nUpper = std::max( static_cast<long>(nPrevLowerSpace),
static_cast<long>(pAttrs->GetULSpace().GetUpper()) );
// OD 07.01.2004 #i11859# - consideration of the line spacing
// for the upper spacing of a text frame
@@ -1553,10 +1553,10 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
{
// former consideration
if ( pOwn->IsTxtFrm() )
- nUpper = Max( nUpper, ((SwTxtFrm*)pOwn)->GetLineSpace() );
+ nUpper = std::max( nUpper, ((SwTxtFrm*)pOwn)->GetLineSpace() );
if ( nPrevLineSpacing != 0 )
{
- nUpper = Max( nUpper, nPrevLineSpacing );
+ nUpper = std::max( nUpper, nPrevLineSpacing );
}
}
else
@@ -1583,7 +1583,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
}
else
{
- nAdd = Max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(rThis).GetLineSpace( true ) );
}
}
nUpper += nAdd;
@@ -1709,7 +1709,7 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPrevFrm() const
}
else
{
- nUpperSpaceAmountOfPrevFrm = Max( nPrevLowerSpace, nPrevLineSpacing );
+ nUpperSpaceAmountOfPrevFrm = std::max( nPrevLowerSpace, nPrevLineSpacing );
}
}
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 42890b9d051b..f72a1eeb4e4c 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -909,10 +909,10 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwRect aNew( GetObjRectWithSpaces() );
SwRect aOld( maFrm );
const SvxULSpaceItem &rUL = ((SwFmtChg*)pOld)->pChangedFmt->GetULSpace();
- aOld.Top( Max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
+ aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
aOld.SSize().Height()+= rUL.GetLower();
const SvxLRSpaceItem &rLR = ((SwFmtChg*)pOld)->pChangedFmt->GetLRSpace();
- aOld.Left ( Max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
+ aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
aOld.SSize().Width() += rLR.GetRight();
aNew.Union( aOld );
NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR );
@@ -1001,13 +1001,13 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( RES_UL_SPACE == nWhich )
{
const SvxULSpaceItem &rUL = *(SvxULSpaceItem*)pNew;
- aOld.Top( Max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
+ aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
aOld.SSize().Height()+= rUL.GetLower();
}
else
{
const SvxLRSpaceItem &rLR = *(SvxLRSpaceItem*)pNew;
- aOld.Left ( Max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
+ aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
aOld.SSize().Width() += rLR.GetRight();
}
aNew.Union( aOld );
@@ -1459,7 +1459,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
if ( nAutoWidth )
{
if( ATT_MIN_SIZE == rFrmSz.GetWidthSizeType() )
- nNewSize = Max( nNewSize - nLR, nAutoWidth );
+ nNewSize = std::max( nNewSize - nLR, nAutoWidth );
else
nNewSize = nAutoWidth;
}
@@ -1949,7 +1949,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
const SwFmtFrmSize& rFmtSize = GetFmt()->GetFrmSize();
SwTwips nFmtHeight = bVert ? rFmtSize.GetWidth() : rFmtSize.GetHeight();
- nVal = Min( nDist, nHeight - nFmtHeight );
+ nVal = std::min( nDist, nHeight - nFmtHeight );
}
if ( nVal <= 0L )
@@ -2501,15 +2501,15 @@ Size SwFlyFrm::CalcRel( const SwFmtFrmSize &rSz ) const
if ( nDiff > 0 )
nRelHeight -= nDiff;
}
- nRelWidth = Min( nRelWidth, pRel->Prt().Width() );
- nRelHeight = Min( nRelHeight, pRel->Prt().Height() );
+ nRelWidth = std::min( nRelWidth, pRel->Prt().Width() );
+ nRelHeight = std::min( nRelHeight, pRel->Prt().Height() );
if( !pRel->IsPageFrm() )
{
const SwPageFrm* pPage = FindPageFrm();
if( pPage )
{
- nRelWidth = Min( nRelWidth, pPage->Prt().Width() );
- nRelHeight = Min( nRelHeight, pPage->Prt().Height() );
+ nRelWidth = std::min( nRelWidth, pPage->Prt().Width() );
+ nRelHeight = std::min( nRelHeight, pPage->Prt().Height() );
}
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index d1bcb832c9b9..41057cdf31d2 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -917,10 +917,10 @@ static sal_uLong lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
{
//Calculate the distance between those two points.
//'delta' X^2 + 'delta' Y^2 = 'distance'^2
- sal_uInt32 dX = Max( pCnt->Frm().Left(), rPt.X() ) -
- Min( pCnt->Frm().Left(), rPt.X() ),
- dY = Max( pCnt->Frm().Top(), rPt.Y() ) -
- Min( pCnt->Frm().Top(), rPt.Y() );
+ sal_uInt32 dX = std::max( pCnt->Frm().Left(), rPt.X() ) -
+ std::min( pCnt->Frm().Left(), rPt.X() ),
+ dY = std::max( pCnt->Frm().Top(), rPt.Y() ) -
+ std::min( pCnt->Frm().Top(), rPt.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
const sal_uLong nDiff = ::SqRt( dX1 + dY1 );
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index e9522c1de9cd..fece11426d71 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -317,7 +317,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
if ( !pHeader || !pHeader->IsHeaderFrm() )
{
const long nOld = Frm().Top();
- Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() );
+ Frm().Pos().Y() = std::max( aClip.Top(), nClipBot - Frm().Height() );
if ( Frm().Top() != nOld )
bAgain = true;
bHeightClipped = sal_True;
@@ -326,7 +326,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
if ( bRig )
{
const long nOld = Frm().Left();
- Frm().Pos().X() = Max( aClip.Left(), nClipRig - Frm().Width() );
+ Frm().Pos().X() = std::max( aClip.Left(), nClipRig - Frm().Width() );
if ( Frm().Left() != nOld )
{
const SwFmtHoriOrient &rH = GetFmt()->GetHoriOrient();
@@ -441,7 +441,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const long nPrtWidthDiff = Frm().Width() - Prt().Width();
maUnclippedFrm = SwRect( Frm() );
Frm().Height( aFrmRect.Height() );
- Frm().Width ( Max( long(MINLAY), aFrmRect.Width() ) );
+ Frm().Width ( std::max( long(MINLAY), aFrmRect.Width() ) );
if ( Lower() && Lower()->IsColumnFrm() )
{
ColLock(); //lock grow/shrink
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 51ab0afe3b6e..6fcef9bfeb1d 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2873,8 +2873,8 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
{
SwRect aTmp( rOld );
aTmp.Union( aFrm );
- aTmp.Left( Min(aFrm.Left(), rOld.Left()) );
- aTmp.Right( Max(aFrm.Left(), rOld.Left()) );
+ aTmp.Left( std::min(aFrm.Left(), rOld.Left()) );
+ aTmp.Right( std::max(aFrm.Left(), rOld.Left()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
SwTwips nOld = rOld.Right();
@@ -2883,16 +2883,16 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
{
SwRect aTmp( rOld );
aTmp.Union( aFrm );
- aTmp.Left( Min(nNew, nOld) );
- aTmp.Right( Max(nNew, nOld) );
+ aTmp.Left( std::min(nNew, nOld) );
+ aTmp.Right( std::max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
if ( rOld.Top() != aFrm.Top() )
{
SwRect aTmp( rOld );
aTmp.Union( aFrm );
- aTmp.Top( Min(aFrm.Top(), rOld.Top()) );
- aTmp.Bottom( Max(aFrm.Top(), rOld.Top()) );
+ aTmp.Top( std::min(aFrm.Top(), rOld.Top()) );
+ aTmp.Bottom( std::max(aFrm.Top(), rOld.Top()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
nOld = rOld.Bottom();
@@ -2901,8 +2901,8 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
{
SwRect aTmp( rOld );
aTmp.Union( aFrm );
- aTmp.Top( Min(nNew, nOld) );
- aTmp.Bottom( Max(nNew, nOld) );
+ aTmp.Top( std::min(nNew, nOld) );
+ aTmp.Bottom( std::max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
}
@@ -3282,8 +3282,8 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell )
nLow += ((SwTxtFrm*)pLow)->GetParHeight()-pLow->Prt().Height();
else if( pLow->IsSctFrm() && ((SwSectionFrm*)pLow)->IsUndersized() )
nLow += ((SwSectionFrm*)pLow)->Undersize();
- nFlyAdd = Max( 0L, nFlyAdd - nLow );
- nFlyAdd = Max( nFlyAdd, ::CalcHeightWidthFlys( pLow ) );
+ nFlyAdd = std::max( 0L, nFlyAdd - nLow );
+ nFlyAdd = std::max( nFlyAdd, ::CalcHeightWidthFlys( pLow ) );
nHeight += nLow;
pLow = pLow->GetNext();
} while ( pLow );
@@ -3319,7 +3319,7 @@ SwTwips CalcRowRstHeight( SwLayoutFrm *pRow )
SwLayoutFrm *pLow = (SwLayoutFrm*)pRow->Lower();
while ( pLow )
{
- nRstHeight = Min( nRstHeight, ::lcl_CalcCellRstHeight( pLow ) );
+ nRstHeight = std::min( nRstHeight, ::lcl_CalcCellRstHeight( pLow ) );
pLow = (SwLayoutFrm*)pLow->GetNext();
}
return nRstHeight;
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 673f31046949..ff798b5a2818 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -288,7 +288,7 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)();
if( nPrtHeight < 0 )
{
- const SwTwips nTmpDiff = Max( (Prt().*fnRect->fnGetTop)(),
+ const SwTwips nTmpDiff = std::max( (Prt().*fnRect->fnGetTop)(),
-nPrtHeight );
(Prt().*fnRect->fnSubTop)( nTmpDiff );
}
@@ -344,7 +344,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
if ( pBoss->GetMaxFtnHeight() != LONG_MAX )
{
- nDist = Min( nDist, pBoss->GetMaxFtnHeight()
+ nDist = std::min( nDist, pBoss->GetMaxFtnHeight()
- (Frm().*fnRect->fnGetHeight)() );
if ( nDist <= 0 )
return 0L;
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 807a40b14c67..1753d8544e50 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -570,10 +570,10 @@ sal_uLong SwLayHelper::CalcPageCount()
nMaxParaPerPage = nNdCount / nPgCount;
else
{
- nMaxParaPerPage = Max( sal_uLong(20),
+ nMaxParaPerPage = std::max( sal_uLong(20),
sal_uLong(20 + nNdCount / 1000 * 3) );
const sal_uLong nMax = 53;
- nMaxParaPerPage = Min( nMaxParaPerPage, nMax );
+ nMaxParaPerPage = std::min( nMaxParaPerPage, nMax );
nPgCount = nNdCount / nMaxParaPerPage;
}
if ( nNdCount < 1000 )
@@ -716,7 +716,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
++nCnt;
pTmp = pTmp->GetNext();
} while( pTmp );
- nMaxRowPerPage = Max( sal_uLong(2), nMaxParaPerPage / nCnt );
+ nMaxRowPerPage = std::max( sal_uLong(2), nMaxParaPerPage / nCnt );
}
bLongTab = true;
}
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8c5429ab7743..5421332650bb 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -658,8 +658,8 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
((SwFmtChg*)pNew)->pChangedFmt->GetFrmSize() :
(const SwFmtFrmSize&)*pNew;
- Frm().Height( Max( rSz.GetHeight(), long(MINLAY) ) );
- Frm().Width ( Max( rSz.GetWidth(), long(MINLAY) ) );
+ Frm().Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
+ Frm().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
if ( GetUpper() )
static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( 0, 0 );
@@ -1769,7 +1769,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
((const SwTabFrm *)pFrm)->GetTable()
->GetHTMLTableLayout();
if ( pLayoutInfo )
- nWidth = Min( nWidth, pLayoutInfo->GetBrowseWidthMin() );
+ nWidth = std::min( nWidth, pLayoutInfo->GetBrowseWidthMin() );
switch ( rHori.GetHoriOrient() )
{
@@ -1784,7 +1784,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
break;
}
- nBrowseWidth = Max( nBrowseWidth, nWidth );
+ nBrowseWidth = std::max( nBrowseWidth, nWidth );
}
}
else if ( pFrm->GetDrawObjs() )
@@ -1843,7 +1843,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
break;
default: /* do nothing */;
}
- nBrowseWidth = Max( nBrowseWidth, nWidth );
+ nBrowseWidth = std::max( nBrowseWidth, nWidth );
}
}
pFrm = pFrm->FindNextCnt();
@@ -2193,7 +2193,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
nWidthRemain = nWidthRemain - nPageWidth;
nCurrentRowWidth = nCurrentRowWidth + nPageWidth;
- nCurrentRowHeight = Max( nCurrentRowHeight, nPageHeight );
+ nCurrentRowHeight = std::max( nCurrentRowHeight, nPageHeight );
pPageFrm = static_cast<SwPageFrm*>(pPageFrm->GetNext());
@@ -2307,8 +2307,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
const bool bLastColumn = pPageToAdjust->GetNext() == pEndOfRow;
const bool bLastRow = !pEndOfRow;
- nMinPageLeft = Min( nMinPageLeft, aNewPagePos.X() );
- nMaxPageRight = Max( nMaxPageRight, aNewPagePos.X() + nCurrentPageWidth);
+ nMinPageLeft = std::min( nMinPageLeft, aNewPagePos.X() );
+ nMaxPageRight = std::max( nMaxPageRight, aNewPagePos.X() + nCurrentPageWidth);
// border of nGapBetweenPages around the current page:
SwRect aPageRectWithBorders( aNewPagePos.X() - nGapBetweenPages,
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 3e5f308c0a02..45b0fd41214d 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -551,8 +551,8 @@ bool SwLineRect::MakeUnion( const SwRect &rRect )
if ( Bottom() + nAdd >= rRect.Top() &&
Top() - nAdd <= rRect.Bottom() )
{
- Bottom( Max( Bottom(), rRect.Bottom() ) );
- Top ( Min( Top(), rRect.Top() ) );
+ Bottom( std::max( Bottom(), rRect.Bottom() ) );
+ Top ( std::min( Top(), rRect.Top() ) );
return true;
}
}
@@ -566,8 +566,8 @@ bool SwLineRect::MakeUnion( const SwRect &rRect )
if ( Right() + nAdd >= rRect.Left() &&
Left() - nAdd <= rRect.Right() )
{
- Right( Max( Right(), rRect.Right() ) );
- Left ( Min( Left(), rRect.Left() ) );
+ Right( std::max( Right(), rRect.Right() ) );
+ Left ( std::min( Left(), rRect.Left() ) );
return true;
}
}
@@ -951,7 +951,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
if ( rLRect.IsLocked() )
{
- nMinCount = Min( nMinCount, i );
+ nMinCount = std::min( nMinCount, i );
continue;
}
@@ -1015,7 +1015,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
if ( rLRect.IsLocked() )
{
- nMinCount = Min( nMinCount, i );
+ nMinCount = std::min( nMinCount, i );
continue;
}
@@ -1312,7 +1312,7 @@ static long lcl_AlignWidth( const long nWidth )
const long nW = nWidth % nPixelSzW;
if ( !nW || nW > nHalfPixelSzW )
- return Max(1L, nWidth - nHalfPixelSzW);
+ return std::max(1L, nWidth - nHalfPixelSzW);
}
return nWidth;
}
@@ -1324,7 +1324,7 @@ static long lcl_AlignHeight( const long nHeight )
const long nH = nHeight % nPixelSzH;
if ( !nH || nH > nHalfPixelSzH )
- return Max(1L, nHeight - nHalfPixelSzH);
+ return std::max(1L, nHeight - nHalfPixelSzH);
}
return nHeight;
}
@@ -1333,7 +1333,7 @@ static long lcl_MinHeightDist( const long nDist )
{
if ( aScaleX < aMinDistScale || aScaleY < aMinDistScale )
return nDist;
- return ::lcl_AlignHeight( Max( nDist, nMinDistPixelH ));
+ return ::lcl_AlignHeight( std::max( nDist, nMinDistPixelH ));
}
//Calculate PrtArea plus surrounding plus shadow.
@@ -2374,8 +2374,8 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
// The following stuff if necessary to have the new table borders fit
// into a ::SwAlignRect adjusted world.
- const SwTwips nTwipXCorr = bVert ? 0 : Max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
- const SwTwips nTwipYCorr = !bVert ? 0 : Max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
+ const SwTwips nTwipXCorr = bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
+ const SwTwips nTwipYCorr = !bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
const SwFrm* pUpper = mrTabFrm.GetUpper();
SwRect aUpper( pUpper->Prt() );
aUpper.Pos() += pUpper->Frm().Pos();
@@ -2457,11 +2457,11 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
sal_uInt16 nSecn = aStyles[ i ].Secn();
if ( nPrim > 0 )
- nPrim = (sal_uInt16)( Max( 1L, nPixelSzH * ( nPrim / nPixelSzH ) ) );
+ nPrim = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nPrim / nPixelSzH ) ) );
if ( nDist > 0 )
- nDist = (sal_uInt16)( Max( 1L, nPixelSzH * ( nDist / nPixelSzH ) ) );
+ nDist = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nDist / nPixelSzH ) ) );
if ( nSecn > 0 )
- nSecn = (sal_uInt16)( Max( 1L, nPixelSzH * ( nSecn / nPixelSzH ) ) );
+ nSecn = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nSecn / nPixelSzH ) ) );
aStyles[ i ].Set( nPrim, nDist, nSecn );
}
@@ -5289,8 +5289,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( bGrid )
{
nY -= nGrid;
- SwTwips nPosY = Max( aInter.Left(), nY );
- SwTwips nHeight = Min(nRight, aTmp.Pos().X())-nPosY;
+ SwTwips nPosY = std::max( aInter.Left(), nY );
+ SwTwips nHeight = std::min(nRight, aTmp.Pos().X())-nPosY;
if( nHeight > 0 )
{
if( bCell )
@@ -5322,8 +5322,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
nY -= nRuby;
if( bBorder )
{
- SwTwips nPos = Max( aInter.Left(), nY );
- SwTwips nW = Min(nRight, aTmp.Pos().X()) - nPos;
+ SwTwips nPos = std::max( aInter.Left(), nY );
+ SwTwips nW = std::min(nRight, aTmp.Pos().X()) - nPos;
SwRect aVert( Point( nPos, aGrid.Top() ),
Size( nW, 1 ) );
if( nW > 0 )
@@ -5348,7 +5348,7 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
{
nY -= nGrid;
SwTwips nHeight = aTmp.Pos().X()
- - Max(aInter.Left(), nY );
+ - std::max(aInter.Left(), nY );
if( nHeight > 0 )
{
if( bCell )
@@ -5380,8 +5380,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
nY -= nRuby;
if( bBorder )
{
- SwTwips nPos = Max( aInter.Left(), nY );
- SwTwips nW = Min(nRight, aTmp.Pos().X()) - nPos;
+ SwTwips nPos = std::max( aInter.Left(), nY );
+ SwTwips nW = std::min(nRight, aTmp.Pos().X()) - nPos;
SwRect aVert( Point( nPos, aGrid.Top() ),
Size( nW, 1 ) );
if( nW > 0 )
@@ -5420,8 +5420,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( bGrid )
{
nY += nGrid;
- SwTwips nPosY = Max( aInter.Top(), aTmp.Pos().Y() );
- SwTwips nHeight = Min(nBottom, nY ) - nPosY;
+ SwTwips nPosY = std::max( aInter.Top(), aTmp.Pos().Y() );
+ SwTwips nHeight = std::min(nBottom, nY ) - nPosY;
if( nHeight )
{
if( bCell )
@@ -5453,8 +5453,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
nY += nRuby;
if( bBorder )
{
- SwTwips nPos = Max(aInter.Top(),aTmp.Pos().Y());
- SwTwips nH = Min( nBottom, nY ) - nPos;
+ SwTwips nPos = std::max(aInter.Top(),aTmp.Pos().Y());
+ SwTwips nH = std::min( nBottom, nY ) - nPos;
SwRect aVert( Point( aGrid.Left(), nPos ),
Size( 1, nH ) );
if( nH > 0 )
@@ -5478,7 +5478,7 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( bGrid )
{
nY += nGrid;
- SwTwips nHeight = Min(nBottom, nY) - aTmp.Pos().Y();
+ SwTwips nHeight = std::min(nBottom, nY) - aTmp.Pos().Y();
if( nHeight )
{
if( bCell )
@@ -5510,8 +5510,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
nY += nRuby;
if( bBorder )
{
- SwTwips nPos = Max(aInter.Top(),aTmp.Pos().Y());
- SwTwips nH = Min( nBottom, nY ) - nPos;
+ SwTwips nPos = std::max(aInter.Top(),aTmp.Pos().Y());
+ SwTwips nH = std::min( nBottom, nY ) - nPos;
SwRect aVert( Point( aGrid.Left(), nPos ),
Size( 1, nH ) );
if( nH > 0 )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 12d831bc34d4..dde50560d6d5 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -563,13 +563,13 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- nMinHeight = Max( nMinHeight, lcl_CalcTopAndBottomMargin( *(SwLayoutFrm*)pCell, rAttrs ) );
+ nMinHeight = std::max( nMinHeight, lcl_CalcTopAndBottomMargin( *(SwLayoutFrm*)pCell, rAttrs ) );
pCell = pCell->GetNext();
}
const SwFmtFrmSize &rSz = pTmpLastLineRow->GetFmt()->GetFrmSize();
if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE )
- nMinHeight = Max( nMinHeight, rSz.GetHeight() );
+ nMinHeight = std::max( nMinHeight, rSz.GetHeight() );
}
//
@@ -2741,7 +2741,7 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
const long nWidth = (*fnRect->fnXDiff)(
(aFlyRect.*fnRect->fnGetRight)(),
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetLeft)() );
- rLeftOffset = Max( rLeftOffset, nWidth );
+ rLeftOffset = std::max( rLeftOffset, nWidth );
bInvalidatePrtArea = sal_True;
}
if ( (SURROUND_LEFT == rSur.GetSurround() ||
@@ -2751,7 +2751,7 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
const long nWidth = (*fnRect->fnXDiff)(
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetRight)(),
(aFlyRect.*fnRect->fnGetLeft)() );
- rRightOffset = Max( rRightOffset, nWidth );
+ rRightOffset = std::max( rRightOffset, nWidth );
bInvalidatePrtArea = sal_True;
}
}
@@ -2798,7 +2798,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
nLeftOffset = 0;
if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
mbValidPrtArea = sal_False;
- long nRightOffset = Max( 0L, nTmpRight );
+ long nRightOffset = std::max( 0L, nTmpRight );
SwTwips nLower = pAttrs->CalcBottomLine();
// #i29550#
@@ -2853,7 +2853,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// surrounding fly frames on the right
// -> right indent is maximun of given right offset
// and wished right offset.
- nRightSpacing = nRightLine + Max( nRightOffset, nWishRight );
+ nRightSpacing = nRightLine + std::max( nRightOffset, nWishRight );
}
else
{
@@ -2865,7 +2865,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
nRightSpacing = nRightLine +
( ( (nWishRight+nLeftOffset) < 0 ) ?
(nWishRight+nLeftOffset) :
- Max( 0L, nWishRight ) );
+ std::max( 0L, nWishRight ) );
}
}
break;
@@ -2884,7 +2884,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// surrounding fly frames on the left
// -> right indent is maximun of given left offset
// and wished left offset.
- nLeftSpacing = nLeftLine + Max( nLeftOffset, nWishLeft );
+ nLeftSpacing = nLeftLine + std::max( nLeftOffset, nWishLeft );
}
else
{
@@ -2896,7 +2896,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
nLeftSpacing = nLeftLine +
( ( (nWishLeft+nRightOffset) < 0 ) ?
(nWishLeft+nRightOffset) :
- Max( 0L, nWishLeft ) );
+ std::max( 0L, nWishLeft ) );
}
}
break;
@@ -2907,11 +2907,11 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
const SwTwips nCenterSpacing = ( nMax - nWishedTableWidth ) / 2;
nLeftSpacing = nLeftLine +
( (nLeftOffset > 0) ?
- Max( nCenterSpacing, nLeftOffset ) :
+ std::max( nCenterSpacing, nLeftOffset ) :
nCenterSpacing );
nRightSpacing = nRightLine +
( (nRightOffset > 0) ?
- Max( nCenterSpacing, nRightOffset ) :
+ std::max( nCenterSpacing, nRightOffset ) :
nCenterSpacing );
}
break;
@@ -2934,7 +2934,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// they overlap with the table.
// Thus, take maximun of left spacing and left offset.
// OD 10.03.2003 #i9040# - consider left line attribute.
- nLeftSpacing = Max( nLeftSpacing, ( nLeftOffset + nLeftLine ) );
+ nLeftSpacing = std::max( nLeftSpacing, ( nLeftOffset + nLeftLine ) );
}
// OD 23.01.2003 #106895# - add 1st param to <SwBorderAttrs::CalcRight(..)>
nRightSpacing = pAttrs->CalcRight( this );
@@ -2944,7 +2944,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// they overlap with the table.
// Thus, take maximun of right spacing and right offset.
// OD 10.03.2003 #i9040# - consider right line attribute.
- nRightSpacing = Max( nRightSpacing, ( nRightOffset + nRightLine ) );
+ nRightSpacing = std::max( nRightSpacing, ( nRightOffset + nRightLine ) );
}
}
break;
@@ -2960,14 +2960,14 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// they overlap with the table.
// Thus, take maximun of right spacing and right offset.
// OD 10.03.2003 #i9040# - consider left line attribute.
- nLeftSpacing = Max( nLeftSpacing, ( pAttrs->CalcLeftLine() + nLeftOffset ) );
+ nLeftSpacing = std::max( nLeftSpacing, ( pAttrs->CalcLeftLine() + nLeftOffset ) );
}
// OD 10.03.2003 #i9040# - consider right and left line attribute.
const SwTwips nWishRight =
nMax - (nLeftSpacing-pAttrs->CalcLeftLine()) - nWishedTableWidth;
nRightSpacing = nRightLine +
( (nRightOffset > 0) ?
- Max( nWishRight, nRightOffset ) :
+ std::max( nWishRight, nRightOffset ) :
nWishRight );
}
break;
@@ -3000,7 +3000,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
long nWidth = pSh->GetBrowseWidth();
nWidth -= Prt().Left();
nWidth -= pAttrs->CalcRightLine();
- Prt().Width( Min( nWidth, Prt().Width() ) );
+ Prt().Width( std::min( nWidth, Prt().Width() ) );
}
if ( nOldHeight != (Prt().*fnRect->fnGetHeight)() )
@@ -3067,7 +3067,7 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
if ( IsRestrictTableGrowth() )
{
- nTmp = Min( nDist, nReal + nTmp );
+ nTmp = std::min( nDist, nReal + nTmp );
nDist = nTmp < 0 ? 0 : nTmp;
}
}
@@ -3415,7 +3415,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r
long nOldWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
SWRECTFNX( pNewUpper );
long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)();
- if( Abs( nNewWidth - nOldWidth ) < 2 )
+ if( std::abs( nNewWidth - nOldWidth ) < 2 )
{
if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) )
{
@@ -3835,7 +3835,7 @@ long CalcHeightWidthFlys( const SwFrm *pFrm )
(pTmp->Frm().*fnRect->fnGetTop)(),
(pFrm->Frm().*fnRect->fnGetTop)() );
- nHeight = Max( nHeight, nDistOfFlyBottomToAnchorTop + nFrmDiff -
+ nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrmDiff -
(pFrm->Frm().*fnRect->fnGetHeight)() );
// #i56115# The first height calculation
@@ -3849,7 +3849,7 @@ long CalcHeightWidthFlys( const SwFrm *pFrm )
(pAnchoredObj->GetObjRect().*fnRect->fnGetBottom)(),
(pFrm->Frm().*fnRect->fnGetBottom)() );
- nHeight = Max( nHeight, nDistOfFlyBottomToAnchorTop2 );
+ nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop2 );
}
}
}
@@ -3925,8 +3925,8 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
// #i26945#
if ( _bConsiderObjs )
{
- nFlyAdd = Max( 0L, nFlyAdd - nLowHeight );
- nFlyAdd = Max( nFlyAdd, ::CalcHeightWidthFlys( pLow ) );
+ nFlyAdd = std::max( 0L, nFlyAdd - nLowHeight );
+ nFlyAdd = std::max( nFlyAdd, ::CalcHeightWidthFlys( pLow ) );
}
}
@@ -4006,7 +4006,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
pLow = static_cast<const SwCellFrm*>(pLow->GetNext());
}
if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE && !_pRow->IsRowSpanLine() )
- nHeight = Max( nHeight, rSz.GetHeight() );
+ nHeight = std::max( nHeight, rSz.GetHeight() );
return nHeight;
}
@@ -4028,7 +4028,7 @@ static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpTopSpace = rBoxItem.CalcLineSpace( BOX_LINE_TOP, sal_True );
}
- nTopSpace = Max( nTopSpace, nTmpTopSpace );
+ nTopSpace = std::max( nTopSpace, nTmpTopSpace );
}
return nTopSpace;
}
@@ -4049,7 +4049,7 @@ static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpTopLineDist = rBoxItem.GetDistance( BOX_LINE_TOP );
}
- nTopLineDist = Max( nTopLineDist, nTmpTopLineDist );
+ nTopLineDist = std::max( nTopLineDist, nTmpTopLineDist );
}
return nTopLineDist;
}
@@ -4074,7 +4074,7 @@ static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
nTmpBottomLineSize = rBoxItem.CalcLineSpace( BOX_LINE_BOTTOM, sal_True ) -
rBoxItem.GetDistance( BOX_LINE_BOTTOM );
}
- nBottomLineSize = Max( nBottomLineSize, nTmpBottomLineSize );
+ nBottomLineSize = std::max( nBottomLineSize, nTmpBottomLineSize );
}
return nBottomLineSize;
}
@@ -4098,7 +4098,7 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpBottomLineDist = rBoxItem.GetDistance( BOX_LINE_BOTTOM );
}
- nBottomLineDist = Max( nBottomLineDist, nTmpBottomLineDist );
+ nBottomLineDist = std::max( nBottomLineDist, nTmpBottomLineDist );
}
return nBottomLineDist;
}
@@ -4447,7 +4447,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
(Frm().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() );
if ( bRestrictTableGrowth && nAdditionalSpace > 0 )
{
- nReal = Min( nAdditionalSpace, nDist );
+ nReal = std::min( nAdditionalSpace, nDist );
nDist -= nReal;
if ( !bTst )
(Frm().*fnRect->fnAddBottom)( nReal );
@@ -5589,7 +5589,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
if ( 1 == pLower2->GetTabBox()->getRowSpan() )
{
const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, sal_True );
- nMaxHeight = Max( nCellHeight, nMaxHeight );
+ nMaxHeight = std::max( nCellHeight, nMaxHeight );
}
pLower2 = static_cast<const SwCellFrm*>(pLower2->GetNext());
}
@@ -5616,7 +5616,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
const SwTwips nMinRowHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
rSz.GetHeight() : 0;
- nTmpHeight += Max( nHeightOfFirstContentLine, nMinRowHeight );
+ nTmpHeight += std::max( nHeightOfFirstContentLine, nMinRowHeight );
if ( !bOldJoinLock )
((SwTabFrm*)this)->UnlockJoin();
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 8f4f0bef6a7e..eee460fa5041 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -204,10 +204,10 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
// check, if we have to adjust the point
if ( !Frm().IsInside( aPoint ) )
{
- aPoint.X() = Max( aPoint.X(), Frm().Left() );
- aPoint.X() = Min( aPoint.X(), Frm().Right() );
- aPoint.Y() = Max( aPoint.Y(), Frm().Top() );
- aPoint.Y() = Min( aPoint.Y(), Frm().Bottom() );
+ aPoint.X() = std::max( aPoint.X(), Frm().Left() );
+ aPoint.X() = std::min( aPoint.X(), Frm().Right() );
+ aPoint.Y() = std::max( aPoint.Y(), Frm().Top() );
+ aPoint.Y() = std::min( aPoint.Y(), Frm().Bottom() );
}
sal_Bool bTextRet, bBackRet = sal_False;
@@ -1197,10 +1197,10 @@ sal_uLong CalcDiff( const Point &rPt1, const Point &rPt2 )
{
//Jetzt die Entfernung zwischen den beiden Punkten berechnen.
//'Delta' X^2 + 'Delta'Y^2 = 'Entfernung'^2
- sal_uInt32 dX = Max( rPt1.X(), rPt2.X() ) -
- Min( rPt1.X(), rPt2.X() ),
- dY = Max( rPt1.Y(), rPt2.Y() ) -
- Min( rPt1.Y(), rPt2.Y() );
+ sal_uInt32 dX = std::max( rPt1.X(), rPt2.X() ) -
+ std::min( rPt1.X(), rPt2.X() ),
+ dY = std::max( rPt1.Y(), rPt2.Y() ) -
+ std::min( rPt1.Y(), rPt2.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
return ::SqRt( dX1 + dY1 );
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 8c65279a6921..de45f50dad6e 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1384,7 +1384,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
if ( nDiff > 0 )
{
nChg = BROWSE_HEIGHT - pUp->Frm().Height();
- nChg = Min( nDiff, nChg );
+ nChg = std::min( nDiff, nChg );
if ( !IsBodyFrm() )
{
@@ -1396,7 +1396,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
const long nTmp = nChg - pBody->Prt().Height();
if ( !bTst )
{
- pBody->Frm().Height(Max( 0L, pBody->Frm().Height() - nChg ));
+ pBody->Frm().Height(std::max( 0L, pBody->Frm().Height() - nChg ));
pBody->_InvalidatePrt();
pBody->_InvalidateSize();
if ( pBody->GetNext() )
@@ -3136,7 +3136,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
pFrm = pFrm->GetNext();
}
nRemaining += nBorder;
- nRemaining = Max( nRemaining, nMinHeight );
+ nRemaining = std::max( nRemaining, nMinHeight );
const SwTwips nDiff = nRemaining-(Frm().*fnRect->fnGetHeight)();
const long nOldLeft = (Frm().*fnRect->fnGetLeft)();
const long nOldTop = (Frm().*fnRect->fnGetTop)();
@@ -3267,7 +3267,7 @@ long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const
if ( nDiff > 0 )
nRel -= nDiff;
}
- nRel = Min( nRel, pRel->Prt().Width() );
+ nRel = std::min( nRel, pRel->Prt().Width() );
nRet = nRel * nPercent / 100;
}
return nRet;
@@ -3294,7 +3294,7 @@ static long lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
if ( pCol == pLayFrm->Lower() )
nFirstDiff = nTmp;
else
- nDiff = nDiff ? Min( nDiff, nTmp ) : nTmp;
+ nDiff = nDiff ? std::min( nDiff, nTmp ) : nTmp;
}
}
//Skip empty columns!
@@ -3565,7 +3565,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
nDiff = nMinDiff;
// If we should grow more than by nMinDiff we split it over
// the columns
- if ( Abs(nDiff - nMinDiff) > nNumCols && nDiff > (long)nNumCols )
+ if ( std::abs(nDiff - nMinDiff) > nNumCols && nDiff > (long)nNumCols )
nDiff /= nNumCols;
if ( bMinDiff )
@@ -3576,7 +3576,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// nMinDiff afterwards.
long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
if ( nFrmHeight > nMinHeight || nPrtHeight >= nMinDiff )
- nDiff = Max( nDiff, nMinDiff );
+ nDiff = std::max( nDiff, nMinDiff );
else if( nDiff < nMinDiff )
nDiff = nMinDiff - nPrtHeight + 1;
}