summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
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 'starmath')
-rw-r--r--starmath/source/accessibility.cxx4
-rw-r--r--starmath/source/node.cxx6
-rw-r--r--starmath/source/rect.cxx14
-rw-r--r--starmath/source/view.cxx14
4 files changed, 19 insertions, 19 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 02ed5f8739b4..418aab4f42ed 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -679,8 +679,8 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
- sal_Int32 nStart = Min(nStartIndex, nEndIndex);
- sal_Int32 nEnd = Max(nStartIndex, nEndIndex);
+ sal_Int32 nStart = std::min(nStartIndex, nEndIndex);
+ sal_Int32 nEnd = std::max(nStartIndex, nEndIndex);
if (!(nStart <= aTxt.getLength()) ||
!(nEnd <= aTxt.getLength()))
throw IndexOutOfBoundsException();
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index ee6b8b39213e..047a414efb96 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1174,7 +1174,7 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFontHeight = GetFont().GetSize().Height(),
nExtLen = nFontHeight * rFormat.GetDistance(DIS_FRACTION) / 100L,
nThick = nFontHeight * rFormat.GetDistance(DIS_STROKEWIDTH) / 100L,
- nWidth = Max(pNum->GetItalicWidth(), pDenom->GetItalicWidth()),
+ nWidth = std::max(pNum->GetItalicWidth(), pDenom->GetItalicWidth()),
nNumDist = bIsTextmode ? 0 :
nFontHeight * rFormat.GetDistance(DIS_NUMERATOR) / 100L,
nDenomDist = bIsTextmode ? 0 :
@@ -1735,7 +1735,7 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Size aTmpSize (pLeft->GetFont().GetSize());
OSL_ENSURE(pRight->GetFont().GetSize() == aTmpSize,
"Sm : different font sizes");
- aTmpSize.Width() = Min((long) nBraceHeight * 60L / 100L,
+ aTmpSize.Width() = std::min((long) nBraceHeight * 60L / 100L,
rFormat.GetBaseSize().Height() * 3L / 2L);
// correction factor since change from StarMath to OpenSymbol font
// because of the different font width in the FontMetric
@@ -2543,7 +2543,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
pNode->Arrange(rDev, rFormat);
int nCol = nIdx % nNumCols;
- pColWidth[nCol] = Max(pColWidth[nCol], pNode->GetItalicWidth());
+ pColWidth[nCol] = std::max(pColWidth[nCol], pNode->GetItalicWidth());
}
}
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 93f7d4dbd9ee..19459867bba6 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -448,8 +448,8 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
{
// get some values used for (italic) spaces adaption
// ! (need to be done before changing current SmRect) !
- long nL = Min(GetItalicLeft(), rRect.GetItalicLeft()),
- nR = Max(GetItalicRight(), rRect.GetItalicRight());
+ long nL = std::min(GetItalicLeft(), rRect.GetItalicLeft()),
+ nR = std::max(GetItalicRight(), rRect.GetItalicRight());
Union(rRect);
@@ -458,10 +458,10 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
if (!HasAlignInfo())
CopyAlignInfo(rRect);
else if (rRect.HasAlignInfo())
- { nAlignT = Min(GetAlignT(), rRect.GetAlignT());
- nAlignB = Max(GetAlignB(), rRect.GetAlignB());
- nHiAttrFence = Min(GetHiAttrFence(), rRect.GetHiAttrFence());
- nLoAttrFence = Max(GetLoAttrFence(), rRect.GetLoAttrFence());
+ { nAlignT = std::min(GetAlignT(), rRect.GetAlignT());
+ nAlignB = std::max(GetAlignB(), rRect.GetAlignB());
+ nHiAttrFence = std::min(GetHiAttrFence(), rRect.GetHiAttrFence());
+ nLoAttrFence = std::max(GetLoAttrFence(), rRect.GetLoAttrFence());
OSL_ENSURE(HasAlignInfo(), "Sm: ooops...");
switch (eCopyMode)
@@ -571,7 +571,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
long nAbsX = labs(aDist.X()),
nAbsY = labs(aDist.Y());
- return bIsInside ? - Min(nAbsX, nAbsY) : Max (nAbsX, nAbsY);
+ return bIsInside ? - std::min(nAbsX, nAbsY) : std::max (nAbsX, nAbsY);
}
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;