summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index f1aa18848d..851f9d6102 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -71,13 +71,12 @@ static const FX_WCHAR* g_FWLTheme_CalFonts[] = {
};
FWL_ERR CXFA_FWLTheme::Initialize() {
m_pTextOut = IFDE_TextOut::Create();
- for (int32_t i = 0; NULL == m_pCalendarFont &&
- i < sizeof(g_FWLTheme_CalFonts) / sizeof(const FX_WCHAR*);
- i++) {
+ for (size_t i = 0; !m_pCalendarFont && i < FX_ArraySize(g_FWLTheme_CalFonts);
+ ++i) {
m_pCalendarFont = IFX_Font::LoadFont(g_FWLTheme_CalFonts[i], 0, 0,
m_pApp->GetFDEFontMgr());
}
- if (NULL == m_pCalendarFont)
+ if (!m_pCalendarFont) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetDefFontByCodePage(
FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL);
@@ -85,6 +84,8 @@ FWL_ERR CXFA_FWLTheme::Initialize() {
m_pCalendarFont = m_pApp->GetFDEFontMgr()->GetFontByCodePage(
FX_CODEPAGE_MSWin_WesternEuropean, 0, NULL);
#endif
+ }
+
FXSYS_assert(NULL != m_pCalendarFont);
FWLTHEME_Init();
return FWL_ERR_Succeeded;