Commit 3c4da71e authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

min->std::min

max->std::max

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59232 954022d7-b5bf-4e40-9824-e11837661b57
parent 69635071
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-24T17:17:12. -->
<!-- Written by QtCreator 3.1.1, 2014-10-27T20:36:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-24T17:23:11. -->
<!-- Written by QtCreator 3.1.1, 2014-10-27T20:36:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......@@ -57,7 +57,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3.0 GCC 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3.0 GCC 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.gcc_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
......
......@@ -1446,8 +1446,8 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo
strStyleAdvenced.Format(_T(";margin-left:%d;margin-top:%d;width:%d;height:%d;polyline_correct:true;"), _x, _y, _r - _x, _b - _y);
double dKoefX = 21600.0 / max(_r - _x, 1);
double dKoefY = 21600.0 / max(_b - _y, 1);
double dKoefX = 21600.0 / (std::max)((_r - _x), 1);
double dKoefY = 21600.0 / (std::max)((_b - _y), 1);
CString strPath = _T("");
for (int k = 0; k < nSize; k += 2)
{
......@@ -1882,8 +1882,8 @@ void CDrawingConverter::LoadCoordSize(XmlUtils::CXmlNode& oNode, CShape* pShape)
if (oArray.size() >= 2)
{
pShape->m_dWidthLogic = max(XmlUtils::GetInteger(oArray[0]), 1);
pShape->m_dHeightLogic = max(XmlUtils::GetInteger(oArray[1]), 1);
pShape->m_dWidthLogic = (std::max)(XmlUtils::GetInteger(oArray[0]), 1);
pShape->m_dHeightLogic = (std::max)(XmlUtils::GetInteger(oArray[1]), 1);
}
}
}
......@@ -1897,8 +1897,8 @@ void CDrawingConverter::LoadCoordSize(XmlUtils::CXmlNode& oNode, CShape* pShape)
if (oArray.size() >= 2)
{
pShape->m_dWidthLogic = max(XmlUtils::GetInteger(oArray[0]), 1);
pShape->m_dHeightLogic = max(XmlUtils::GetInteger(oArray[1]), 1);
pShape->m_dWidthLogic = (std::max)(XmlUtils::GetInteger(oArray[0]), 1);
pShape->m_dHeightLogic = (std::max)(XmlUtils::GetInteger(oArray[1]), 1);
}
}
}
......
......@@ -54,7 +54,7 @@ namespace NSBinPptxRW
{
if (NULL == m_pData)
{
m_lSize = max(nSize, 1000);
m_lSize = (std::max)(nSize, (size_t) 1000);
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
......
......@@ -229,7 +229,7 @@ namespace NSShapeImageGen
y -= height;
}
return GenerateImageID(punkImage, max(1.0, width), max(1.0, height));
return GenerateImageID(punkImage, (std::max)(1.0, width), (std::max)(1.0, height));
}
CImageInfo WriteImage(const CString& strFile, double& x, double& y, double& width, double& height)
{
......@@ -274,7 +274,7 @@ namespace NSShapeImageGen
#endif
return GenerateImageID_2(strDownload, strFile1, max(1.0, width), max(1.0, height));
return GenerateImageID_2(strDownload, strFile1, (std::max)(1.0, width), (std::max)(1.0, height));
}
......@@ -288,7 +288,7 @@ namespace NSShapeImageGen
if (-1 == width && -1 == height)
return GenerateImageID(strFile, width, height);
return GenerateImageID(strFile, max(1.0, width), max(1.0, height));
return GenerateImageID(strFile, (std::max)(1.0, width), (std::max)(1.0, height));
}
void SetFontManager(CFontManager* pFontManager)
{
......@@ -372,7 +372,7 @@ namespace NSShapeImageGen
nOutputFormat = _CXIMAGE_FORMAT_PNG;
}
LONG lMaxSize = min(max(lWidth, lHeight), m_lMaxSizeImage);
LONG lMaxSize = (std::min)((std::max)(lWidth, lHeight), m_lMaxSizeImage);
if (!((lWidth <= lMaxSize) && (lHeight <= lMaxSize)))
{
......
......@@ -361,8 +361,8 @@ namespace PPTX
// "origin color"
void SetRGB2HSL()
{
int iMin = min( red, min(green, blue));
int iMax = max( red, max(green, blue));
int iMin = (std::min)( red, (std::min)(green, blue));
int iMax = (std::max)( red, (std::max)(green, blue));
int iDelta = iMax - iMin;
double dMax = ( iMax + iMin )/255.0;
double dDelta = iDelta/255.0;
......@@ -426,8 +426,8 @@ namespace PPTX
//
static void RGB2HSL(unsigned char* RGB, unsigned char* HSL)
{
int iMin = min( RGB[0], min(RGB[1], RGB[2]));
int iMax = max( RGB[0], max(RGB[1], RGB[2]));
int iMin = (std::min)( RGB[0], (std::min)(RGB[1], RGB[2]));
int iMax = (std::max)( RGB[0], (std::max)(RGB[1], RGB[2]));
int iDelta = iMax - iMin;
double dMax = ( iMax + iMin )/255.0;
double dDelta = iDelta/255.0;
......
......@@ -66,8 +66,8 @@ namespace PPTX
AVSINLINE void Normalize()
{
stTrack = max(0, min(255, stTrack));
stTrack = max(0, min(255, endTrack));
stTrack = (std::max)(0, (std::min)(255, stTrack));
stTrack = (std::max)(0, (std::min)(255, endTrack));
stTime.normalize_positive();
endTime.normalize_positive();
......
......@@ -64,8 +64,8 @@ namespace PPTX
AVSINLINE void Normalize()
{
cx = min(max(cx, 914400), 51206400);
cy = min(max(cy, 914400), 51206400);
cx = (std::min)((std::max)(cx, 914400), 51206400);
cy = (std::min)((std::max)(cy, 914400), 51206400);
}
};
} // namespace nsPresentation
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-24T17:17:12. -->
<!-- Written by QtCreator 3.1.1, 2014-10-27T20:36:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
......@@ -143,10 +143,10 @@ public:
static BOOL Intersect(RectF& c, const RectF& a, const RectF& b)
{
REAL right = min(a.GetRight(), b.GetRight());
REAL bottom = min(a.GetBottom(), b.GetBottom());
REAL left = max(a.GetLeft(), b.GetLeft());
REAL top = max(a.GetTop(), b.GetTop());
REAL right = (std::min)(a.GetRight(), b.GetRight());
REAL bottom = (std::min)(a.GetBottom(), b.GetBottom());
REAL left = (std::max)(a.GetLeft(), b.GetLeft());
REAL top = (std::max)(a.GetTop(), b.GetTop());
c.X = left;
c.Y = top;
......@@ -165,10 +165,10 @@ public:
static BOOL Union(RectF& c, const RectF& a, const RectF& b)
{
REAL right = max(a.GetRight(), b.GetRight());
REAL bottom = max(a.GetBottom(), b.GetBottom());
REAL left = min(a.GetLeft(), b.GetLeft());
REAL top = min(a.GetTop(), b.GetTop());
REAL right = (std::max)(a.GetRight(), b.GetRight());
REAL bottom = (std::max)(a.GetBottom(), b.GetBottom());
REAL left = (std::min)(a.GetLeft(), b.GetLeft());
REAL top = (std::min)(a.GetTop(), b.GetTop());
c.X = left;
c.Y = top;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-24T17:23:11. -->
<!-- Written by QtCreator 3.1.1, 2014-10-27T20:36:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
......@@ -1645,7 +1645,7 @@ namespace NSStrings
{
if (NULL == m_pData)
{
m_lSize = max(nSize, 1000);
m_lSize = (std::max)(nSize, (size_t) 1000);
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
......
......@@ -302,8 +302,8 @@ namespace NSPresentationEditor
double dLeft = pGeomInfo.m_dLeft;
double dTop = pGeomInfo.m_dTop;
double dKoefX = max(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight)/ShapeSize;//pGeomInfo.m_dWidth / ShapeSize;
double dKoefY = max(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight)/ShapeSize;//pGeomInfo.m_dHeight / ShapeSize;
double dKoefX = (std::max)(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight)/ShapeSize;//pGeomInfo.m_dWidth / ShapeSize;
double dKoefY = (std::max)(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight)/ShapeSize;//pGeomInfo.m_dHeight / ShapeSize;
strRes = _T("<part name='") + strRes + _T("' path='");
......@@ -919,8 +919,8 @@ namespace NSPresentationEditor
double dLeft = pGeomInfo.m_dLeft;
double dTop = pGeomInfo.m_dTop;
double dKoefX = max(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight) / ShapeSize;
double dKoefY = max(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight) / ShapeSize;
double dKoefX = (std::max)(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight) / ShapeSize;
double dKoefY = (std::max)(pGeomInfo.m_dWidth, pGeomInfo.m_dHeight) / ShapeSize;
switch (m_eRuler)
{
......
......@@ -198,7 +198,7 @@ public:
{
if (0 < m_pShape->m_arTextRects.size())
{
double koef = max(oInfo.m_dWidth, oInfo.m_dHeight)/ShapeSize;
double koef = (std::max)(oInfo.m_dWidth, oInfo.m_dHeight)/ShapeSize;
oInfo.m_dLeft += m_pShape->m_arTextRects[0].left * koef;
oInfo.m_dTop += m_pShape->m_arTextRects[0].top * koef;
oInfo.m_dWidth = (m_pShape->m_arTextRects[0].right - m_pShape->m_arTextRects[0].left) * koef;
......@@ -286,7 +286,7 @@ public:
{
if (0 < m_pShape->m_arTextRects.size())
{
double koef = max(dWidth, dHeight)/ShapeSize;
double koef = (std::max)(dWidth, dHeight)/ShapeSize;
dLeft += m_pShape->m_arTextRects[0].left * koef;
dTop += m_pShape->m_arTextRects[0].top * koef;
dWidth = (m_pShape->m_arTextRects[0].right - m_pShape->m_arTextRects[0].left) * koef;
......
......@@ -49,7 +49,7 @@ namespace NSPresentationEditor
{
if (NULL == m_pData)
{
m_lSize = max(nSize, 1000);
m_lSize = (std::max)(nSize, (size_t) 1000);
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
......
......@@ -791,7 +791,7 @@ public:
pParagraph->m_oPFRun.hasBullet = (BOOL)TRUE;
pParagraph->m_lTextType = oText.m_lTextType;
pParagraph->m_lTextLevel = max(0, lParLevel);
pParagraph->m_lTextLevel = (std::max)((LONG)0, lParLevel);
CTextLoader::ConvertParagraph(oNodeLi, pParagraph, oMetric);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-24T17:17:12. -->
<!-- Written by QtCreator 3.1.1, 2014-10-27T20:36:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment