}
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
- if (pContainer)
+ if (pContainer != null)
{
pContainer->Activate(true);
}
delete __pSearchBarPresenter;
__pSearchBarPresenter = null;
- if (__pClippedGroupControl)
+ if (__pClippedGroupControl != null)
{
DetachChild(*__pClippedGroupControl);
__pClippedGroupControl = null;
}
- if (__pContainer)
+ if (__pContainer != null)
{
DetachChild(*__pContainer);
__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;
__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);
__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");
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);
}
SearchBarButtonStatus buttonStatus = SEARCH_BAR_BUTTON_STATUS_NORMAL;
- if (__isButtonEnabled == false)
+ if (!__isButtonEnabled)
{
buttonStatus = SEARCH_BAR_BUTTON_STATUS_DISABLED;
}
__pSearchBarPresenter->OnBoundsChanged();
}
- if (__pAccessibilitySearchBarElement)
+ if (__pAccessibilitySearchBarElement != null)
{
__pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
}
SetFocused();
- if (__pActionEvent)
+ if (__pActionEvent != null)
{
IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId);
result r = GetLastResult();
{
if (!__isKeypadOpening)
{
- if (__pKeypadEvent)
+ if (__pKeypadEvent != null)
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED);
result r = GetLastResult();
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();
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();
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();
void
_SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction)
{
- if (__pKeypadEvent)
+ if (__pKeypadEvent != null)
{
IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION);
result r = GetLastResult();
void
_SearchBar::OnTextBlockSelected(_Control& source, int start, int end)
{
- if (__pTextBlockEvent)
+ if (__pTextBlockEvent != null)
{
IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end);
result r = GetLastResult();
_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);
}
__isUserContainerBounds = true;
// set bounds
- if (__pContainer)
+ if (__pContainer != null)
{
r = __pContainer->SetBounds(__contentAreaBounds);
SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
_SearchBarImpl::~_SearchBarImpl(void)
{
- if (__pSearchBar)
+ if (__pSearchBar != null)
{
SetContent(null);
if (__pSearchBar->GetClippedGroupControl())
}
}
- 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*
Color color;
_Edit* pEdit = __pSearchBar->GetSearchField();
- if (pEdit)
+ if (pEdit != null)
{
switch (status)
{
result r = E_SUCCESS;
_Edit* pEdit = __pSearchBar->GetSearchField();
- if (pEdit)
+ if (pEdit != null)
{
switch (status)
{
void
_SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage)
{
- if (__pPublicLanguageEvent)
+ if (__pPublicLanguageEvent != null)
{
IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage);
result r = GetLastResult();
IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
- if (pEnumerator)
+ if (pEnumerator != null)
{
while (pEnumerator->MoveNext() == E_SUCCESS)
{
}
IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
- if (pEnumerator)
+ if (pEnumerator != null)
{
while (pEnumerator->MoveNext() == E_SUCCESS)
{
_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)
{
_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)
{
_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)
{
{
searchFieldTextSize = _LocalizedNumParser::ToDouble(elementString, "C");
_ICoordinateSystemTransformer* pTransform = GetTransformer();
- if (pTransform)
+ if (pTransform != null)
{
searchFieldTextSize = pTransform->Transform(searchFieldTextSize);
}
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);
}
delete pTextObject;
pTextObject = null;
- if (__pVisualElement)
+ if (__pVisualElement != null)
{
__pVisualElement->Destroy();
__pVisualElement = null;
result r = E_SUCCESS;
FloatDimension textSize;
- if (__pTextBuffer)
+ if (__pTextBuffer != null)
{
delete[] __pTextBuffer;
__pTextBuffer = null;
{
result r = E_SUCCESS;
displayRect = bounds;
- if (__pVisualElement)
+ if (__pVisualElement != null)
{
__pVisualElement->SetBounds(bounds);
}
delete[] __pTextBuffer;
__pTextBuffer = null;
- if (__pVisualElement)
+ if (__pVisualElement != null)
{
__pVisualElement->Destroy();
__pVisualElement = null;
_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);
}
}
- if (__pTokenList)
+ if (__pTokenList != null)
{
__pTokenList->RemoveAll(true);
delete __pTokenList;
delete __pTokenBgFocusEffectBitmap;
__pTokenBgFocusEffectBitmap = null;
- if (__pDescriptionTextVisualElement)
+ if (__pDescriptionTextVisualElement != null)
{
__pDescriptionTextVisualElement->Destroy();
__pDescriptionTextVisualElement = null;
delete __pDescriptionTextTextObject;
__pDescriptionTextTextObject = null;
- if (__pTimingFunction)
- {
- delete __pTimingFunction;
- __pTimingFunction = null;
- }
+ delete __pTimingFunction;
+ __pTimingFunction = null;
RemoveChildAccessibilityElements();
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);
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.");
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);
pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
}
- if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap))
+ if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
{
{
_VisualElement* pTextVisualElement = null;
pTextVisualElement = GetTextVisualElement();
- if (pTextVisualElement)
+ if (pTextVisualElement != null)
{
_EditPresenter::DrawText();
}
{
InitializeAtFirstDrawing();
- if (IsFocused() == true)
+ if (IsFocused())
{
ShowKeypad(false);
}
_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.");
if (__pressedTokenIndex == i && IsFocused())
{
- if (__pTokenBgBitmap)
+ if (__pTokenBgBitmap != null)
{
pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedTokenColor);
pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect);
}
- if (__pTokenBgPressedEffectBitmap && (!isCustomBitmap))
+ if (__pTokenBgPressedEffectBitmap != null && (!isCustomBitmap))
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgPressedEffectBitmap))
{
tokenBgColor = disabledTokenColor;
}
- if (__pTokenBgBitmap)
+ if (__pTokenBgBitmap != null)
{
pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pTokenBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), tokenBgColor);
}
- if (__pTokenBgNormalEffectBitmap && (!isCustomBitmap))
+ if (__pTokenBgNormalEffectBitmap != null && (!isCustomBitmap))
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgNormalEffectBitmap))
{
if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken))
{
- if (__pTokenBgReplacementFocusBitmap)
+ if (__pTokenBgReplacementFocusBitmap != null)
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
{
}
}
- if (__pTokenBgFocusEffectBitmap && (!isCustomFocusBitmap))
+ if (__pTokenBgFocusEffectBitmap != null && (!isCustomFocusBitmap))
{
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
{
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
- if (pToken)
+ if (pToken != null)
{
tempString = pToken->GetText();
}
SetDrawFocusState(false); // Manual simulation of pressed token.
- if (selected == false)
+ if (!selected)
{
__pressedTokenIndex = -1;
}
float textObjectMaxHeight = GetMaxTextHeight();
textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f;
- if (__pTokenList)
+ if (__pTokenList != null)
{
int tokenCount = __pTokenList->GetCount();
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.");
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.");
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);
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.");
pDescriptionTextCanvas->Clear();
__pDescriptionTextTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pDescriptionTextTextObject->GetTextLength());
- if (IsFocused() == true)
+ if (IsFocused())
{
if (__pDescriptionTextTextObject->GetTextLengthAt(0) < __pDescriptionTextTextObject->GetTextLength())
{
if (!__isTitleSliding)
{
_EditPresenter::StopTitleSlidingTimer();
- if (__pDescriptionTextTextObject->IsActionOn() == true)
+ if (__pDescriptionTextTextObject->IsActionOn())
{
_EditPresenter::StartTitleSlidingTimer();
__isTitleSliding = true;
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))
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
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.");
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();
}
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);
}
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.");
return E_SYSTEM;
}
- if (IsFocused() == false)
+ if (!IsFocused())
{
- if (__isTouchMoveInProgress == false)
+ if (!__isTouchMoveInProgress)
{
pScroll->SetScrollVisibility(false);
return E_SUCCESS;
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
_VisualElement* pTokenVisualElement = pToken->GetVisualElement();
- if (pTokenVisualElement)
+ if (pTokenVisualElement != null)
{
pTokenVisualElement->SetShowState(true);
}
}
TextObject* pTextObject = GetTextObject();
- if (pTextObject)
+ if (pTextObject != null)
{
pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE);
pTextObject->Compose();
if (__autoShrink)
{
_Scroll* pScroll = GetScrollBar();
- if (pScroll)
+ if (pScroll != null)
{
pScroll->SetScrollVisibility(false);
}
for (int i = 0; i < tokenCount; i++)
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
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);
}
}
TextObject* pTextObject = GetTextObject();
- if (pTextObject)
+ if (pTextObject != null)
{
pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
pTextObject->Compose();
_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;
}
_Scroll* pScroll = GetScrollBar();
- if (pScroll)
+ if (pScroll != null)
{
pScroll->SetScrollVisibility(false);
}
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);
}
else
{
- if (__isEditingToken == false)
+ if (!__isEditingToken)
{
__pressedTokenIndex = -1;
__focusedTokenIndex = -1;
{
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.");
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.");
{
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
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.");
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
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.");
}
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.");
}
//Backspace on Blocked text, delete full block
- if (IsBlocked() == true)
+ if (IsBlocked())
{
GetBlockRange(start, end);
}
{
InitializeCopyPasteManager();
}
- if (IsBlocked() == true)
+ if (IsBlocked())
{
ReleaseTextBlock();
}
- if (__isEditingToken != true)
+ if (!__isEditingToken)
{
DrawText();
}
Rectangle currBounds = __pTokenEdit->GetBounds();
DeleteText(start, end);
__previousCursorPosition = start;
- if (__isEditingToken != true)
+ if (!__isEditingToken)
{
DrawText();
}
{
pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
- if (pToken)
+ if (pToken != null)
{
float tokenHeight = 0.0f;
float tokenVerticalSpacing = 0.0f;
bool
_TokenEditPresenter::IsTextBlockedInTokenEdit(void) const
{
- if ((IsBlocked() == true) && (__isEditingToken) && (__editingTokenIndex >= 0))
+ if ((IsBlocked()) && (__isEditingToken) && (__editingTokenIndex >= 0))
{
return true;
}
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;
}
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;
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);
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
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;
_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.");
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.");
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.");
_Token* pToken = null;
pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
- if (pToken)
+ if (pToken != null)
{
pToken->SetBounds(pToken->displayRect);
}
_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.");
_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.");
_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.");
_AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
_AccessibilityElement* pAccessibilityElement = null;
- if (pContainer)
+ if (pContainer != null)
{
if (__accessibilityElements.GetCount() > 0)
{
if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS)
{
- if (pAccessibilityElement)
+ if (pAccessibilityElement != null)
{
pAccessibilityElement->SetBounds(pToken->displayRect);
}
{
_AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement();
- if (!pTitleAccessibilityElement)
+ if (pTitleAccessibilityElement == null)
{
return E_SUCCESS;
}
_TokenEditPresenter::ScrollToTitleAccessibilityElement(void)
{
_AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement();
- if (pTitleAccessibilityElement)
+ if (pTitleAccessibilityElement != null)
{
FloatRectangle titleTextBounds = pTitleAccessibilityElement->GetBounds();
if (titleTextBounds.y < 0)
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)
{
}
}
- 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)
{
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
{
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();