summaryrefslogtreecommitdiff
path: root/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fgas/src/layout/fx_rtfbreak.cpp')
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
index 4b17615e07..b1f9d5e9ae 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
@@ -531,11 +531,12 @@ FX_DWORD CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar,
if (m_bVertical != FX_IsOdd(iLastRotation)) {
iCharWidth = 1000;
} else {
- if (!m_pFont->GetCharWidth(wForm, iCharWidth, m_bCharCode))
+ if (!m_pFont->GetCharWidth(wForm, iCharWidth, m_bCharCode)) {
if (!m_pFont->GetCharWidth(pLastChar->m_wCharCode, iCharWidth,
m_bCharCode)) {
iCharWidth = m_iDefChar;
}
+ }
}
iCharWidth *= m_iFontSize;
iCharWidth = iCharWidth * m_iHorizontalScale / 100;
@@ -548,13 +549,12 @@ FX_DWORD CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar,
m_pArabicChar->GetFormChar(pCurChar, (bAlef ? NULL : pLastChar), NULL);
if (m_bVertical != FX_IsOdd(iRotation)) {
iCharWidth = 1000;
- } else {
- if (!m_pFont->GetCharWidth(wForm, iCharWidth, m_bCharCode))
- if (!m_pFont->GetCharWidth(pCurChar->m_wCharCode, iCharWidth,
- m_bCharCode)) {
- iCharWidth = m_iDefChar;
- }
+ } else if (!m_pFont->GetCharWidth(wForm, iCharWidth, m_bCharCode) &&
+ !m_pFont->GetCharWidth(pCurChar->m_wCharCode, iCharWidth,
+ m_bCharCode)) {
+ iCharWidth = m_iDefChar;
}
+
iCharWidth *= m_iFontSize;
iCharWidth = iCharWidth * m_iHorizontalScale / 100;
pCurChar->m_iCharWidth = iCharWidth;