Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: xfa/src/fgas/src/layout/fx_rtfbreak.cpp

Issue 1747123002: Fix and enable lint checks. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/src/fgas/src/layout/fx_rtfbreak.h ('k') | xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fgas/src/layout/fx_rtfbreak.cpp
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
index 4b17615e0758eec9fe61268c2b6434897c65f2b0..b1f9d5e9ae15b8b00bc4ccaac6d80831aee0da25 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;
« no previous file with comments | « xfa/src/fgas/src/layout/fx_rtfbreak.h ('k') | xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698