diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-04-11 00:21:40 -0300 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-20 11:09:54 +0000 |
commit | 0f200cc30ea75fdce59f7bb6ae87ebc85729e2a4 (patch) | |
tree | 2e2c28f9500f81825cdadcbabd131da767ddbb49 /sd/source/ui/view | |
parent | 5414a3eecdb09be928313477792acfe1d3534645 (diff) |
fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO.
Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/drtxtob.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsb.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/grviewsh.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 4 |
12 files changed, 27 insertions, 27 deletions
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 25eb71a565df..2ba19abff3d4 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -439,7 +439,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) { const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16)nPara ); const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) rItems.Get( EE_PARA_ULSPACE ); - nUpper = Max( nUpper, (long)rItem.GetUpper() ); + nUpper = std::max( nUpper, (long)rItem.GetUpper() ); } if( nUpper == 0L ) rSet.DisableItem( SID_PARASPACE_DECREASE ); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 2d6b18aba829..f550f9d99967 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -158,7 +158,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nUpper -= 100; - nUpper = Max( (long) nUpper, 0L ); + nUpper = std::max( (long) nUpper, 0L ); } pNewItem->SetUpper( (sal_uInt16) nUpper ); @@ -168,7 +168,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nLower -= 100; - nLower = Max( (long) nLower, 0L ); + nLower = std::max( (long) nLower, 0L ); } pNewItem->SetLower( (sal_uInt16) nLower ); @@ -199,7 +199,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nUpper -= 100; - nUpper = Max( (long) nUpper, 0L ); + nUpper = std::max( (long) nUpper, 0L ); } pNewItem->SetUpper( (sal_uInt16) nUpper ); @@ -209,7 +209,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nLower -= 100; - nLower = Max( (long) nLower, 0L ); + nLower = std::max( (long) nLower, 0L ); } pNewItem->SetLower( (sal_uInt16) nLower ); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index c69c2efae8a2..8166e9b63af9 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -587,7 +587,7 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab ) - maTabControl.GetPosPixel().X() ; Size aTabSize = maTabControl.GetSizePixel(); - aTabSize.Width() = Min(pTab->GetSplitSize(), (long)(nMax-1)); + aTabSize.Width() = std::min(pTab->GetSplitSize(), (long)(nMax-1)); maTabControl.SetSizePixel(aTabSize); GetLayerTabControl()->SetSizePixel(aTabSize); @@ -635,7 +635,7 @@ void DrawViewShell::ResetActualPage() sal_uInt16 nCurrentPage = maTabControl.GetCurPageId() - 1; sal_uInt16 nPageCount = (meEditMode == EM_PAGE)?GetDoc()->GetSdPageCount(mePageKind):GetDoc()->GetMasterSdPageCount(mePageKind); if (nPageCount > 0) - nCurrentPage = Min((sal_uInt16)(nPageCount - 1), nCurrentPage); + nCurrentPage = std::min((sal_uInt16)(nPageCount - 1), nCurrentPage); else nCurrentPage = 0; diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index d9cee3c2af1f..94dba94af530 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -507,8 +507,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) } else { - long nLeft = Max(0L, rLRSpace.GetLeft() - aPagePos.X()); - long nRight = Max(0L, rLRSpace.GetRight() + aPagePos.X() + + long nLeft = std::max(0L, rLRSpace.GetLeft() - aPagePos.X()); + long nRight = std::max(0L, rLRSpace.GetRight() + aPagePos.X() + aPageSize.Width() - aViewSize.Width()); sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); @@ -565,8 +565,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) } else { - long nUpper = Max(0L, rULSpace.GetUpper() - aPagePos.Y()); - long nLower = Max(0L, rULSpace.GetLower() + aPagePos.Y() + + long nUpper = std::max(0L, rULSpace.GetUpper() - aPagePos.Y()); + long nLower = std::max(0L, rULSpace.GetLower() + aPagePos.Y() + aPageSize.Height() - aViewSize.Height()); sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index a3fe056e496c..54862dfddb38 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -184,7 +184,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) if ( aPrevLayer == aName ) { - nPrevLayer = Max(nLayer, (sal_uInt16) 4); + nPrevLayer = std::max(nLayer, (sal_uInt16) 4); } } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 023766a8a3b5..70f36e437e2a 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1116,7 +1116,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_ZOOM_IN: // BASIC { mbZoomOnPage = sal_False; - SetZoom( Max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); + SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx index fd36400f7031..26279941d69c 100644 --- a/sd/source/ui/view/grviewsh.cxx +++ b/sd/source/ui/view/grviewsh.cxx @@ -125,7 +125,7 @@ IMPL_LINK(GraphicViewShell, TabBarSplitHandler, TabBar*, pTabBar) - pTabBar->GetPosPixel().X(); Size aTabSize = pTabBar->GetSizePixel(); - aTabSize.Width() = Min(pTabBar->GetSplitSize(), (long)(nMax-1)); + aTabSize.Width() = std::min(pTabBar->GetSplitSize(), (long)(nMax-1)); pTabBar->SetSizePixel (aTabSize); diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 715da282e61e..6585a3c7b459 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -164,7 +164,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_IN: { - SetZoom( Max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); + SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 595886d3b07d..6cb2004271af 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1094,7 +1094,7 @@ long OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll) long nViewWidth = pWin->PixelToLogic( pWin->GetSizePixel()).Width(); long nTextWidth = pOlView->GetPaperWidth(); - nViewWidth = Max(nViewWidth, nTextWidth); + nViewWidth = std::max(nViewWidth, nTextWidth); long nCurrentPos = pOutlinerView->GetVisArea().Left(); long nTargetPos = (long)(fX * nViewWidth); long nDelta = nTargetPos - nCurrentPos; diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 867d06bdf1c0..13d2676a3837 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -936,8 +936,8 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper, Size aMaxSize( mrDoc.GetMaxObjSize() ); - maDropPos.X() -= Min( aSize.Width(), aMaxSize.Width() ) >> 1; - maDropPos.Y() -= Min( aSize.Height(), aMaxSize.Height() ) >> 1; + maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; + maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); @@ -1102,8 +1102,8 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper, Size aMaxSize( mrDoc.GetMaxObjSize() ); - maDropPos.X() -= Min( aSize.Width(), aMaxSize.Width() ) >> 1; - maDropPos.Y() -= Min( aSize.Height(), aMaxSize.Height() ) >> 1; + maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; + maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index d02f9c1703bd..fdcd2b125796 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -155,13 +155,13 @@ void Window::CalcMinZoom() // Decide whether to take the larger or the smaller factor. sal_uLong nFact; if (mbCalcMinZoomByMinSide) - nFact = Min(nX, nY); + nFact = std::min(nX, nY); else - nFact = Max(nX, nY); + nFact = std::max(nX, nY); // The factor is tansfomed according to the current zoom factor. nFact = nFact * nZoom / ZOOM_MULTIPLICATOR; - mnMinZoom = Max((sal_uInt16) MIN_ZOOM, (sal_uInt16) nFact); + mnMinZoom = std::max((sal_uInt16) MIN_ZOOM, (sal_uInt16) nFact); } // If the current zoom factor is smaller than the calculated minimal // zoom factor then set the new minimal factor as the current zoom @@ -465,7 +465,7 @@ long Window::GetZoomForRect( const Rectangle& rZoomRect ) // Use the smaller one of both so that the zoom rectangle will be // fully visible with respect to both coordinate directions. - sal_uLong nFact = Min(nX, nY); + sal_uLong nFact = std::min(nX, nY); // Transform the current zoom factor so that it leads to the desired // scaling. @@ -538,7 +538,7 @@ long Window::SetZoomRect (const Rectangle& rZoomRect) // Use the smaller one of both so that the zoom rectangle will be // fully visible with respect to both coordinate directions. - sal_uLong nFact = Min(nX, nY); + sal_uLong nFact = std::min(nX, nY); // Transform the current zoom factor so that it leads to the desired // scaling. diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 2b1060998376..50716b156818 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -660,9 +660,9 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi long nNewZoom; if( pData->GetDelta() < 0L ) - nNewZoom = Max( (long) pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); + nNewZoom = std::max( (long) pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); else - nNewZoom = Min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); + nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); SetZoom( nNewZoom ); Invalidate( SID_ATTR_ZOOM ); |