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 /starmath/source/view.cxx | |
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 'starmath/source/view.cxx')
-rw-r--r-- | starmath/source/view.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index bca602edade9..6d403b1a6c9c 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -602,7 +602,7 @@ IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu ) void SmGraphicWindow::SetZoom(sal_uInt16 Factor) { - nZoom = Min(Max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM); + nZoom = std::min(std::max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM); Fraction aFraction (nZoom, 100); SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) ); SetTotalSize(); @@ -625,7 +625,7 @@ void SmGraphicWindow::ZoomToFitInWindow() if (aSize.Width() > 0 && aSize.Height() > 0) { - long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(), + long nVal = std::min ((85 * aWindowSize.Width()) / aSize.Width(), (85 * aWindowSize.Height()) / aSize.Height()); SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) ); } @@ -1065,7 +1065,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M aLine = aLine.replaceAt(0, m, ""); aSize = GetTextLineSize(rDevice, aText); TextSize.Height() += aSize.Height(); - TextSize.Width() = Max(TextSize.Width(), Min(aSize.Width(), MaxWidth)); + TextSize.Width() = std::max(TextSize.Width(), std::min(aSize.Width(), MaxWidth)); aLine = comphelper::string::stripStart(aLine, ' '); aLine = comphelper::string::stripStart(aLine, '\t'); @@ -1076,7 +1076,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M else { TextSize.Height() += aSize.Height(); - TextSize.Width() = Max(TextSize.Width(), aSize.Width()); + TextSize.Width() = std::max(TextSize.Width(), aSize.Width()); } } @@ -1288,9 +1288,9 @@ void SmViewShell::Impl_Print( Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(), aOutRect.GetHeight()), MapMode(MAP_100TH_MM))); Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM))); - sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()), + sal_uInt16 nZ = (sal_uInt16) std::min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()), (long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height())); - Fraction aFraction ((sal_uInt16) Max ((sal_uInt16) MINZOOM, Min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100); + Fraction aFraction ((sal_uInt16) std::max ((sal_uInt16) MINZOOM, std::min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100); OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction); } @@ -1816,7 +1816,7 @@ void SmViewShell::Execute(SfxRequest& rReq) Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(), OutputRect.GetHeight()), aMap)); Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap)); - sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()), + sal_uInt16 nZ = (sal_uInt16) std::min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()), (long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height())); aGraphic.SetZoom (nZ); break; |