text/FGrp_TextTextSimple.cpp
text/FGrp_TextTextSimpleList.cpp
text/FGrp_TextTextUtility.cpp
- text/FGrp_TextTextWidthManager.cpp
)
namespace _Text
{
class TextElement;
-class TextWidthManager;
class TextComposite;
class TextColumn;
bool IsAlternateLookEnabled(void) const;
- result SetWidthManagerEnabled(bool widthManagerEnable);
-
- bool IsWidthManagerEnabled(void) const;
-
result SetFirstDisplayLineIndexFromTextIndex(int textIndex);
result SetFirstDisplayLineIndex(int lineIndex);
int GetTextIndexFromPositionInNoneWrap(float x, float y, bool cursorMode = true) const;
- result UpdateChangedInfo(int startTextIndex, int textLength = -1, bool initTextWidthManager = true);
+ result UpdateChangedInfo(int startTextIndex, int textLength = -1);
result NotifyTextAdded(int textIndex, int textLength);
bool __isEmailLinkColorDefined;
bool __isPhoneNumberLinkColorDefined;
Color __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_MAX];
- TextWidthManager* __pTextWidthManager;
TextObjectSweepInfo __sweepInfo;
#include "FGrp_TextTextComposite.h"
#include "FGrp_TextTextUtility.h"
#include "FGrp_CanvasImpl.h"
-#include "FGrp_TextTextWidthManager.h"
#include "FGrp_CoordinateSystemUtils.h"
using namespace Tizen::Base;
__middleEllipsisTextLengthInTail = 0;
__middleEllipsisWidth = 0;
__isChanged = false;
- __pTextWidthManager = null;
- __widthManagerEnabled = false;
__pSweepInfo = null;
}
case TEXT_OBJECT_WRAP_TYPE_CHARACTER:
{
__pCurrentTextColumn->PrepareCompose();
- lineCount = ComposeInNormalWrap(rect);
+ lineCount = ComposeInWrap(rect);
__pCurrentTextColumn->FinishCompose();
break;
}
else
{
__pCurrentTextColumn->PrepareCompose();
- lineCount = ComposeInWordWrap(rect);
+ lineCount = ComposeInWrap(rect);
__pCurrentTextColumn->CompareDeletedLine();
__pCurrentTextColumn->FinishCompose();
}
}
int
-TextComposite::ComposeInNormalWrap(FloatRectangle& rect)
-{
- return ComposeInWrap(rect);
-}
-
-int
-TextComposite::ComposeInWordWrap(FloatRectangle& rect)
-{
- if (IsWidthManagerEnabled())
- {
- return ComposeInWrapByTextWidth(rect);
- }
- else
- {
- return ComposeInWrap(rect);
- }
-}
-
-int
TextComposite::ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect)
{
int endType = TEXT_RETBY_NORMAL;
return __pCurrentTextColumn->IsComposeDone();
}
-int
-TextComposite::ComposeInWrapByTextWidth(FloatRectangle& rect)
-{
- SysTryReturn(NID_GRP, __pCurrentTextColumn, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
-
- FloatRectangle lineBounds;
- int lineCount = 0;
- int textIndex = 0;
- int remainingLength = 0;
- float remainingWidth = 0;
- float remainingHeight = 0;
- float offsetY = 0;
- bool hasPrevLine = false;
- int endType = TEXT_RETBY_NORMAL;
- FloatDimension lineTextSize;
- int lineOffset = 0;
- int lineLength = 0;
- TextLine* pTextLine = null;
-
- pTextLine = __pCurrentTextColumn->GetPrevLineChangedStartLine();
- if (pTextLine != null)
- {
- endType = pTextLine->GetEndType();
- lineOffset = pTextLine->GetTextOffset();
- lineLength = pTextLine->GetTextLength();
- lineBounds = pTextLine->GetBoundsF();
- pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height);
-
- if (endType != TEXT_RETBY_LINEFEED)
- {
- textIndex = lineOffset;
- remainingLength = __length - textIndex;
- remainingWidth = rect.width;
- hasPrevLine = true;
-
- if (remainingLength == 0)
- {
- return -1;
- }
- }
- else
- {
- textIndex = lineOffset + lineLength;
- remainingLength = __length - textIndex;
- remainingWidth = rect.width;
- offsetY = lineBounds.y + lineBounds.height;
- lineBounds.y = offsetY;
-
- if (remainingLength == 0)
- {
- lineTextSize.height = lineBounds.height;
-
- pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
-
- pTextLine->SetBounds(lineBounds);
- pTextLine->SetRegion(0.0f, lineTextSize.height);
- pTextLine->SetTextLength(0);
- pTextLine->SetTextOffset(textIndex);
- pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
- GetTextExtentList(pTextLine);
-
- __pCurrentTextColumn->AddLineDuringCompose(pTextLine);
-
- return 1;
- }
- }
- }
- else
- {
- textIndex = 0;
- remainingLength = __length;
- remainingWidth = rect.width;
- lineBounds.x = rect.x;
- lineBounds.y = 0;
- lineBounds.width = rect.width;
- }
-
- remainingHeight = rect.height;
-
- __pTextWidthManager->StartCompose(textIndex);
-
- TextLineComposeInfo composeInfo;
- composeInfo.height = 0;
- composeInfo.width = 0;
- composeInfo.length = 0;
- composeInfo.endType = TEXT_RETBY_NORMAL;
-
- while (remainingLength != 0)
- {
- __pTextWidthManager->GetCurrentLineInfo(remainingWidth, composeInfo);
- composeInfo.height += __lineSpacing;
-
- if (hasPrevLine)
- {
- lineBounds.height = composeInfo.height;
- pTextLine->SetBounds(lineBounds);
- pTextLine->SetRegion(composeInfo.width, composeInfo.height);
- pTextLine->SetTextLength(composeInfo.length);
- pTextLine->SetEndType(composeInfo.endType);
- hasPrevLine = false;
- }
- else
- {
- if (composeInfo.length == 0)
- {
- composeInfo.length = 1;
- }
-
- pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
-
- lineBounds.height = composeInfo.height;
-
- pTextLine->SetBounds(lineBounds);
- pTextLine->SetTextOffset(textIndex);
- pTextLine->SetRegion(composeInfo.width, composeInfo.height);
- pTextLine->SetTextLength(composeInfo.length);
- pTextLine->SetEndType(composeInfo.endType);
- GetTextExtentList(pTextLine);
-
- __pCurrentTextColumn->AddLineDuringCompose(pTextLine);
- lineCount++;
- }
-
- if (__pCurrentTextColumn->IsComposeDone())
- {
- break;
- }
-
- textIndex += composeInfo.length;
- remainingLength -= composeInfo.length;
- remainingHeight -= composeInfo.height;
-
- if (remainingLength > 0)
- {
- float nextY = lineBounds.y + lineBounds.height;
-
- lineBounds.x = rect.x;
- lineBounds.y = nextY;
- lineBounds.width = rect.width;
- lineTextSize.height = 0;
- remainingWidth = rect.width;
- }
- else
- {
- if (composeInfo.endType == TEXT_RETBY_LINEFEED)
- {
- float nextY = lineBounds.y + lineBounds.height;
- lineTextSize.height = lineBounds.height;
-
- pTextLine = new (std::nothrow)TextLine(this);
- SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
-
- lineBounds.x = rect.x;
- lineBounds.y = nextY;
- lineBounds.width = rect.width;
- lineBounds.height = lineTextSize.height;
-
- pTextLine->SetBounds(lineBounds);
- pTextLine->SetRegion(0.0f, lineTextSize.height);
- pTextLine->SetTextLength(0);
- pTextLine->SetTextOffset(textIndex);
- pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
- GetTextExtentList(pTextLine);
-
- __pCurrentTextColumn->AddLineDuringCompose(pTextLine);
-
- lineCount++;
-
- pTextLine = null;
- break;
- }
- else
- {
- pTextLine = null;
- }
- }
- }
-
- __pTextWidthManager->EndCompose();
-
- FloatDimension columnSize;
- __pCurrentTextColumn->GetRegion(0, __length, columnSize.width, columnSize.height);
- rect.height = columnSize.height;
-
- return lineCount;
-}
-
result
TextComposite::GetCutLinkObjectInfo(int cutLinkIndex, int& textStartIndex, int& textLength) const
{
return text;
}
-void
-TextComposite::SetTextWidthManager(TextWidthManager* pTextWidthManager)
-{
- __pTextWidthManager = pTextWidthManager;
-}
-
-void
-TextComposite::SetWidthManagerEnabled(bool widthManagerEnable)
-{
- __widthManagerEnabled = widthManagerEnable;
-}
-
-bool
-TextComposite::IsWidthManagerEnabled(void) const
-{
- return __widthManagerEnabled;
-}
-
result
TextComposite::SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int textLength)
{
class TextLine;
class TextColumn;
class TextCutLinkListInfo;
-class TextWidthManager;
struct NoneWrapComposeInfo;
class TextComposite
float GetComposePartialLimitHeightF(void) const;
- void SetWidthManagerEnabled(bool widthManagerEnable);
-
- bool IsWidthManagerEnabled(void) const;
-
void SetTextObjectEllipsisType(TextObjectEllipsisType type);
TextObjectEllipsisType GetTextObjectEllipsisType(void) const;
bool InitPartialComposeMode(void);
- void SetTextWidthManager(TextWidthManager* pTextWidthManager);
-
TextElement* SearchTextElement(TextElementType type, int textIndex, int& elementTextOffset) const;
TextElementType GetObjectType(int textIndex) const;
private:
int ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null);
- int ComposeInNormalWrap(FloatRectangle& rect);
-
- int ComposeInWordWrap(FloatRectangle& rect);
-
int ComposeInWrap(FloatRectangle& rect);
- int ComposeInWrapByTextWidth(FloatRectangle& rect);
-
int ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect);
int ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect);
int __middleEllipsisTextLengthInTail;
float __headEllipsisWidth;
int __headEllipsisTextLength;
- TextWidthManager* __pTextWidthManager;
- bool __widthManagerEnabled;
TextObjectSweepInfo* __pSweepInfo;
TextCutLink::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align,
const TextObjectActionType action)
{
- SysTryReturn(NID_GRP
- , displayRect.x >= 0 && displayRect.y >= 0
+ SysTryReturn(NID_GRP, displayRect.x >= 0 && displayRect.y >= 0
, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
- return TextSimple::Draw(canvasImpl, displayRect, startTextIndex, textLength, align, action);
+ return Draw(canvasImpl, displayRect, startTextIndex, textLength, align, action);
}
result
TextCutLink::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align,
const TextObjectActionType action)
{
- Rectangle intDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
- return Draw(canvasImpl, intDisplayRect, startTextIndex, textLength, align, action);
+ return TextSimple::Draw(canvasImpl, displayRect, startTextIndex, textLength, align, action);
}
TextElement*
pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, _pText, _length,
TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, _pFont, _foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP
- , pLinkElement
- , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
TextElement::CopyMembers(pLinkElement);
TextCutLink* pLinkElement = null;
- SysTryReturn(NID_GRP
- , textStartIndex < _length
- , null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_GRP, textStartIndex < _length, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
if (textStartIndex + textLength > _length)
{
textLength = _length - textStartIndex;
}
- SysTryReturn(NID_GRP
- , textLength >= 0
- , null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_GRP, textLength >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
pText = &_pText[_offset + textStartIndex];
pLinkElement = new (std::nothrow) TextCutLink(__isEditable, __linkType, pText, textLength, _sourceType,
_pFont, _foregroundColor, _backgroundColor, _outlineColor);
- SysTryReturn(NID_GRP
- , pLinkElement
- , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+ SysTryReturn(NID_GRP, pLinkElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
pLinkElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled;
pLinkElement->__isEdited = __isEdited;
result
TextCutLink::SetTextOffset(int offset)
{
- SysTryReturn(NID_GRP
- , __isEdited == true
- , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_GRP, __isEdited == true, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
return TextSimple::SetTextOffset(offset);
}
result
TextCutLink::ChangeTextOffset(wchar_t* pText, int gap)
{
- SysTryReturn(NID_GRP
- , __isEdited == true
- , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+ SysTryReturn(NID_GRP, __isEdited == true, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
return TextSimple::ChangeTextOffset(pText, gap);
}
#include "FGrp_TextTextLine.h"
#include "FGrp_TextTextColumn.h"
#include "FGrp_TextTextUtility.h"
-#include "FGrp_TextTextWidthManager.h"
#include "FGrp_Screen.h"
#include "FGrp_CoordinateSystemUtils.h"
__rect.height = 0;
__slidingGap = 30;
__slidingStep = 2;
- __pTextWidthManager = null;
__linkViewModeEnabled = false;
__isUrlLinkColorDefined = false;
__isEmailLinkColorDefined = false;
{
Release(__pCompositeText);
Release(__pTextColumn);
- Release(__pTextWidthManager);
Release(__pDefaultFont);
}
__slidingStep = 2;
__isAlternateLookEnabled = false;
__linkViewModeEnabled = false;
- __pTextWidthManager = null;
__pCompositeText = new (std::nothrow)TextComposite();
SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
Release(__pDefaultFont);
Release(__pCompositeText);
Release(__pTextColumn);
- Release(__pTextWidthManager);
return r;
}
__slidingStep = 2;
__isAlternateLookEnabled = false;
__linkViewModeEnabled = false;
- __pTextWidthManager = null;
__rect = _CoordinateSystemUtils::ConvertToFloat(rect);
__pCompositeText = new (std::nothrow)TextComposite();
Release(__pDefaultFont);
Release(__pCompositeText);
Release(__pTextColumn);
- Release(__pTextWidthManager);
return r;
}
__slidingStep = 2;
__isAlternateLookEnabled = false;
__linkViewModeEnabled = false;
- __pTextWidthManager = null;
__rect = rect;
__pCompositeText = new (std::nothrow)TextComposite();
Release(__pDefaultFont);
Release(__pCompositeText);
Release(__pTextColumn);
- Release(__pTextWidthManager);
return r;
}
}
result
-TextObject::UpdateChangedInfo(int startTextIndex, int textLength, bool initTextWidthManager)
+TextObject::UpdateChangedInfo(int startTextIndex, int textLength)
{
result r = E_SUCCESS;
{
r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_UNKONWN, startTextIndex, 0);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- if (__pCompositeText->IsWidthManagerEnabled() && __pTextWidthManager && initTextWidthManager)
- {
- __pTextWidthManager->Finalize();
- if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD)
- {
- __pTextWidthManager->Initialize(__pCompositeText->GetTextLength());
- }
- }
}
__isChanged = true;
if (__rect.width != rect.width)
{
- UpdateChangedInfo(0, 0, false);
+ UpdateChangedInfo(0, 0);
}
__rect = rect;
r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_INSERT, textIndex, textLength);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- if ((__pCompositeText->IsWidthManagerEnabled() == true) && (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD))
- {
- __pTextWidthManager->InformTextInsert(textIndex, textLength);
- }
-
__isChanged = true;
return E_SUCCESS;
r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_REMOVE, textIndex, textLength);
SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- if ((__pCompositeText->IsWidthManagerEnabled() == true) && (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD))
- {
- if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD)
- {
- __pTextWidthManager->InformTextRemove(textIndex, textLength);
- }
- }
__isChanged = true;
return E_SUCCESS;
}
result
-TextObject::SetWidthManagerEnabled(bool enable)
-{
- IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
-
- if (__pCompositeText->IsWidthManagerEnabled() == enable)
- {
- return E_SUCCESS;
- }
-
- if (enable)
- {
- __pTextWidthManager = new (std::nothrow)TextWidthManager(__pCompositeText);
- SysTryReturn(NID_GRP, __pTextWidthManager, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
-
- __pCompositeText->SetTextWidthManager(__pTextWidthManager);
- __pTextWidthManager->Initialize(__pCompositeText->GetTextLength());
- }
- else
- {
- Release(__pTextWidthManager);
- }
-
- __pCompositeText->SetWidthManagerEnabled(enable);
-
- return E_SUCCESS;
-}
-
-bool
-TextObject::IsWidthManagerEnabled(void) const
-{
- IF_NOT_CONSTRUCTED(return false);
-
- return __pCompositeText->IsWidthManagerEnabled();
-}
-
-result
TextObject::ChangeText(int textIndex)
{
IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
IF_NOT_CONSTRUCTED(return FloatRectangle(-1, -1, -1, -1));
SysTryReturn(NID_GRP, lineIndex >= 0, FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG
- , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
+ , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex);
SysTryReturn(NID_GRP, pTextLine, FloatRectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
int& width, int& height)
{
- int maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth);
- int widthF = _CoordinateSystemUtils::ConvertToFloat(width);
- int heightF = _CoordinateSystemUtils::ConvertToFloat(height);
+ float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth);
+ float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+ float heightF = _CoordinateSystemUtils::ConvertToFloat(height);
int r = ForwardAnalyze(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF);
{
if (__bitmapProperty.displayEnable)
{
- int bitmapWidth = __bitmapProperty.pBitmap->GetWidth();
- int bitmapHeight = __bitmapProperty.pBitmap->GetHeight();
+ float bitmapWidth = __bitmapProperty.pBitmap->GetWidthF();
+ float bitmapHeight = __bitmapProperty.pBitmap->GetHeightF();
if (maxWidth < bitmapWidth)
{
case TEXT_OBJECT_WRAP_TYPE_WORD:
actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, textLength, maxWidth, _outline, width, height);
- int widthcheck = width;
+ float widthcheck = width;
if (_pText[startTextIndex + actualLength] == TEXT_LINE_FEED || _pText[startTextIndex + actualLength] == TEXT_CARRIAGE_RETURN)
{
if (height == 0 && (textLength > 0))
{
- height = pFontImpl->GetLeading();
+ height = pFontImpl->GetLeadingF();
}
if (actualLength < charCount)
result
TextSimple::GetRegion(int textIndex, int textLength, int& width, int& height) const
{
- float widthF = _CoordinateSystemUtils::ConvertToInteger(width);
- float heightF = _CoordinateSystemUtils::ConvertToInteger(height);
+ float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+ float heightF = _CoordinateSystemUtils::ConvertToFloat(height);
result r = GetRegion(textIndex, textLength, widthF, heightF);
- width = _CoordinateSystemUtils::ConvertToFloat(widthF);
- height = _CoordinateSystemUtils::ConvertToFloat(heightF);
+ width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+ height = _CoordinateSystemUtils::ConvertToInteger(heightF);
return r;
}
{
if (__bitmapProperty.displayEnable)
{
- width = __bitmapProperty.pBitmap->GetWidth();
- height = __bitmapProperty.pBitmap->GetHeight();
+ width = __bitmapProperty.pBitmap->GetWidthF();
+ height = __bitmapProperty.pBitmap->GetHeightF();
}
else
{
if (height == 0 && (textLength > 0))
{
- height = pFontImpl->GetLeading();
+ height = pFontImpl->GetLeadingF();
}
return E_SUCCESS;
TextSimple::GetBaselineF(void) const
{
Font* pCurrentFont = GetCurrentFont();
- SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
+ SysTryReturn(NID_GRP, pCurrentFont, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
_FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont);
- SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+ SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
return (-1) * pFontImpl->GetDescenderF();
}