summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-04-11 00:21:40 -0300
committerDavid Tardon <dtardon@redhat.com>2013-04-20 11:09:54 +0000
commit0f200cc30ea75fdce59f7bb6ae87ebc85729e2a4 (patch)
tree2e2c28f9500f81825cdadcbabd131da767ddbb49 /vcl/source/window
parent5414a3eecdb09be928313477792acfe1d3534645 (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 'vcl/source/window')
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/menu.cxx10
-rw-r--r--vcl/source/window/scrwnd.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/source/window/window2.cxx2
-rw-r--r--vcl/source/window/winproc.cxx2
8 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 1f7de7a612f6..1c5c42dde8bd 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -38,7 +38,7 @@ long AdjustRectToSquare( Rectangle &rRect )
{
const long nWidth = rRect.GetWidth();
const long nHeight = rRect.GetHeight();
- long nSide = Min( nWidth, nHeight );
+ long nSide = std::min( nWidth, nHeight );
if ( nSide && !(nSide & 1) )
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index f0e7cf315031..d9d84384eacb 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2295,7 +2295,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
}
}
}
- return Size(Max(nCheckWidth, nRadioWidth), Max(rCheckHeight, rRadioHeight));
+ return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight));
}
sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const
@@ -2464,7 +2464,7 @@ Size Menu::ImplCalcSize( Window* pWin )
aSz.Width() += pData->aSz.Width();
}
else
- pData->aSz.Height() = Max( Max( nTextHeight, pData->aSz.Height() ), nMinMenuItemHeight );
+ pData->aSz.Height() = std::max( std::max( nTextHeight, pData->aSz.Height() ), nMinMenuItemHeight );
nWidth += nTextWidth;
}
@@ -2484,7 +2484,7 @@ Size Menu::ImplCalcSize( Window* pWin )
if ( nFontHeight > nWidth )
nWidth += nFontHeight;
- pData->aSz.Height() = Max( Max( nFontHeight, pData->aSz.Height() ), nMinMenuItemHeight );
+ pData->aSz.Height() = std::max( std::max( nFontHeight, pData->aSz.Height() ), nMinMenuItemHeight );
}
pData->aSz.Height() += EXTRAITEMHEIGHT; // little bit more distance
@@ -2510,14 +2510,14 @@ Size Menu::ImplCalcSize( Window* pWin )
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
- sal_uInt16 gfxExtra = (sal_uInt16) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
+ sal_uInt16 gfxExtra = (sal_uInt16) std::max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
nImgOrChkPos = (sal_uInt16)nExtra;
long nImgOrChkWidth = 0;
if( aMaxSize.Height() > 0 ) // NWF case
nImgOrChkWidth = aMaxSize.Height() + nExtra;
else // non NWF case
nImgOrChkWidth = nFontHeight/2 + gfxExtra;
- nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
+ nImgOrChkWidth = std::max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
nTextPos = (sal_uInt16)(nImgOrChkPos + nImgOrChkWidth);
nTextPos = nTextPos + gfxExtra;
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 627f2041fbe6..61744e1fe8aa 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -356,7 +356,7 @@ IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl)
pWindow->Command( aCEvt );
if( aDel.IsDead() )
return 0;
- mnRepaintTime = Max( Time::GetSystemTicks() - nTime, (sal_uLong)1 );
+ mnRepaintTime = std::max( Time::GetSystemTicks() - nTime, (sal_uLong)1 );
ImplRecalcScrollValues();
}
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 9805e5ae12d0..a0967ce33378 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -555,7 +555,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
}
// Rundungsfehler werden hier nicht ausgelichen
- if ( (nAbsItems < (sal_uInt16)(Abs( nSizeDelta ))) && nSizeWinSize )
+ if ( (nAbsItems < (sal_uInt16)(std::abs( nSizeDelta ))) && nSizeWinSize )
{
for ( i = 0; i < nItems; i++ )
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 505177d9836b..cb82af669cde 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -372,7 +372,7 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth )
if ( bOffScreen )
{
- long nMaxWidth = Max( nOldTextWidth, GetTextWidth( aStr ) );
+ long nMaxWidth = std::max( nOldTextWidth, GetTextWidth( aStr ) );
Size aVirDevSize( nMaxWidth, aTextRect.GetHeight() );
mpImplData->mpVirDev->SetOutputSizePixel( aVirDevSize );
Rectangle aTempRect = aTextRect;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 53b349f48a1b..bc59719e026c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -555,7 +555,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
// generate readable fonts enforce a minimum font size of 9 points
bool bBrokenLangFontHeight = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType());
if (bBrokenLangFontHeight)
- defFontheight = Max(9, defFontheight);
+ defFontheight = std::max(9, defFontheight);
// i22098, toolfont will be scaled differently to avoid bloated rulers and status bars for big fonts
int toolfontheight = defFontheight;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 1cac7b351ea8..838809530cd6 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -886,7 +886,7 @@ void Window::SetZoomedPointFont( const Font& rFont )
// Use another font if the representation is to be scaled,
// and the actual font is not scalable
FontMetric aMetric = GetFontMetric();
- long nFontDiff = Abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
+ long nFontDiff = std::abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) )
{
sal_uInt16 nType;
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 98c856b3701f..2a296ca8309d 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1278,7 +1278,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
// Test for changes
sal_Bool bOnlyCursor = sal_False;
- xub_StrLen nMinLen = Min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) );
+ xub_StrLen nMinLen = std::min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) );
xub_StrLen nDeltaStart = 0;
while ( nDeltaStart < nMinLen )
{