Coding idiom changes to ExpandableEditArea and SearchBar
authorBhavya Kumili <bhavya.k@samsung.com>
Sat, 3 Aug 2013 09:21:42 +0000 (14:51 +0530)
committerBhavya Kumili <bhavya.k@samsung.com>
Tue, 6 Aug 2013 13:05:44 +0000 (18:35 +0530)
Signed-off-by: Bhavya Kumili <bhavya.k@samsung.com>
Change-Id: I369a6f143af6a1d9f24eaa157fa70d5bd3ae5ebf

src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp
src/ui/controls/FUiCtrl_SearchBar.cpp
src/ui/controls/FUiCtrl_SearchBarImpl.cpp
src/ui/controls/FUiCtrl_SearchBarPresenter.cpp
src/ui/controls/FUiCtrl_TokenEditPresenter.cpp

index 0ae6713..b7fb99c 100644 (file)
@@ -69,7 +69,7 @@ _ExpandableEditAreaImpl::_ExpandableEditAreaImpl(ExpandableEditArea* pPublic, _E
 
 _ExpandableEditAreaImpl::~_ExpandableEditAreaImpl(void)
 {
-       if (__pExpandableEditArea)
+       if (__pExpandableEditArea != null)
        {
                __pExpandableEditArea->RemoveTextEventListener(*this);
                __pExpandableEditArea->RemoveExpandableEditAreaEventListener(*this);
@@ -227,7 +227,7 @@ _ExpandableEditAreaImpl::Dispose(void)
 
        result r = E_SUCCESS;
 
-       if (__pExpandableEditArea)
+       if (__pExpandableEditArea != null)
        {
                delete __pExpandableEditArea;
                __pExpandableEditArea = null;
@@ -1427,7 +1427,7 @@ _ExpandableEditAreaImpl::OnTextValueChangeCanceled(const _Control& source)
 void
 _ExpandableEditAreaImpl::OnExpandableEditAreaLineAdded(const _Control& source, int newLineCount)
 {
-       if (__pPublicExpandableEditAreaEvent)
+       if (__pPublicExpandableEditAreaEvent != null)
        {
                IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(
                                EXPANDABLE_EDITAREA_EVENT_ADDED, newLineCount);
@@ -1441,7 +1441,7 @@ _ExpandableEditAreaImpl::OnExpandableEditAreaLineAdded(const _Control& source, i
 void
 _ExpandableEditAreaImpl::OnExpandableEditAreaLineRemoved(const _Control& source, int newLineCount)
 {
-       if (__pPublicExpandableEditAreaEvent)
+       if (__pPublicExpandableEditAreaEvent != null)
        {
                IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN(
                                EXPANDABLE_EDITAREA_EVENT_REMOVED, newLineCount);
@@ -1468,7 +1468,7 @@ _ExpandableEditAreaImpl::OnTextBlockSelected(_Control& source, int start, int en
 void
 _ExpandableEditAreaImpl::OnKeypadWillOpen(void)
 {
-       if (__pPublicKeypadEvent)
+       if (__pPublicKeypadEvent != null)
        {
                IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED);
@@ -1482,7 +1482,7 @@ _ExpandableEditAreaImpl::OnKeypadWillOpen(void)
 void
 _ExpandableEditAreaImpl::OnKeypadOpened(void)
 {
-       if (__pPublicKeypadEvent)
+       if (__pPublicKeypadEvent != null)
        {
                IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN);
@@ -1496,7 +1496,7 @@ _ExpandableEditAreaImpl::OnKeypadOpened(void)
 void
 _ExpandableEditAreaImpl::OnKeypadClosed(void)
 {
-       if (__pPublicKeypadEvent)
+       if (__pPublicKeypadEvent != null)
        {
                IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE);
@@ -1510,7 +1510,7 @@ _ExpandableEditAreaImpl::OnKeypadClosed(void)
 void
 _ExpandableEditAreaImpl::OnKeypadBoundsChanged(void)
 {
-       if (__pPublicKeypadEvent)
+       if (__pPublicKeypadEvent != null)
        {
                IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN(
                        GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
@@ -1524,7 +1524,7 @@ _ExpandableEditAreaImpl::OnKeypadBoundsChanged(void)
 void
 _ExpandableEditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage)
 {
-       if (__pPublicLanguageEvent)
+       if (__pPublicLanguageEvent != null)
        {
                IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
                result r = GetLastResult();
@@ -1541,7 +1541,7 @@ _ExpandableEditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCod
 void
 _ExpandableEditAreaImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
 {
-       if (__pPublicKeypadEvent)
+       if (__pPublicKeypadEvent != null)
        {
                KeypadAction onKeypadAction = KEYPAD_ACTION_ENTER;
                switch (keypadAction)
@@ -1599,7 +1599,7 @@ bool
 _ExpandableEditAreaImpl::ReplaceToken(const String& token, String& replacement)
 {
        bool enable = false;
-       if (__pTokenFilter)
+       if (__pTokenFilter != null)
        {
                enable = __pTokenFilter->ReplaceToken(token, replacement);
        }
@@ -1805,7 +1805,7 @@ protected:
                {
                        textSize = _LocalizedNumParser::ToDouble(elementString, "C");
                        _ICoordinateSystemTransformer* pTransform = GetTransformer();
-                       if (pTransform)
+                       if (pTransform != null)
                        {
                                textSize = pTransform->Transform(textSize);
                        }
@@ -2034,10 +2034,10 @@ protected:
                if (pControl->GetElement(L"accessibilityHint", elementString))
                {
                        AccessibilityContainer* pContainer = pExpandableEditArea->GetAccessibilityContainer();
-                       if (pContainer)
+                       if (pContainer != null)
                        {
                                AccessibilityElement* pElement = pContainer->GetElement(L"EditText");
-                               if (pElement)
+                               if (pElement != null)
                                {
                                        pElement->SetHint(elementString);
                                }
index a91993e..3bf6bdc 100644 (file)
@@ -106,7 +106,7 @@ _SearchBar::_SearchBar(void)
        }
 
        _AccessibilityContainer* pContainer = GetAccessibilityContainer();
-       if (pContainer)
+       if (pContainer != null)
        {
                pContainer->Activate(true);
        }
@@ -119,7 +119,7 @@ _SearchBar::~_SearchBar(void)
        delete __pSearchBarPresenter;
        __pSearchBarPresenter = null;
 
-       if (__pClippedGroupControl)
+       if (__pClippedGroupControl != null)
        {
                DetachChild(*__pClippedGroupControl);
 
@@ -127,7 +127,7 @@ _SearchBar::~_SearchBar(void)
                __pClippedGroupControl = null;
        }
 
-       if (__pContainer)
+       if (__pContainer != null)
        {
                DetachChild(*__pContainer);
 
@@ -135,43 +135,25 @@ _SearchBar::~_SearchBar(void)
                __pContainer = null;
        }
 
-       if (__pActionEvent)
-       {
-               delete __pActionEvent;
-               __pActionEvent = null;
-       }
+       delete __pActionEvent;
+       __pActionEvent = null;
 
-       if (__pKeypadEvent)
-       {
-               delete __pKeypadEvent;
-               __pKeypadEvent = null;
-       }
+       delete __pKeypadEvent;
+       __pKeypadEvent = null;
 
-       if (__pTextBlockEvent)
-       {
-               delete __pTextBlockEvent;
-               __pTextBlockEvent = null;
-       }
+       delete __pTextBlockEvent;
+       __pTextBlockEvent = null;
 
-       if (__pTextEvent)
-       {
-               delete __pTextEvent;
-               __pTextEvent = null;
-       }
+       delete __pTextEvent;
+       __pTextEvent = null;
 
-       if (__pSearchBarEvent)
-       {
-               delete __pSearchBarEvent;
-               __pSearchBarEvent = null;
-       }
+       delete __pSearchBarEvent;
+       __pSearchBarEvent = null;
 
-       if (__pLanguageEvent)
-       {
-               delete __pLanguageEvent;
-               __pLanguageEvent = null;
-       }
+       delete __pLanguageEvent;
+       __pLanguageEvent = null;
 
-       if (__pAccessibilitySearchBarElement)
+       if (__pAccessibilitySearchBarElement != null)
        {
                __pAccessibilitySearchBarElement->Activate(false);
                __pAccessibilitySearchBarElement = null;
@@ -497,7 +479,7 @@ _SearchBar::SetContentsArea(void)
        __contentAreaBounds.width = width - controlBounds.x;
        __contentAreaBounds.height = height - (controlBounds.y + controlBounds.height);
 
-       if (__pContainer)
+       if (__pContainer != null)
        {
                result r = E_SUCCESS;
                r = __pContainer->SetBounds(__contentAreaBounds);
@@ -518,7 +500,7 @@ _SearchBar::SetContent(const _Control* pContent)
        __pContentControl = const_cast <_Control*>(pContent);
        result r = E_SUCCESS;
 
-       if (__pContainer)
+       if (__pContainer != null)
        {
                r = __pContainer->AttachChild(*__pContentControl);
                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating");
@@ -607,12 +589,12 @@ _SearchBar::SetMode(SearchBarMode mode)
 result
 _SearchBar::SetModeLocked(bool modeLocked)
 {
-       if (modeLocked == true && GetMode() == SEARCH_BAR_MODE_NORMAL)
+       if (modeLocked && GetMode() == SEARCH_BAR_MODE_NORMAL)
        {
                __pEdit->SetViewModeEnabled(true);
        }
 
-       if (modeLocked == false && __pEdit->IsViewModeEnabled())
+       if (!modeLocked && __pEdit->IsViewModeEnabled())
        {
                __pEdit->SetViewModeEnabled(false);
        }
@@ -688,7 +670,7 @@ _SearchBar::GetButtonStatus(void) const
 
        SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL;
 
-       if (__isButtonEnabled == false)
+       if (!__isButtonEnabled)
        {
                buttonStatus = SEARCH_BAR_BUTTON_STATUS_DISABLED;
        }
@@ -1572,7 +1554,7 @@ _SearchBar::OnBoundsChanged(void)
                __pSearchBarPresenter->OnBoundsChanged();
        }
 
-       if (__pAccessibilitySearchBarElement)
+       if (__pAccessibilitySearchBarElement != null)
        {
                __pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
        }
@@ -1636,7 +1618,7 @@ _SearchBar::FireButtonActionEvent(const _Control &source, int actionId)
 
                SetFocused();
 
-               if (__pActionEvent)
+               if (__pActionEvent != null)
                {
                        IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId);
                        result r = GetLastResult();
@@ -1661,7 +1643,7 @@ _SearchBar::OnKeypadWillOpen(void)
 {
        if (!__isKeypadOpening)
        {
-               if (__pKeypadEvent)
+               if (__pKeypadEvent != null)
                {
                        IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
                        result r = GetLastResult();
@@ -1678,7 +1660,7 @@ _SearchBar::OnKeypadWillOpen(void)
 void
 _SearchBar::OnKeypadOpened(void)
 {
-       if (__pKeypadEvent)
+       if (__pKeypadEvent != null)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN);
                result r = GetLastResult();
@@ -1695,7 +1677,7 @@ _SearchBar::OnKeypadOpened(void)
 void
 _SearchBar::OnKeypadClosed(void)
 {
-       if (__pKeypadEvent)
+       if (__pKeypadEvent != null)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE);
                result r = GetLastResult();
@@ -1713,7 +1695,7 @@ _SearchBar::OnKeypadClosed(void)
 void
 _SearchBar::OnKeypadBoundsChanged(void)
 {
-       if (__pKeypadEvent)
+       if (__pKeypadEvent != null)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
                result r = GetLastResult();
@@ -1729,7 +1711,7 @@ _SearchBar::OnKeypadBoundsChanged(void)
 void
 _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
 {
-       if (__pKeypadEvent)
+       if (__pKeypadEvent != null)
        {
                IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION);
                result r = GetLastResult();
@@ -1744,7 +1726,7 @@ _SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
 void
 _SearchBar::OnTextBlockSelected(_Control& source, int start, int end)
 {
-       if (__pTextBlockEvent)
+       if (__pTextBlockEvent != null)
        {
                IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end);
                result r = GetLastResult();
@@ -2136,13 +2118,13 @@ result
 _SearchBar::SendSearchBarEvent(_SearchBarEventStatus status)
 {
        result r = E_SUCCESS;
-       if (__pSearchBarEvent)
+       if (__pSearchBarEvent != null)
        {
                IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status);
                r = GetLastResult();
                SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-               if (IsContentAreaVisible() == false)
+               if (!IsContentAreaVisible())
                {
                        SetContentAreaVisible(false);
                }
@@ -2592,7 +2574,7 @@ _SearchBar::SetPropertyContentAreaSize(const Variant& size)
        __isUserContainerBounds = true;
 
        // set bounds
-       if (__pContainer)
+       if (__pContainer != null)
        {
                r = __pContainer->SetBounds(__contentAreaBounds);
                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
index 9abfaf8..3356239 100644 (file)
@@ -66,7 +66,7 @@ _SearchBarImpl::_SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore)
 
 _SearchBarImpl::~_SearchBarImpl(void)
 {
-       if (__pSearchBar)
+       if (__pSearchBar != null)
        {
                SetContent(null);
                if (__pSearchBar->GetClippedGroupControl())
@@ -76,59 +76,32 @@ _SearchBarImpl::~_SearchBarImpl(void)
                }
        }
 
-       if (__pEditField)
-       {
-               delete __pEditField;
-               __pEditField = null;
-       }
+       delete __pEditField;
+       __pEditField = null;
 
-       if (__pButton)
-       {
-               delete __pButton;
-               __pButton = null;
-       }
+       delete __pButton;
+       __pButton = null;
 
-       if (__pPublicActionEvent)
-       {
-               delete __pPublicActionEvent;
-               __pPublicActionEvent = null;
-       }
+       delete __pPublicActionEvent;
+       __pPublicActionEvent = null;
 
-       if (__pPublicKeypadEvent)
-       {
-               delete __pPublicKeypadEvent;
-               __pPublicKeypadEvent = null;
-       }
+       delete __pPublicKeypadEvent;
+       __pPublicKeypadEvent = null;
 
-       if (__pPublicTextBlockEvent)
-       {
-               delete __pPublicTextBlockEvent;
-               __pPublicTextBlockEvent = null;
-       }
+       delete __pPublicTextBlockEvent;
+       __pPublicTextBlockEvent = null;
 
-       if (__pPublicTextEvent)
-       {
-               delete __pPublicTextEvent;
-               __pPublicTextEvent = null;
-       }
+       delete __pPublicTextEvent;
+       __pPublicTextEvent = null;
 
-       if (__pPublicSearchBarEvent)
-       {
-               delete __pPublicSearchBarEvent;
-               __pPublicSearchBarEvent = null;
-       }
+       delete __pPublicSearchBarEvent;
+       __pPublicSearchBarEvent = null;
 
-       if (__pPublicLanguageEvent)
-       {
-               delete __pPublicLanguageEvent;
-               __pPublicLanguageEvent = null;
-       }
+       delete __pPublicLanguageEvent;
+       __pPublicLanguageEvent = null;
 
-       if (__pPublicFocusEventListeners)
-       {
-               delete __pPublicFocusEventListeners;
-               __pPublicFocusEventListeners = null;
-       }
+       delete __pPublicFocusEventListeners;
+       __pPublicFocusEventListeners = null;
 }
 
 _SearchBarImpl*
@@ -879,7 +852,7 @@ _SearchBarImpl::GetSearchFieldTextColor(SearchFieldStatus status) const
 
        Color color;
        _Edit* pEdit = __pSearchBar->GetSearchField();
-       if (pEdit)
+       if (pEdit != null)
        {
                switch (status)
                {
@@ -950,7 +923,7 @@ _SearchBarImpl::SetSearchFieldTextColor(SearchFieldStatus status, const Color& c
 
        result r = E_SUCCESS;
        _Edit* pEdit = __pSearchBar->GetSearchField();
-       if (pEdit)
+       if (pEdit != null)
        {
                switch (status)
                {
@@ -1455,7 +1428,7 @@ _SearchBarImpl::OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode)
 void
 _SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage)
 {
-       if (__pPublicLanguageEvent)
+       if (__pPublicLanguageEvent != null)
        {
                IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
                result r = GetLastResult();
@@ -1498,7 +1471,7 @@ _SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source)
 
        IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
 
-       if (pEnumerator)
+       if (pEnumerator != null)
        {
                while (pEnumerator->MoveNext() == E_SUCCESS)
                {
@@ -1528,7 +1501,7 @@ _SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source)
        }
 
        IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
-       if (pEnumerator)
+       if (pEnumerator != null)
        {
                while (pEnumerator->MoveNext() == E_SUCCESS)
                {
@@ -1553,7 +1526,7 @@ void
 _SearchBarImpl::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
        IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
-       if (pEnumerator)
+       if (pEnumerator != null)
        {
                while (pEnumerator->MoveNext() == E_SUCCESS)
                {
@@ -1578,7 +1551,7 @@ void
 _SearchBarImpl::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
        IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
-       if (pEnumerator)
+       if (pEnumerator != null)
        {
                while (pEnumerator->MoveNext() == E_SUCCESS)
                {
@@ -1603,7 +1576,7 @@ void
 _SearchBarImpl::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
        IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
-       if (pEnumerator)
+       if (pEnumerator != null)
        {
                while (pEnumerator->MoveNext() == E_SUCCESS)
                {
@@ -1817,7 +1790,7 @@ protected:
                {
                        searchFieldTextSize = _LocalizedNumParser::ToDouble(elementString, "C");
                        _ICoordinateSystemTransformer* pTransform = GetTransformer();
-                       if (pTransform)
+                       if (pTransform != null)
                        {
                                searchFieldTextSize = pTransform->Transform(searchFieldTextSize);
                        }
@@ -1977,10 +1950,10 @@ protected:
                if (pControl->GetElement(L"accessibilityHint", elementString))
                {
                        AccessibilityContainer* pContainer = pSearchBar->GetAccessibilityContainer();
-                       if (pContainer)
+                       if (pContainer != null)
                        {
                                AccessibilityElement* pElement = pContainer->GetElement(L"EditText");
-                               if (pElement)
+                               if (pElement != null)
                                {
                                        pElement->SetHint(elementString);
                                }
index 95b97f4..9f34546 100644 (file)
@@ -64,41 +64,23 @@ _SearchBarPresenter::~_SearchBarPresenter(void)
        delete __pSearchBarModel;
        __pSearchBarModel = null;
 
-       if (__pReplacedSearchFieldNormalBitmap)
-       {
-               delete __pReplacedSearchFieldNormalBitmap;
-               __pReplacedSearchFieldNormalBitmap = null;
-       }
+       delete __pReplacedSearchFieldNormalBitmap;
+       __pReplacedSearchFieldNormalBitmap = null;
 
-       if (__pReplacedSearchFieldDisabledBitmap)
-       {
-               delete __pReplacedSearchFieldDisabledBitmap;
-               __pReplacedSearchFieldDisabledBitmap = null;
-       }
+       delete __pReplacedSearchFieldDisabledBitmap;
+       __pReplacedSearchFieldDisabledBitmap = null;
 
-       if (__pReplacedSearchBarBitmap)
-       {
-               delete __pReplacedSearchBarBitmap;
-               __pReplacedSearchBarBitmap = null;
-       }
+       delete __pReplacedSearchBarBitmap;
+       __pReplacedSearchBarBitmap = null;
 
-       if (__pSearchBarBitmap)
-       {
-               delete __pSearchBarBitmap;
-               __pSearchBarBitmap = null;
-       }
+       delete __pSearchBarBitmap;
+       __pSearchBarBitmap = null;
 
-       if (__pSearchFieldEffectBitmap)
-       {
-               delete __pSearchFieldEffectBitmap;
-               __pSearchFieldEffectBitmap = null;
-       }
+       delete __pSearchFieldEffectBitmap;
+       __pSearchFieldEffectBitmap = null;
 
-       if (__pSearchBarEffectBitmap)
-       {
-               delete __pSearchBarEffectBitmap;
-               __pSearchBarEffectBitmap = null;
-       }
+       delete __pSearchBarEffectBitmap;
+       __pSearchBarEffectBitmap = null;
 }
 
 result
@@ -154,7 +136,7 @@ _SearchBarPresenter::Construct(const _SearchBar& searchBar)
        return r;
 
 CATCH:
-       if (__pIconElement)
+       if (__pIconElement != null)
        {
                __pIconElement->Destroy();
                __pIconElement = null;
@@ -327,7 +309,7 @@ _SearchBarPresenter::Draw(void)
 
        Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap();
 
-       if (!pBackgroundBitmap)
+       if (pBackgroundBitmap == null)
        {
                r = DrawSearchBarDefaultBitmap();
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -435,7 +417,7 @@ _SearchBarPresenter::DrawSearchBarDefaultBitmap(void)
 void
 _SearchBarPresenter::SetCancelButtonVisible(bool visible)
 {
-       if ((__pSearchBar->IsUsableCancelButton() == false) && visible)
+       if ((!__pSearchBar->IsUsableCancelButton()) && visible)
        {
                return;
        }
@@ -562,7 +544,7 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode)
                SetCancelButtonVisible(false);
                SetContainerVisible(false);
 
-               if (__pEdit)
+               if (__pEdit != null)
                {
                        __pEdit->ClearText();
                        __pEdit->SetBounds(__searchFieldBounds);
@@ -586,7 +568,7 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode)
                SetCancelButtonVisible(true);
                __pSearchBar->SetContentDimming();
 
-               if (__pEdit)
+               if (__pEdit != null)
                {
                        float buttonWidth = 0.0f;
                        _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
@@ -619,7 +601,7 @@ _SearchBarPresenter::InitializeInputModeLayout(void)
 {
        InitializeViewModeLayout();
 
-       if (__pSearchBar->IsUsableCancelButton() == false)
+       if (!__pSearchBar->IsUsableCancelButton())
        {
                return;
        }
@@ -756,7 +738,7 @@ _SearchBarPresenter::OnCanvasRequestedN(const FloatRectangle& bounds)
 {
        Canvas* pCanvas = null;
 
-       if (__lazyDecode == true)
+       if (__lazyDecode)
        {
                Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap();
                SysTryReturn(NID_UI_CTRL, pBackgroundBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the background bitmap.");
index 502b12d..abe7668 100644 (file)
@@ -158,7 +158,7 @@ CATCH:
        delete pTextObject;
        pTextObject = null;
 
-       if (__pVisualElement)
+       if (__pVisualElement != null)
        {
                __pVisualElement->Destroy();
                __pVisualElement = null;
@@ -176,7 +176,7 @@ _Token::ResetToken(const String& text)
        result r = E_SUCCESS;
        FloatDimension textSize;
 
-       if (__pTextBuffer)
+       if (__pTextBuffer != null)
        {
                delete[] __pTextBuffer;
                __pTextBuffer = null;
@@ -228,7 +228,7 @@ _Token::SetBounds(FloatRectangle bounds)
 {
        result r = E_SUCCESS;
        displayRect = bounds;
-       if (__pVisualElement)
+       if (__pVisualElement != null)
        {
                __pVisualElement->SetBounds(bounds);
        }
@@ -252,7 +252,7 @@ _Token::~_Token(void)
        delete[] __pTextBuffer;
        __pTextBuffer = null;
 
-       if (__pVisualElement)
+       if (__pVisualElement != null)
        {
                __pVisualElement->Destroy();
                __pVisualElement = null;
@@ -378,12 +378,12 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
        _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
        _VisualElement* pCursorVisualElement = GetCursorVisualElement();
 
-       if (pEditVisualElement && pCursorVisualElement)
+       if (pEditVisualElement != null && pCursorVisualElement != null)
        {
                VisualElement* pCursorParent = pCursorVisualElement->GetParent();
                if (pCursorParent != pEditVisualElement)
                {
-                       if (pCursorParent)
+                       if (pCursorParent != null)
                        {
                                pCursorParent->DetachChild(*pCursorVisualElement);
                                pEditVisualElement->AttachChild(*pCursorVisualElement);
@@ -391,7 +391,7 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
                }
        }
 
-       if (__pTokenList)
+       if (__pTokenList != null)
        {
                __pTokenList->RemoveAll(true);
                delete __pTokenList;
@@ -413,7 +413,7 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
        delete __pTokenBgFocusEffectBitmap;
        __pTokenBgFocusEffectBitmap = null;
 
-       if (__pDescriptionTextVisualElement)
+       if (__pDescriptionTextVisualElement != null)
        {
                __pDescriptionTextVisualElement->Destroy();
                __pDescriptionTextVisualElement = null;
@@ -422,11 +422,8 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
        delete __pDescriptionTextTextObject;
        __pDescriptionTextTextObject = null;
 
-       if (__pTimingFunction)
-       {
-               delete __pTimingFunction;
-               __pTimingFunction = null;
-       }
+       delete __pTimingFunction;
+       __pTimingFunction = null;
 
        RemoveChildAccessibilityElements();
 
@@ -454,7 +451,7 @@ _TokenEditPresenter::Initialize(const _Control& control)
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        TextObject* pTextObject = GetTextObject();
-       if (pTextObject)
+       if (pTextObject != null)
        {
                pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
                pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
@@ -620,7 +617,7 @@ _TokenEditPresenter::DrawText(void)
        if ((__isEditingToken) && (__editingTokenIndex >= 0))
        {
                _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
-               if (pToken)
+               if (pToken != null)
                {
                        _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
                        SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element of token.");
@@ -634,7 +631,7 @@ _TokenEditPresenter::DrawText(void)
 
                        Color selectedTokenColor = GetTokenEditColor(TOKEN_EDIT_STATUS_SELECTED);
                        Bitmap* pReplacementColorBackgroundBitmap = null;
-                       if (__pTokenBgBitmap)
+                       if (__pTokenBgBitmap != null)
                        {
                                pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor);
 
@@ -652,7 +649,7 @@ _TokenEditPresenter::DrawText(void)
                                pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
                        }
 
-                       if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap))
+                       if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
                                {
@@ -676,7 +673,7 @@ _TokenEditPresenter::DrawText(void)
        {
                _VisualElement* pTextVisualElement = null;
                pTextVisualElement = GetTextVisualElement();
-               if (pTextVisualElement)
+               if (pTextVisualElement != null)
                {
                        _EditPresenter::DrawText();
                }
@@ -700,7 +697,7 @@ _TokenEditPresenter::Draw(Canvas& canvas)
        {
                InitializeAtFirstDrawing();
 
-               if (IsFocused() == true)
+               if (IsFocused())
                {
                        ShowKeypad(false);
                }
@@ -731,7 +728,7 @@ _TokenEditPresenter::Draw(Canvas& canvas)
 
        _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
-       if (pToken)
+       if (pToken != null)
        {
                _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
                SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get visual element of token.");
@@ -842,7 +839,7 @@ _TokenEditPresenter::DrawToken(int count)
 
                if (__pressedTokenIndex == i && IsFocused())
                {
-                       if (__pTokenBgBitmap)
+                       if (__pTokenBgBitmap != null)
                        {
                                pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor);
 
@@ -860,7 +857,7 @@ _TokenEditPresenter::DrawToken(int count)
                                pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
                        }
 
-                       if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap))
+                       if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
                                {
@@ -882,7 +879,7 @@ _TokenEditPresenter::DrawToken(int count)
                                tokenBgColor = disabledTokenColor;
                        }
 
-                       if (__pTokenBgBitmap)
+                       if (__pTokenBgBitmap != null)
                        {
                                pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), tokenBgColor);
 
@@ -901,7 +898,7 @@ _TokenEditPresenter::DrawToken(int count)
                        }
 
 
-                       if (__pTokenBgNormalEffectBitmap && (!isCustomBitmap))
+                       if (__pTokenBgNormalEffectBitmap != null && (!isCustomBitmap))
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgNormalEffectBitmap))
                                {
@@ -916,7 +913,7 @@ _TokenEditPresenter::DrawToken(int count)
 
                if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken))
                {
-                       if (__pTokenBgReplacementFocusBitmap)
+                       if (__pTokenBgReplacementFocusBitmap != null)
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
                                {
@@ -928,7 +925,7 @@ _TokenEditPresenter::DrawToken(int count)
                                }
                        }
 
-                       if (__pTokenBgFocusEffectBitmap && (!isCustomFocusBitmap))
+                       if (__pTokenBgFocusEffectBitmap != null && (!isCustomFocusBitmap))
                        {
                                if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
                                {
@@ -1207,7 +1204,7 @@ _TokenEditPresenter::GetTokenAt(int index) const
 
        _Token* pToken = null;
        pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
-       if (pToken)
+       if (pToken != null)
        {
                tempString = pToken->GetText();
        }
@@ -1384,7 +1381,7 @@ _TokenEditPresenter::SetTokenSelected(int index, bool selected)
 
        SetDrawFocusState(false); // Manual simulation of pressed token.
 
-       if (selected == false)
+       if (!selected)
        {
                __pressedTokenIndex = -1;
        }
@@ -1599,7 +1596,7 @@ _TokenEditPresenter::SetInitialBounds(void)
        float textObjectMaxHeight = GetMaxTextHeight();
        textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f;
 
-       if (__pTokenList)
+       if (__pTokenList != null)
        {
                int tokenCount = __pTokenList->GetCount();
 
@@ -1682,7 +1679,7 @@ _TokenEditPresenter::GetDescriptionTextRect() const
 Rectangle
 _TokenEditPresenter::GetTextBounds(void) const
 {
-       if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0)
+       if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0)
        {
                _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
                SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
@@ -1707,7 +1704,7 @@ _TokenEditPresenter::GetTextBounds(void) const
 FloatRectangle
 _TokenEditPresenter::GetTextBoundsF(void) const
 {
-       if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0)
+       if ((__isPopupVisible || __isLongPressed) && __pressedTokenIndex >= 0)
        {
                _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
                SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
@@ -1918,7 +1915,7 @@ _TokenEditPresenter::DrawDescriptionText(void)
                GET_SHAPE_CONFIG(TOKENEDIT::DESCRIPTION_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, descriptionTextSize);
 
                pDescriptionFont = GetFont();
-               if (pDescriptionFont)
+               if (pDescriptionFont != null)
                {
                        float editFontSize = GetTextSize();
                        (_FontImpl::GetInstance(*pDescriptionFont))->SetSize(descriptionTextSize);
@@ -1933,7 +1930,7 @@ _TokenEditPresenter::DrawDescriptionText(void)
        pRootElement = __pTokenEdit->GetVisualElement();
        SysTryCatch(NID_UI_CTRL, pRootElement, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
 
-       if (!__pDescriptionTextVisualElement)
+       if (__pDescriptionTextVisualElement == null)
        {
                __pDescriptionTextVisualElement = new (std::nothrow) _VisualElement();
                SysTryCatch(NID_UI_CTRL, __pDescriptionTextVisualElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
@@ -1967,7 +1964,7 @@ _TokenEditPresenter::DrawDescriptionText(void)
        pDescriptionTextCanvas->Clear();
        __pDescriptionTextTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pDescriptionTextTextObject->GetTextLength());
 
-       if (IsFocused() == true)
+       if (IsFocused())
        {
                if (__pDescriptionTextTextObject->GetTextLengthAt(0) < __pDescriptionTextTextObject->GetTextLength())
                {
@@ -1989,7 +1986,7 @@ _TokenEditPresenter::DrawDescriptionText(void)
                if (!__isTitleSliding)
                {
                        _EditPresenter::StopTitleSlidingTimer();
-                       if (__pDescriptionTextTextObject->IsActionOn() == true)
+                       if (__pDescriptionTextTextObject->IsActionOn())
                        {
                                _EditPresenter::StartTitleSlidingTimer();
                                __isTitleSliding = true;
@@ -2078,7 +2075,7 @@ _TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const
        for (int i = 0; i < tokenCount; i++)
        {
                _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
-               if (pToken)
+               if (pToken != null)
                {
                        FloatRectangle tokenRect = pToken->displayRect;
                        if (tokenRect.Contains(point))
@@ -2147,7 +2144,7 @@ _TokenEditPresenter::RecalculateTokenBounds(float position)
                _Token* pToken = null;
                pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
-               if (pToken)
+               if (pToken != null)
                {
                        pToken->SetBounds(pToken->displayRect);
                }
@@ -2208,7 +2205,7 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo)
                                _Token* pToken = null;
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        pToken->SetBounds(pToken->displayRect);
                                }
@@ -2286,7 +2283,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex));
 
                        bool isParentChanged = false;
-                       if (pToken)
+                       if (pToken != null)
                        {
                                pTokenVisualElement = pToken->GetVisualElement();
                                SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
@@ -2324,7 +2321,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex));
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        pToken->currTokenLength = inputTokenString.GetLength();
                                }
@@ -2349,13 +2346,13 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
                        }
 
-                       if ((__isEditingToken == true) && (__pressedTokenIndex != -1))
+                       if ((__isEditingToken) && (__pressedTokenIndex != -1))
                        {
                                r = AttachCursorToToken();
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
                        }
 
-                       if (__isEditingToken == false)
+                       if (!__isEditingToken)
                        {
                                SetCursorDisabled(true);
                        }
@@ -2380,7 +2377,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
                        bool isParentChanged = false;
-                       if (pToken)
+                       if (pToken != null)
                        {
                                pTokenVisualElement = pToken->GetVisualElement();
                                SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
@@ -2608,9 +2605,9 @@ _TokenEditPresenter::DrawScrollBar(void)
                return E_SYSTEM;
        }
 
-       if (IsFocused() == false)
+       if (!IsFocused())
        {
-               if (__isTouchMoveInProgress == false)
+               if (!__isTouchMoveInProgress)
                {
                        pScroll->SetScrollVisibility(false);
                        return E_SUCCESS;
@@ -2733,10 +2730,10 @@ _TokenEditPresenter::OnFocusGained(void)
                {
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
-                       if (pToken)
+                       if (pToken != null)
                        {
                                _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
-                               if (pTokenVisualElement)
+                               if (pTokenVisualElement != null)
                                {
                                        pTokenVisualElement->SetShowState(true);
                                }
@@ -2766,7 +2763,7 @@ _TokenEditPresenter::OnFocusGained(void)
        }
 
        TextObject* pTextObject = GetTextObject();
-       if (pTextObject)
+       if (pTextObject != null)
        {
                pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
                pTextObject->Compose();
@@ -2811,7 +2808,7 @@ _TokenEditPresenter::OnFocusLost(void)
        if (__autoShrink)
        {
                _Scroll* pScroll = GetScrollBar();
-               if (pScroll)
+               if (pScroll != null)
                {
                        pScroll->SetScrollVisibility(false);
                }
@@ -2822,7 +2819,7 @@ _TokenEditPresenter::OnFocusLost(void)
                for (int i = 0; i < tokenCount; i++)
                {
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
-                       if (pToken)
+                       if (pToken != null)
                        {
                                pToken->SetBounds(pToken->displayRect);
                        }
@@ -2842,10 +2839,10 @@ _TokenEditPresenter::OnFocusLost(void)
                for (int i = visibleTokenCount; i < tokenCount; i++)
                {
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
-                       if (pToken)
+                       if (pToken != null)
                        {
                                _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
-                               if (pTokenVisualElement)
+                               if (pTokenVisualElement != null)
                                {
                                        pTokenVisualElement->SetShowState(false);
                                }
@@ -2875,7 +2872,7 @@ _TokenEditPresenter::OnFocusLost(void)
        }
 
        TextObject* pTextObject = GetTextObject();
-       if (pTextObject)
+       if (pTextObject != null)
        {
                pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
                pTextObject->Compose();
@@ -2952,7 +2949,7 @@ _TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& to
 
                        _Token* pToken = null;
                        pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
-                       if (pToken)
+                       if (pToken != null)
                        {
                                float tokenX = pToken->displayRect.x;
                                float tokenY = pToken->displayRect.y;
@@ -2981,7 +2978,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t
        }
 
        _Scroll* pScroll = GetScrollBar();
-       if (pScroll)
+       if (pScroll != null)
        {
                pScroll->SetScrollVisibility(false);
        }
@@ -2997,7 +2994,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t
        if (__editingTokenIndex >= 0)
        {
                pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
-               if (pToken)
+               if (pToken != null)
                {
                        int tokenX = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.x);
                        int tokenY = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.y);
@@ -3120,7 +3117,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
        }
        else
        {
-               if (__isEditingToken == false)
+               if (!__isEditingToken)
                {
                        __pressedTokenIndex = -1;
                        __focusedTokenIndex = -1;
@@ -3163,7 +3160,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
        {
                if (GetTextLength() == 0 && GetTokenCount())        // There is no candidate token.
                {
-                       if (__isEditingToken == true)
+                       if (__isEditingToken)
                        {
                                _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
                                SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
@@ -3176,7 +3173,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
 
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        pTokenVisualElement = pToken->GetVisualElement();
                                        SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3199,7 +3196,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                {
                                        _Token* pToken = null;
                                        pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
-                                       if (pToken)
+                                       if (pToken != null)
                                        {
                                                pToken->SetBounds(pToken->displayRect);
                                        }
@@ -3227,7 +3224,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
 
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
 
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        pTokenVisualElement = pToken->GetVisualElement();
                                        SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3251,7 +3248,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                        _Token* pToken = null;
                                        pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
-                                       if (pToken)
+                                       if (pToken != null)
                                        {
                                                pToken->SetBounds(pToken->displayRect);
                                        }
@@ -3276,7 +3273,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                if (__animatingIndex == (GetTokenCount() - 1))
                                {
                                        pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
-                                       if (pToken)
+                                       if (pToken != null)
                                        {
                                                pTokenVisualElement = pToken->GetVisualElement();
                                                SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3285,7 +3282,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                }
 
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        pTokenVisualElement = pToken->GetVisualElement();
                                        SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3332,7 +3329,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
        }
 
        //Backspace on Blocked text, delete full block
-       if (IsBlocked() == true)
+       if (IsBlocked())
        {
                GetBlockRange(start, end);
        }
@@ -3358,11 +3355,11 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
        {
                InitializeCopyPasteManager();
        }
-       if (IsBlocked() == true)
+       if (IsBlocked())
        {
                ReleaseTextBlock();
        }
-       if (__isEditingToken != true)
+       if (!__isEditingToken)
        {
                DrawText();
        }
@@ -3385,7 +3382,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
        Rectangle currBounds = __pTokenEdit->GetBounds();
        DeleteText(start, end);
        __previousCursorPosition = start;
-       if (__isEditingToken != true)
+       if (!__isEditingToken)
        {
                DrawText();
        }
@@ -3397,7 +3394,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
        {
                pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
-               if (pToken)
+               if (pToken != null)
                {
                        float tokenHeight = 0.0f;
                        float tokenVerticalSpacing = 0.0f;
@@ -3545,7 +3542,7 @@ _TokenEditPresenter::OnCursorTimerExpired(void)
 bool
 _TokenEditPresenter::IsTextBlockedInTokenEdit(void) const
 {
-       if ((IsBlocked() == true) && (__isEditingToken) && (__editingTokenIndex >= 0))
+       if ((IsBlocked()) && (__isEditingToken) && (__editingTokenIndex >= 0))
        {
                return true;
        }
@@ -3560,7 +3557,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc
        if (GetTokenCount())
        {
                //Scrolling is blocked when a popup is visible or when a text is blocked
-               if (IsBlocked() == true || __isLongPressed == true)
+               if (IsBlocked() || __isLongPressed)
                {
                        return false;
                }
@@ -3573,7 +3570,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc
                        if (__touchPressInfo.y > 0.0f)
                        {
                                pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
-                               if (pToken)
+                               if (pToken != null)
                                {
                                        float tokenX = pToken->displayRect.x;
                                        float tokenY = pToken->displayRect.y;
@@ -3597,7 +3594,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc
                if (!(__pTokenEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL))
                {
                        _Scroll* pScroll = GetScrollBar();
-                       if (pScroll)
+                       if (pScroll != null)
                        {
                                float tokenBottomMargin = 0.0f;
                                GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
@@ -3637,7 +3634,7 @@ _TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation
                _Token* pToken = null;
                pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
-               if (pToken)
+               if (pToken != null)
                {
                        pToken->SetBounds(pToken->displayRect);
                }
@@ -3668,7 +3665,7 @@ _TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn
        VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation));
        VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance());
 
-       if (pPresentation && pAnimation)
+       if (pPresentation != null && pAnimation != null)
        {
                float diffX = 0.0f;
                float diffY = 0.0f;
@@ -3851,7 +3848,7 @@ _TokenEditPresenter::AttachCursorToToken(void)
                _VisualElement* pTokenVisualElement = null;
 
                pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
-               if (pToken)
+               if (pToken != null)
                {
                        pTokenVisualElement = pToken->GetVisualElement();
                        SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
@@ -3888,7 +3885,7 @@ _TokenEditPresenter::DetachCursorFromToken(void)
 
                pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
 
-               if (pToken)
+               if (pToken != null)
                {
                        pTokenVisualElement = pToken->GetVisualElement();
                        SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3922,7 +3919,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void)
 
        pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex));
 
-       if (pToken)
+       if (pToken != null)
        {
                pTokenVisualElement = pToken->GetVisualElement();
                SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
@@ -3970,7 +3967,7 @@ _TokenEditPresenter::ExitTokenEditingMode(void)
                _Token* pToken = null;
                pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
 
-               if (pToken)
+               if (pToken != null)
                {
                        pToken->SetBounds(pToken->displayRect);
                }
@@ -4158,7 +4155,7 @@ _TokenEditPresenter::AddChildAccessibilityElements(void)
                _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
                SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
-               if (pContainer)
+               if (pContainer != null)
                {
                        _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
                        SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
@@ -4209,7 +4206,7 @@ _TokenEditPresenter::AppendTokenAccessibilityElement(void)
        _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
        SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
-       if (pContainer)
+       if (pContainer != null)
        {
                _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
                SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
@@ -4234,7 +4231,7 @@ _TokenEditPresenter::InsertTokenAccessibilityElementAt(int index)
        _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
        SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
-       if (pContainer)
+       if (pContainer != null)
        {
                _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
                SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
@@ -4255,7 +4252,7 @@ _TokenEditPresenter::RemoveTokenAccessibilityElementAt(int index)
        _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
        _AccessibilityElement* pAccessibilityElement = null;
 
-       if (pContainer)
+       if (pContainer != null)
        {
                if (__accessibilityElements.GetCount() > 0)
                {
@@ -4283,7 +4280,7 @@ _TokenEditPresenter::UpdateTokenAccessibilityBounds(void)
 
                if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS)
                {
-                       if (pAccessibilityElement)
+                       if (pAccessibilityElement != null)
                        {
                                pAccessibilityElement->SetBounds(pToken->displayRect);
                        }
@@ -4297,7 +4294,7 @@ _TokenEditPresenter::UpdateTitleAccessibilityBounds(const FloatRectangle& titleB
 {
        _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement();
 
-       if (!pTitleAccessibilityElement)
+       if (pTitleAccessibilityElement == null)
        {
                return E_SUCCESS;
        }
@@ -4379,7 +4376,7 @@ result
 _TokenEditPresenter::ScrollToTitleAccessibilityElement(void)
 {
        _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement();
-       if (pTitleAccessibilityElement)
+       if (pTitleAccessibilityElement != null)
        {
                FloatRectangle titleTextBounds = pTitleAccessibilityElement->GetBounds();
                if (titleTextBounds.y < 0)
@@ -4425,10 +4422,10 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr
        r = __accessibilityElements.GetAt(__focusOutIndex, pPreviousAccessibilityElement);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y)  //Left flick
+       if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y)  //Left flick
        {
                pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex - 1));
-               if (pToken)
+               if (pToken != null)
                {
                        if (pToken->displayRect.y < 0.0f && __focusOutIndex > 0)
                        {
@@ -4440,10 +4437,10 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr
                }
        }
 
-       if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y)  //Right flick
+       if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y)  //Right flick
        {
                pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex + 1));
-               if (pToken)
+               if (pToken != null)
                {
                        if (pToken->displayRect.y + pToken->displayRect.height > __pTokenEdit->GetBoundsF().height)
                        {
@@ -4458,7 +4455,7 @@ _TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& contr
        if (pToken == null) //Draw Cursor Accessibility Element
        {
                _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement();
-               if (pCursorAccessibilityElement && pPreviousAccessibilityElement && pCursorAccessibilityElement != pPreviousAccessibilityElement)
+               if (pCursorAccessibilityElement != null && pPreviousAccessibilityElement != null && pCursorAccessibilityElement != pPreviousAccessibilityElement)
                {
                        if (GetTextBoundsF().y - pPreviousAccessibilityElement->GetBounds().y > pPreviousAccessibilityElement->GetBounds().height)  //check for different lines
                        {
@@ -4504,7 +4501,7 @@ _TokenEditPresenter::OnAccessibilityActionPerformed(const _AccessibilityContaine
                        if (__pTokenEdit->IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode.
                        {
                                _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement();
-                               if (pCursorAccessibilityElement)
+                               if (pCursorAccessibilityElement != null)
                                {
                                        _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pCursorAccessibilityElement);
                                        _AccessibilityManager::GetInstance()->RequestToDrawFocusUi();