Revert "Modify to use SecureLog in FGrp_Util.cpp" 2.1b_release accepted/tizen_2.1/20130502.043227 submit/tizen_2.1/20130502.050325
authorJinmook Lim <jinmook.lim@samsung.com>
Sat, 27 Apr 2013 11:46:54 +0000 (20:46 +0900)
committerJinmook Lim <jinmook.lim@samsung.com>
Sat, 27 Apr 2013 11:46:54 +0000 (20:46 +0900)
This reverts commit 70f858b0dd7a837856091a819b27959f26c10161.

src/graphics/util/FGrp_Util.cpp

index 986ba3d..af5fba9 100644 (file)
@@ -89,23 +89,30 @@ _Util::Validate(const ::Tizen::Graphics::Rectangle& rtSrc, const ::Tizen::Graphi
        // check 1. is width/height less or equal than 0?
        if (rtSrc.width <= 0 || rtSrc.height <= 0 || rtDest.width <= 0 || rtDest.height <= 0)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%d,h:%d), dst(w:%d,h:%d)).\n", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height);
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "The argument is out of range. (src(w:%d,h:%d), dst(w:%d,h:%d)).\n",
+                                                 rtSrc.width, rtSrc.height, rtDest.width,
+                                                 rtDest.height);
        }
 
        // check 2.     is src exiting outside of dest entirely?
        if (rtSrc.x > rtDest.x + rtDest.width - 1 ||
                rtSrc.x + rtSrc.width - 1 < rtDest.x)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE,
+                                                 "The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",
+                                                 rtSrc.x,
+                                                 rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width,
+                                                 rtDest.height);
        }
 
        if (rtSrc.y > rtDest.y + rtDest.height - 1 ||
                rtSrc.y + rtSrc.height - 1 < rtDest.y)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE,
+                                                 "The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",
+                                                 rtSrc.x,
+                                                 rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width,
+                                                 rtDest.height);
        }
 
        return E_SUCCESS;
@@ -117,22 +124,23 @@ _Util::Validate(const ::Tizen::Graphics::FloatRectangle& rtSrcF, const ::Tizen::
        // check 1. is width/height less or equal than 0?
        if (rtSrcF.width <= 0.0f || rtSrcF.height <= 0.0f || rtDestF.width <= 0.0f || rtDestF.height <= 0.0f)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(w:%f,h:%f), dst(w:%f,h:%f)).\n", rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height);
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "The argument is out of range. (src(w:%f,h:%f), dst(w:%f,h:%f)).",
+                                                 rtSrcF.width, rtSrcF.height, rtDestF.width, rtDestF.height);
        }
 
        // check 2.     is src exiting outside of dest entirely?
        if (rtSrcF.x >= rtDestF.x + rtDestF.width || rtSrcF.x + rtSrcF.width <= rtDestF.x)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
-
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE,
+                                                 "The argument is out of range. (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).",
+                                                 rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
        }
 
        if (rtSrcF.y >= rtDestF.y + rtDestF.height || rtSrcF.y + rtSrcF.height <= rtDestF.y)
        {
-               SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-               SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
+               SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE,
+                                                 "The argument is out of range. (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f)).",
+                                                 rtSrcF.x, rtSrcF.y, rtSrcF.width, rtSrcF.height, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
        }
 
        return E_SUCCESS;
@@ -141,25 +149,29 @@ _Util::Validate(const ::Tizen::Graphics::FloatRectangle& rtSrcF, const ::Tizen::
 result
 _Util::Validate(const ::Tizen::Graphics::Point& ptSrc, const ::Tizen::Graphics::Rectangle& rtDest)
 {
-       if (rtDest.x <= ptSrc.x && ptSrc.x < rtDest.x + rtDest.width && rtDest.y <= ptSrc.y && ptSrc.y < rtDest.y + rtDest.height)
-       {
-               return E_SUCCESS;
-       }
+       SysTryReturnResult(NID_GRP, rtDest.x <= ptSrc.x &&
+                                         ptSrc.x < rtDest.x + rtDest.width &&
+                                         rtDest.y <= ptSrc.y &&
+                                         ptSrc.y < rtDest.y + rtDest.height,
+                                         E_OUT_OF_RANGE, "The argument is out of range. (src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n",
+                                         ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width,
+                                         rtDest.height);
 
-       SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-       SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%d,y:%d), dst(x:%d,y:%d,w:%d,h:%d)).\n", ptSrc.x, ptSrc.y, rtDest.x, rtDest.y, rtDest.width, rtDest.height);
+       return E_SUCCESS;
 }
 
 result
 _Util::Validate(const ::Tizen::Graphics::FloatPoint& ptSrcF, const ::Tizen::Graphics::FloatRectangle& rtDestF)
 {
-       if (rtDestF.x <= ptSrcF.x && ptSrcF.x < rtDestF.x + rtDestF.width && rtDestF.y <= ptSrcF.y && ptSrcF.y < rtDestF.y + rtDestF.height)
-       {
-               return E_SUCCESS;
-       }
+       SysTryReturnResult(NID_GRP, rtDestF.x <= ptSrcF.x &&
+                                         ptSrcF.x < rtDestF.x + rtDestF.width &&
+                                         rtDestF.y <= ptSrcF.y &&
+                                         ptSrcF.y < rtDestF.y + rtDestF.height,
+                                         E_OUT_OF_RANGE, "The argument is out of range. (src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n",
+                                         ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width,
+                                         rtDestF.height);
 
-       SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range.");
-       SysSecureTryReturn(NID_GRP, 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, " (src(x:%f,y:%f), dst(x:%f,y:%f,w:%f,h:%f)).\n", ptSrcF.x, ptSrcF.y, rtDestF.x, rtDestF.y, rtDestF.width, rtDestF.height);
+       return E_SUCCESS;
 }
 
 bool