summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fgas/layout/cfx_txtbreak.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp
index 76a36c90da..7633c4c91e 100644
--- a/xfa/fgas/layout/cfx_txtbreak.cpp
+++ b/xfa/fgas/layout/cfx_txtbreak.cpp
@@ -456,7 +456,7 @@ void CFX_TxtBreak::EndBreak_Alignment(const std::deque<FX_TPO>& tpos,
else
ttp.m_iStartPos = iStart;
- for (int32_t j = 0; j < ttp.m_iChars; j++) {
+ for (int32_t j = 0; j < ttp.m_iChars && iGapChars > 0; j++, iGapChars--) {
CFX_Char* pTC = ttp.GetChar(j);
if (pTC->m_nBreakType != FX_LBT_DIRECT_BRK || pTC->m_iCharWidth < 0)
continue;
@@ -465,9 +465,6 @@ void CFX_TxtBreak::EndBreak_Alignment(const std::deque<FX_TPO>& tpos,
pTC->m_iCharWidth += k;
ttp.m_iWidth += k;
iOffset -= k;
- iGapChars--;
- if (iGapChars < 1)
- break;
}
iStart += ttp.m_iWidth;
}
@@ -804,7 +801,6 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (chartype < FX_CHARTYPE_ArabicAlef)
bLam = false;
- dwProps = FX_GetUnicodeProperties(wForm);
bool bEmptyChar =
(chartype >= FX_CHARTYPE_Tab && chartype <= FX_CHARTYPE_Control);
if (wForm == 0xFEFF)
@@ -928,7 +924,6 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
int32_t iLength = pTxtRun->iLength;
CFX_RectF rect(*pTxtRun->pRect);
float fFontSize = pTxtRun->fFontSize;
- int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
float fScale = fFontSize / 1000.0f;
RetainPtr<CFGAS_GEFont> pFont = pTxtRun->pFont;
if (!pFont)
@@ -964,10 +959,8 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
wch == L'\n')) {
bRet = false;
}
- if (bRet) {
- iCharSize = iFontSize * 500;
+ if (bRet)
fCharSize = fFontSize / 2.0f;
- }
rect.left = fStart;
if (bRTLPiece) {
rect.left -= fCharSize;