fixed prevent
authorChulheon <ch.jeong47@samsung.com>
Wed, 3 Apr 2013 02:57:20 +0000 (11:57 +0900)
committerChulheon <ch.jeong47@samsung.com>
Wed, 3 Apr 2013 03:00:43 +0000 (12:00 +0900)
Change-Id: I34d84e23eb3ee0c845d5f1780e1b9cb8d216a309

src/ui/controls/FUiCtrl_EditPresenter.cpp

index 869bd91..be33d4f 100755 (executable)
@@ -1417,6 +1417,7 @@ _EditPresenter::DrawChangeableBackground(Canvas& canvas, bool focused, int bitma
 CATCH:
        delete pEditBgBitmap;
        delete pEditBgEffectBitmap;
+       delete pReplacementColorBackgroundBitmap;
 
        return r;
 }
@@ -1917,22 +1918,21 @@ _EditPresenter::DrawClearIcon(Canvas& canvas)
 
                GET_COLOR_CONFIG(EDIT::CLEAR_ICON_NORMAL, editClearIconColor);
        }
-       pEditReplacedBitmapClear = _BitmapImpl::GetColorReplacedBitmapN(*pEditBitmapClear, Color::GetColor(COLOR_ID_MAGENTA),
-                                                                       editClearIconColor);
-       if (pEditReplacedBitmapClear == null)
-       {
-               return E_SYSTEM;
-       }
 
        FloatRectangle textRect = __textObjectBounds;
        FloatRectangle afterClearIconRect(textRect.x + textRect.width, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight);
+       FloatRectangle editBounds = __pEdit->GetBoundsF();
+
+       pEditReplacedBitmapClear = _BitmapImpl::GetColorReplacedBitmapN(*pEditBitmapClear, Color::GetColor(COLOR_ID_MAGENTA),
+                                                                       editClearIconColor);
+       SysTryCatch(NID_UI_CTRL, pEditReplacedBitmapClear, , r = E_SYSTEM, "[E_SYSTEM] Unable to create an instance .");
+
        if (__clearIconBounds != afterClearIconRect)
        {
                __clearIconBounds = afterClearIconRect;
                __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON);
        }
 
-       FloatRectangle editBounds = __pEdit->GetBoundsF();
        if (editBounds.height < clearIconHeight)
        {
                __clearIconBounds.y = textRect.y;
@@ -1960,6 +1960,11 @@ _EditPresenter::DrawClearIcon(Canvas& canvas)
        }
 
        return r;
+
+CATCH:
+       delete pEditBitmapClear;
+
+       return r;
 }
 
 result
@@ -5954,6 +5959,8 @@ CATCH:
        delete __pCommandButton;
        __pCommandButton = null;
 
+       delete pReplacementColorBackgroundBitmap;
+
        return r;
 }
 
@@ -9576,11 +9583,6 @@ _EditPresenter::IsCopyPasteHandleExist(void) const
 bool
 _EditPresenter::IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const Tizen::Base::String& text)
 {
-       if (!(keypadStyle == KEYPAD_STYLE_NUMBER || keypadStyle == KEYPAD_STYLE_PHONE_NUMBER || keypadStyle == KEYPAD_STYLE_IP_V4))
-       {
-               return false;
-       }
-
        const int numberOfCharOnNumOnlyStyle = 10;
        const int numberOfCharOnPhoneNumStyle = 13;
        const int numberOfCharOnIpStyle = 18;