diff options
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/framelink.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/hdft.cxx | 10 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 60 | ||||
-rw-r--r-- | svx/source/dialog/swframeexample.cxx | 6 |
8 files changed, 51 insertions, 51 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index ac134b8282fd..d932210f3a96 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -786,16 +786,16 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) nTol = ( pTols[i] * 255L ) / 100L; nVal = ( (long) pSrcCols[i].GetRed() ); - pMinR[i] = Max( nVal - nTol, 0L ); - pMaxR[i] = Min( nVal + nTol, 255L ); + pMinR[i] = std::max( nVal - nTol, 0L ); + pMaxR[i] = std::min( nVal + nTol, 255L ); nVal = ( (long) pSrcCols[i].GetGreen() ); - pMinG[i] = Max( nVal - nTol, 0L ); - pMaxG[i] = Min( nVal + nTol, 255L ); + pMinG[i] = std::max( nVal - nTol, 0L ); + pMaxG[i] = std::min( nVal + nTol, 255L ); nVal = ( (long) pSrcCols[i].GetBlue() ); - pMinB[i] = Max( nVal - nTol, 0L ); - pMaxB[i] = Min( nVal + nTol, 255L ); + pMinB[i] = std::max( nVal - nTol, 0L ); + pMaxB[i] = std::min( nVal + nTol, 255L ); pTrans[ i ] = ( pDstCols[ i ] == TRANSP_COL ); } diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index d5007a275807..681d1c62ba92 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -1743,7 +1743,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() if ( nTxtW >= nBtnW ) { const long nMinDelta = 10; - long nDelta = Max( nTxtW - nBtnW, nMinDelta ); + long nDelta = std::max( nTxtW - nBtnW, nMinDelta ); sal_uInt32 i = 0; Window* pWins[] = { @@ -2043,12 +2043,12 @@ void BrokenRecoveryDialog::impl_askForSavePath() Size aBtnSz = maOKBtn.GetSizePixel(); Point aEditPnt = maContentML.GetPosPixel(); - long nNewHeight = Max( aWinSz.Height() - aEditPnt.Y() - 3 * a3Sz.Height() - aBtnSz.Height(), mnMinHeight ); + long nNewHeight = std::max( aWinSz.Height() - aEditPnt.Y() - 3 * a3Sz.Height() - aBtnSz.Height(), mnMinHeight ); long nNewWidth = aWinSz.Width() - 4 * a3Sz.Width(); Size aNewSize( nNewWidth, nNewHeight ); maContentML.SetSizePixel( aNewSize ); - Point aNewPoint( Max( aEditPnt.X() + aNewSize.Width() - aBtnSz.Width(), aEditPnt.X() ), + Point aNewPoint( std::max( aEditPnt.X() + aNewSize.Width() - aBtnSz.Width(), aEditPnt.X() ), aEditPnt.Y() + aNewSize.Height() + a3Sz.Height() ); maOKBtn.SetPosPixel( aNewPoint ); } diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 43811e395e7e..20fdd3f68c3d 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -1264,7 +1264,7 @@ bool operator<( const Style& rL, const Style& rR ) double GetHorDiagAngle( long nWidth, long nHeight ) { - return atan2( static_cast< double >( Abs( nHeight ) ), static_cast< double >( Abs( nWidth ) ) ); + return atan2( static_cast< double >( std::abs( nHeight ) ), static_cast< double >( std::abs( nWidth ) ) ); } // ============================================================================ diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 1db80abc1fb3..f680f43510ee 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -331,7 +331,7 @@ void FrameSelectorImpl::InitGlobalGeometry() /* nMinSize is the lower of width and height (control will always be squarish). FRAMESEL_GEOM_OUTER is the minimal distance between inner control border and any element. */ - long nMinSize = Min( aCtrlSize.Width(), aCtrlSize.Height() ) - 2 * FRAMESEL_GEOM_OUTER; + long nMinSize = std::min( aCtrlSize.Width(), aCtrlSize.Height() ) - 2 * FRAMESEL_GEOM_OUTER; /* nFixedSize is the size all existing elements need in one direction: the diag. arrow, space betw. arrow and frame border, outer frame border, inner frame border, other outer frame border, space betw. frame border diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index f864f4ed760f..e0097e671f4c 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -877,7 +877,7 @@ IMPL_LINK_NOARG(SvxHFPage, RangeHdl) long nFHeight = m_pBspWin->GetFtHeight(); long nFDist = m_pBspWin->GetFtDist(); - long nHeight = Max( (long)MINBODY, + long nHeight = std::max( (long)MINBODY, static_cast<long>(m_pHeightEdit->Denormalize( m_pHeightEdit->GetValue( FUNIT_TWIP ) ) ) ); long nDist = m_pTurnOnBox->IsChecked() ? static_cast<long>(m_pDistEdit->Denormalize( m_pDistEdit->GetValue( FUNIT_TWIP ) )) : 0; @@ -910,11 +910,11 @@ IMPL_LINK_NOARG(SvxHFPage, RangeHdl) { // Header nMin = ( nH - nBB - nBT ) / 5; // 20% - nMax = Max( nH - nMin - nHDist - nFDist - nFHeight - nBB - nBT, + nMax = std::max( nH - nMin - nHDist - nFDist - nFHeight - nBB - nBT, nMin ); m_pHeightEdit->SetMax( m_pHeightEdit->Normalize( nMax ), FUNIT_TWIP ); nMin = ( nH - nBB - nBT ) / 5; // 20% - nDist = Max( nH - nMin - nHHeight - nFDist - nFHeight - nBB - nBT, + nDist = std::max( nH - nMin - nHHeight - nFDist - nFHeight - nBB - nBT, long(0) ); m_pDistEdit->SetMax( m_pDistEdit->Normalize( nDist ), FUNIT_TWIP ); } @@ -922,11 +922,11 @@ IMPL_LINK_NOARG(SvxHFPage, RangeHdl) { // Footer nMin = ( nH - nBT - nBB ) / 5; // 20% - nMax = Max( nH - nMin - nFDist - nHDist - nHHeight - nBT - nBB, + nMax = std::max( nH - nMin - nFDist - nHDist - nHHeight - nBT - nBB, nMin ); m_pHeightEdit->SetMax( m_pHeightEdit->Normalize( nMax ), FUNIT_TWIP ); nMin = ( nH - nBT - nBB ) / 5; // 20% - nDist = Max( nH - nMin - nFHeight - nHDist - nHHeight - nBT - nBB, + nDist = std::max( nH - nMin - nFHeight - nHDist - nHHeight - nBT - nBB, long(0) ); m_pDistEdit->SetMax( m_pDistEdit->Normalize( nDist ), FUNIT_TWIP ); } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 9e7296061f1f..ee4f809432ec 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -676,7 +676,7 @@ void SvxSearchDialog::InitControls_Impl() LINK( this, SvxSearchDialog, AttributeHdl_Impl ) ); // check if buttontext is to wide - long nTxtW = Max( pMoreBtn->GetCtrlTextWidth( pMoreBtn->GetMoreText() ), + long nTxtW = std::max( pMoreBtn->GetCtrlTextWidth( pMoreBtn->GetMoreText() ), pMoreBtn->GetCtrlTextWidth( pMoreBtn->GetLessText() ) ); nTxtW += ( pMoreBtn->GetTextHeight() * 2 ); // add image size + offset long nBtnW = pMoreBtn->GetSizePixel().Width(); @@ -684,7 +684,7 @@ void SvxSearchDialog::InitControls_Impl() { // broaden the button const long nMinDelta = 10; - long nDelta = Max( nTxtW - nBtnW, nMinDelta ); + long nDelta = std::max( nTxtW - nBtnW, nMinDelta ); Size aNewSize = pMoreBtn->GetSizePixel(); aNewSize.Width() += nDelta; pMoreBtn->SetSizePixel( aNewSize ); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 24f856f09de0..e8fd30c46d88 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1948,7 +1948,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(pRuler_Imp->lLastLMargin)) { long l = pBorders[i].nPos; pBorders[i].nPos += lDiff; - pBorders[i].nPos = Min(pBorders[i].nPos, nRight - pBorders[i].nWidth); + pBorders[i].nPos = std::min(pBorders[i].nPos, nRight - pBorders[i].nWidth); nRight = pBorders[i].nPos - lMinFrame; // RR update the column if(i == GetActRightColumn()) @@ -2172,7 +2172,7 @@ void SvxRuler::ApplyMargins() else pLRSpaceItem->SetRight( PixelHAdjust( - Max((long)0,pPagePosItem->GetWidth() - + std::max((long)0,pPagePosItem->GetWidth() - pLRSpaceItem->GetLeft() - (ConvertHPosLogic(GetMargin2()) - lAppNullOffset)),pLRSpaceItem->GetRight())); @@ -2192,7 +2192,7 @@ void SvxRuler::ApplyMargins() lAppNullOffset += lLogicNullOffset - lOldNull; pULSpaceItem->SetLower( PixelVAdjust( - Max((long)0, pPagePosItem->GetHeight() - + std::max((long)0, pPagePosItem->GetHeight() - pULSpaceItem->GetUpper() - (ConvertVPosLogic(GetMargin2()) - lAppNullOffset)),pULSpaceItem->GetLower())); @@ -2688,8 +2688,8 @@ void SvxRuler::Click() sal_Bool bContentProtected = pRuler_Imp->aProtectItem.IsCntntProtected(); if( bContentProtected ) return; const long lPos = GetClickPos(); - if((bRTL && lPos < Min(GetFirstLineIndent(), GetLeftIndent()) && lPos > GetRightIndent()) || - (!bRTL && lPos > Min(GetFirstLineIndent(), GetLeftIndent()) && lPos < GetRightIndent())) + if((bRTL && lPos < std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos > GetRightIndent()) || + (!bRTL && lPos > std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos < GetRightIndent())) { //convert position in left-to-right text long nTabPos; @@ -2758,13 +2758,13 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxRight = lNullPix - GetRightIndent() + - Max(GetFirstLineIndent(), GetLeftIndent()) - + std::max(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; } else { nMaxRight = lNullPix + GetRightIndent() - - Max(GetFirstLineIndent(), GetLeftIndent()) - + std::max(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; } } @@ -2806,22 +2806,22 @@ void SvxRuler::CalcMinMax() { if(bRTL) { - nMaxRight += Min( + nMaxRight += std::min( pBorders[0].nPos, - Max(GetFirstLineIndent(), GetLeftIndent()) - GetRightIndent()); + std::max(GetFirstLineIndent(), GetLeftIndent()) - GetRightIndent()); } else { - nMaxRight += Min( + nMaxRight += std::min( pBorders[0].nPos, GetRightIndent() - - Max(GetFirstLineIndent(), GetLeftIndent())); + std::max(GetFirstLineIndent(), GetLeftIndent())); } } else if( pColumnItem->Count() > 1 ) nMaxRight += pBorders[0].nPos; else nMaxRight +=GetRightIndent() - - Max(GetFirstLineIndent(), GetLeftIndent()); + std::max(GetFirstLineIndent(), GetLeftIndent()); // Do not drag the left table edge over the edge of the page if(pLRSpaceItem&&pColumnItem->IsTable()) { @@ -2846,13 +2846,13 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxLeft = GetMargin2() + GetRightIndent() - - Max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+ + std::max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+ lMinFrame + lNullPix; } else { nMaxLeft = GetMargin2() - GetRightIndent() + - Max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+ + std::max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+ lMinFrame + lNullPix; } } @@ -2891,13 +2891,13 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxLeft = lMinFrame + lNullPix + GetMargin2() + - GetRightIndent() - Max(GetFirstLineIndent(), + GetRightIndent() - std::max(GetFirstLineIndent(), GetLeftIndent()); } else { nMaxLeft = lMinFrame + lNullPix + GetMargin2() - - GetRightIndent() + Max(GetFirstLineIndent(), + GetRightIndent() + std::max(GetFirstLineIndent(), GetLeftIndent()); } } @@ -2907,7 +2907,7 @@ void SvxRuler::CalcMinMax() lMinFrame + lNullPix + pBorders[pColumnItem->Count()-2].nPos + pBorders[pColumnItem->Count()-2].nWidth; - nMaxLeft=Max(nMaxLeft,nNewMaxLeft); + nMaxLeft=std::max(nMaxLeft,nNewMaxLeft); } } @@ -2933,13 +2933,13 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxLeft += pBorders[nIdx].nPos + - GetRightIndent() - Max(GetFirstLineIndent(), + GetRightIndent() - std::max(GetFirstLineIndent(), GetLeftIndent()); } else { nMaxLeft += pBorders[nIdx].nPos - - GetRightIndent() + Max(GetFirstLineIndent(), + GetRightIndent() + std::max(GetFirstLineIndent(), GetLeftIndent()); } if(0 != nIdx) @@ -3023,7 +3023,7 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxLeft += pBorders[nIdx].nPos + - GetRightIndent() - Max(GetFirstLineIndent(), + GetRightIndent() - std::max(GetFirstLineIndent(), GetLeftIndent()); if(nActLeftCol!=USHRT_MAX) nMaxLeft -= pBorders[nActLeftCol].nPos + @@ -3032,7 +3032,7 @@ void SvxRuler::CalcMinMax() else { nMaxLeft += pBorders[nIdx].nPos - - GetRightIndent() + Max(GetFirstLineIndent(), + GetRightIndent() + std::max(GetFirstLineIndent(), GetLeftIndent()); if(nActLeftCol!=USHRT_MAX) nMaxLeft -= pBorders[nActLeftCol].nPos + @@ -3065,14 +3065,14 @@ void SvxRuler::CalcMinMax() { nMaxRight -= GetMargin2() + GetRightIndent() - - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); } else { nMaxRight -= GetMargin2() - GetRightIndent() + - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); } nMaxRight += pBorders[nIdx].nPos + @@ -3094,13 +3094,13 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxRight -= nBorder + GetRightIndent() - - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); } else { nMaxRight -= nBorder - GetRightIndent() + - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); } nMaxRight += pBorders[nIdx].nPos + @@ -3139,7 +3139,7 @@ void SvxRuler::CalcMinMax() if(pColumnItem->IsLastAct()) { nMaxRight -= GetMargin2() - GetRightIndent() + - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); nMaxRight += pBorders[nIdx].nPos + pBorders[nIdx].nWidth; @@ -3149,7 +3149,7 @@ void SvxRuler::CalcMinMax() nMaxRight = lNullPix + pBorders[nIdx+1].nPos; if(pColumnItem->GetActColumn()-1 == nIdx) { nMaxRight -= pBorders[nIdx+1].nPos - GetRightIndent() + - Max(GetFirstLineIndent(), + std::max(GetFirstLineIndent(), GetLeftIndent()); nMaxRight += pBorders[nIdx].nPos + pBorders[nIdx].nWidth; @@ -3217,7 +3217,7 @@ void SvxRuler::CalcMinMax() if(bRTL) { nMaxLeft = lNullPix; - nMaxRight = lNullPix + Min(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; + nMaxRight = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; if(pColumnItem) { sal_uInt16 nRightCol=GetActRightColumn( sal_True ); @@ -3233,7 +3233,7 @@ void SvxRuler::CalcMinMax() else { nMaxLeft = lNullPix + - Max(GetFirstLineIndent(), GetLeftIndent()); + std::max(GetFirstLineIndent(), GetLeftIndent()); nMaxRight = lNullPix; if(pColumnItem) { @@ -3258,7 +3258,7 @@ void SvxRuler::CalcMinMax() right = NOf + RAR */ nMaxLeft = bRTL ? lNullPix + GetRightIndent() - : lNullPix + Min(GetFirstLineIndent(), GetLeftIndent()); + : lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()); pRuler_Imp->lMaxRightLogic=GetLogicRightIndent()+lLogicNullOffset; nMaxRight = ConvertSizePixel(pRuler_Imp->lMaxRightLogic); break; diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 2dfdebe603a8..740fef4c738e 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -202,15 +202,15 @@ void SvxSwFrameExample::InitAllRects_Impl() aFrmSize = Size(nLBorder - 3, (aTextLine.GetHeight() + 2) * 3); break; } - aFrmSize.Width() = Max(5L, aFrmSize.Width()); - aFrmSize.Height() = Max(5L, aFrmSize.Height()); + aFrmSize.Width() = std::max(5L, aFrmSize.Width()); + aFrmSize.Height() = std::max(5L, aFrmSize.Height()); } else { sal_uIntPtr nFreeWidth = aPagePrtArea.GetWidth() - GetTextWidth(OUString(DEMOTEXT)); aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3); - aDrawObj.SetSize(Size(Max(5L, (long)nFreeWidth / 3L), Max(5L, aFrmSize.Height() * 3L))); + aDrawObj.SetSize(Size(std::max(5L, (long)nFreeWidth / 3L), std::max(5L, aFrmSize.Height() * 3L))); aDrawObj.SetPos(Point(aParaPrtArea.Right() + 1, aParaPrtArea.Bottom() / 2)); aParaPrtArea.Right() = aDrawObj.Right(); } |