}
pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- if (pTextElement == null)
- {
- break;
- }
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
currentLength = Math::Min(textLength, pTextElement->GetTextLength());
}
pTextElement = static_cast < TextElement* >(pEnum->GetCurrent());
- if (pTextElement == null)
- {
- break;
- }
+ SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET);
currentLength = Math::Min(textLength, pTextElement->GetTextLength());
_FloatPair currentGap;
IEnumeratorT<_FloatPair >* pGapEnum = pGapList->GetEnumeratorN();
+
for (int i = 0; i <= blockStartTextIndex; i++)
{
pGapEnum->MoveNext();
else
{
_FontImpl* pFontImpl = _FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont()));
- SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+ SysTryCatch(NID_GRP, pFontImpl, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
Collection::ArrayListT<_FloatPair> pCurrentElementGapListF;
Release(pEnum);
return E_SUCCESS;
+
+CATCH:
+ Release(pEnum);
+
+ return r;
}
int
{
int firstDisplayLineIndex = __pCurrentTextColumn->GetFirstDisplayLineIndex();
TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(firstDisplayLineIndex);
+ SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (firstDisplayLineIndex = %d)", firstDisplayLineIndex);
+
int firstDisplayTextIndex = pTextLine->GetTextOffset();
int displayableTextLength = 0;
int displayableLineCount = __pCurrentTextColumn->CalculateDisplayableLineCount(displayRect, action);
for (int i = firstDisplayLineIndex; i < lastDisplayLineIndex; i++)
{
pTextLine = __pCurrentTextColumn->GetTextLine(i);
+ SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (line index = %d)", i);
+
displayableTextLength += pTextLine->GetTextLength();
}
pTextLine = __pCurrentTextColumn->GetTextLine(lastDisplayLineIndex);
+ SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lastDisplayLineIndex = %d)", lastDisplayLineIndex);
int lineOffset = pTextLine->GetTextOffset();
int lineLength = pTextLine->GetTextLength();
}
}}} // Tizen::Graphics::_Text
-