Add E_OBJ_NOT_FOUND exception to Container:GetControl() function
authorjaewon7.cho <jaewon7.cho@samsung.com>
Tue, 2 Apr 2013 07:19:59 +0000 (16:19 +0900)
committerjaewon7.cho <jaewon7.cho@samsung.com>
Tue, 2 Apr 2013 07:32:53 +0000 (16:32 +0900)
Change-Id: Icf69ad0cbcdd41f5b5d4c529efca0094532a5f34
Signed-off-by: jaewon7.cho <jaewon7.cho@samsung.com>
src/ui/FUiContainer.cpp [changed mode: 0644->0755]
src/ui/FUi_ContainerImpl.cpp
src/ui/FUi_ControlImplManager.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 29a9149..05d6332
@@ -347,7 +347,7 @@ Container::OnEvaluateSize(Dimension& evaluatedSize)
 bool
 Container::OnEvaluateSize(FloatDimension& evaluatedSize)
 {
-
+       return false;
 }
 
 void
index bfd7111..6e5a9b2 100755 (executable)
@@ -213,20 +213,23 @@ _ContainerImpl::RemoveControl(_ControlImpl* pChild, bool deallocate)
        if (pChildContainer)
        {
                _ContainerImpl* pParent = pChildContainer->GetParent();
-               if (pParent)
-               {
-                       r = pParent->RemoveChild(pChildContainer, false);
-                       SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-               }
+               SysTryReturn(NID_UI, pParent, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The control is not a child of this container.");
+
+               r = pParent->RemoveChild(pChildContainer, false);
+               SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
                pChildContainer->RemoveAllChildren(true);
                r = GetLastResult();
                SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-               Container* pContainer = &pChildContainer->GetPublic();
-               delete pContainer;
-               pContainer = null;
+               if (deallocate)
+               {
+                       Container* pContainer = &pChildContainer->GetPublic();
+                       delete pContainer;
+                       pContainer = null;
+               }
        }
        else
        {
+               SysTryReturn(NID_UI, pChild, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The control is not a child of this container.");
                r = RemoveChild(pChild, deallocate);
                SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        }
old mode 100644 (file)
new mode 100755 (executable)
index d2c814d..b2b1cb4
@@ -318,7 +318,6 @@ OrientationStatus
 _ControlImplManager::GetFormOrientationStatus(_ControlImpl* pControlImpl)
 {
        _FormImpl* pParentImpl = null;
-       _ControlImpl* pTempControlImpl = pControlImpl;
        OrientationStatus orientation = ORIENTATION_STATUS_NONE;
        while(pControlImpl)
        {