int elementTextOffset = 0;
int elementIndex = 0;
int textIndexFromElementOffset = 0;
- int headTextLength = 0;
- int tailTextLength = 0;
+ int LTRTextLength = 0;
+ int RTLTextLength = 0;
bool drawAbbrevText = false;
if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
{
if (IsRTLCharacter(startTextIndex + currentLength))
{
- headTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
- tailTextLength = textLength - headTextLength;
+ LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
+ RTLTextLength = textLength - LTRTextLength;
- if (headTextLength <= 0)
+ if (LTRTextLength <= 0)
{
if (pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
{
}
else
{
- headTextLength = textLength;
- tailTextLength = 0;
+ LTRTextLength = textLength;
+ RTLTextLength = 0;
}
}
- if (headTextLength > 0)
+ if (LTRTextLength > 0)
{
- currentLength = headTextLength;
+ currentLength = Math::Min(LTRTextLength, currentLength);
- currentLength = Math::Min(textLength, currentLength);
-
- while (textLength > 0)
+ while (LTRTextLength > 0)
{
- textLength -= currentLength;
+ LTRTextLength -= currentLength;
pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
adjustedRect.x += textSize.width;
adjustedRect.width -= textSize.width;
- if (!textLength || adjustedRect.width <= 0)
+ if (!LTRTextLength || adjustedRect.width <= 0)
{
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());
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
if (currentLength == 0)
{
}
}
- textIndexFromElementOffset += headTextLength;
+ textIndexFromElementOffset += LTRTextLength;
+ textLength -= LTRTextLength;
}
- if (drawAbbrevText && (headTextLength > 0 && tailTextLength > 0))
+ if (drawAbbrevText && (RTLTextLength > 0))
{
if (pTextElement->IsBackGroundDrawingModeEnable())
{
drawAbbrevText = false;
}
- if (tailTextLength > 0)
+ if (RTLTextLength > 0)
{
- currentLength = tailTextLength;
- currentLength = Math::Min(textLength, currentLength);
+ currentLength = Math::Min(RTLTextLength, currentLength);
- while (textLength > 0)
+ while (RTLTextLength > 0)
{
- textLength -= currentLength;
+ RTLTextLength -= currentLength;
pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
adjustedRect.x += textSize.width;
adjustedRect.width -= textSize.width;
- if (!textLength || adjustedRect.width <= 0)
+ if (!RTLTextLength || adjustedRect.width <= 0)
{
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());
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
if (currentLength == 0)
{
break;
}
}
+
+ textLength -= RTLTextLength;
}
if (drawAbbrevText)
int elementTextOffset = 0;
int elementIndex = 0;
int textIndexFromElementOffset = 0;
- int headTextLength = 0;
- int tailTextLength = 0;
+ int LTRTextLength = 0;
+ int RTLTextLength = 0;
bool drawAbbrevText = false;
if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
{
if (IsRTLCharacter(startTextIndex + currentLength))
{
- headTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
- tailTextLength = textLength - headTextLength;
+ LTRTextLength = SearchLTRTextIndex(startTextIndex, startTextIndex + currentLength) - startTextIndex;
+ RTLTextLength = textLength - LTRTextLength;
- if (headTextLength <= 0)
+ if (LTRTextLength <= 0)
{
- if (pLastDisplayTextElement && pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
+ if (pLastDisplayTextElement->IsBackGroundDrawingModeEnable())
{
r = canvasImpl.FillRectangle(pLastDisplayTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
else
{
- headTextLength = textLength;
- tailTextLength = 0;
+ LTRTextLength = textLength;
+ RTLTextLength = 0;
}
}
- if (headTextLength > 0)
+ if (LTRTextLength > 0)
{
- currentLength = headTextLength;
- currentLength = Math::Min(textLength, currentLength);
+ currentLength = Math::Min(LTRTextLength, currentLength);
- while (textLength > 0)
+ while (LTRTextLength > 0)
{
- textLength -= currentLength;
+ LTRTextLength -= currentLength;
pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
adjustedRect.x += textSize.width;
adjustedRect.width -= textSize.width;
- if (!textLength || adjustedRect.width <= 0)
+ if (!LTRTextLength || adjustedRect.width <= 0)
{
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());
+ currentLength = Math::Min(LTRTextLength, pTextElement->GetTextLength());
if (currentLength == 0)
{
}
}
- textIndexFromElementOffset += headTextLength;
+ textIndexFromElementOffset += LTRTextLength;
+ textLength -= LTRTextLength;
}
- if (drawAbbrevText && (headTextLength > 0 && tailTextLength > 0))
+ if (drawAbbrevText && (RTLTextLength > 0))
{
if (pTextElement->IsBackGroundDrawingModeEnable())
{
drawAbbrevText = false;
}
- if (tailTextLength > 0)
+ if (RTLTextLength > 0)
{
- currentLength = tailTextLength;
- currentLength = Math::Min(textLength, currentLength);
+ currentLength = Math::Min(RTLTextLength, currentLength);
- while (textLength > 0)
+ while (RTLTextLength > 0)
{
- textLength -= currentLength;
+ RTLTextLength -= currentLength;
pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
adjustedRect.x += textSize.width;
adjustedRect.width -= textSize.width;
- if (!textLength || adjustedRect.width <= 0)
+ if (!RTLTextLength || adjustedRect.width <= 0)
{
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());
+ currentLength = Math::Min(RTLTextLength, pTextElement->GetTextLength());
if (currentLength == 0)
{
break;
}
}
+
+ textLength -= RTLTextLength;
}
if (drawAbbrevText)