__pEditTimePresenter->Draw();
- if(likely((_AccessibilityManager::IsActivated())))
+ if(unlikely((_AccessibilityManager::IsActivated())))
{
UpdateAccessibilityElement();
}
__pEditTimePresenter->Initialize();
- if (__pAccessibilityEditTimeElement)
- {
- __pAccessibilityEditTimeElement->SetBounds(GetClientBoundsF());
- }
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityEditTimeElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime accessibility element must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityHourElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Hour accessibility element must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityMinuteElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Minute accessibility element must not be null.");
+
+ __pAccessibilityEditTimeElement->SetBounds(GetClientBoundsF());
FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR);
FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE);
FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM);
- if (__pAccessibilityHourElement)
- {
- __pAccessibilityHourElement->SetBounds(hourBounds);
- }
- if (__pAccessibilityMinuteElement)
- {
- __pAccessibilityMinuteElement->SetBounds(minuteBounds);
- }
+ __pAccessibilityHourElement->SetBounds(hourBounds);
+ __pAccessibilityMinuteElement->SetBounds(minuteBounds);
+
if (__pAccessibilityAmPmElement)
{
__pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height));
String string;
- if (__pAccessibilityEditTimeElement == null && __pAccessibilityHourElement == null
- && __pAccessibilityMinuteElement == null)
- {
- return;
- }
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityEditTimeElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime accessibility element must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityHourElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Hour accessibility element must not be null.");
+ SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityMinuteElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Minute accessibility element must not be null.");
if (__title.IsEmpty() == false)
{
if (Is24HourNotationEnabled() == false)
{
_AccessibilityContainer* pContainer = GetAccessibilityContainer();
+ SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- if (pContainer != null && __pAccessibilityAmPmElement == null)
+ if (__pAccessibilityAmPmElement == null)
{
__pAccessibilityAmPmElement = new (std::nothrow) _AccessibilityElement(true);
SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityAmPmElement != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height));
__pAccessibilityMinuteElement->SetBounds(FloatRectangle(minuteBounds.x, ampmBounds.y, minuteBounds.width, ampmBounds.height));
}
- else if (__pAccessibilityAmPmElement != null)
+ else
{
__pAccessibilityAmPmElement->Activate(true);
}