Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: fpdfsdk/src/formfiller/FFL_Utils.cpp

Issue 1064283002: Merge to XFA: FFL_MIN and FFL_MAX are pointless and stupid. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/formfiller/FFL_Utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_Utils.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
index 3ea78918becbdaa849935565d8c40da07a5915e2..196102bfb42d14742701789f26f635ebea1ef627 100644
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Utils.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "../../include/formfiller/FormFiller.h"
#include "../../include/formfiller/FFL_Utils.h"
@@ -11,10 +13,10 @@ CPDF_Rect CFFL_Utils::MaxRect(const CPDF_Rect & rect1,const CPDF_Rect & rect2)
{
CPDF_Rect rcRet;
- rcRet.left = FFL_MIN(rect1.left,rect2.left);
- rcRet.bottom = FFL_MIN(rect1.bottom,rect2.bottom);
- rcRet.right = FFL_MAX(rect1.right,rect2.right);
- rcRet.top = FFL_MAX(rect1.top,rect2.top);
+ rcRet.left = std::min(rect1.left, rect2.left);
+ rcRet.bottom = std::min(rect1.bottom, rect2.bottom);
+ rcRet.right = std::max(rect1.right, rect2.right);
+ rcRet.top = std::max(rect1.top, rect2.top);
return rcRet;
}
@@ -39,27 +41,6 @@ CPDF_Rect CFFL_Utils::DeflateRect(const CPDF_Rect & crRect,const FX_FLOAT & fSiz
return crNew;
}
-/*
-FX_BOOL CFFL_Utils::RectContainsRect(const CPDF_Rect & father,const CPDF_Rect & son)
-{
- return (father.left <= son.left && father.right >= son.right &&
- father.bottom <= son.bottom && father.top >= son.top);
-
-}
-
-FX_BOOL CFFL_Utils::RectContainsPoint(const CPDF_Rect & father,const CPDF_Point & son)
-{
- return (father.left <= son.x && father.right >= son.x &&
- father.bottom <= son.y && father.top >= son.y);
-}
-
-FX_BOOL CFFL_Utils::RectContainsXY(const CPDF_Rect & father,FX_FLOAT x,FX_FLOAT y)
-{
- return (father.left <= x && father.right >= x &&
- father.bottom <= y && father.top >= y);
-}
-*/
-
FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
{
if (!pObj) return FALSE;
« no previous file with comments | « fpdfsdk/include/formfiller/FFL_Utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698