From c8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 2 Jan 2017 17:17:02 -0500 Subject: Cleaning out params in CPDFXFA_Context This CL cleans up some of the out params in CPDFXFA_Context. In the process several of the strings returned by ::LoadString() are inlined in their call sites and the defines removed. BUG=pdfium:549 Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea Reviewed-on: https://pdfium-review.googlesource.com/2134 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/app/xfa_fwltheme.cpp | 77 ------------------------------------------- 1 file changed, 77 deletions(-) (limited to 'xfa/fxfa/app/xfa_fwltheme.cpp') diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp index 5a494f1231..c08e51f807 100644 --- a/xfa/fxfa/app/xfa_fwltheme.cpp +++ b/xfa/fxfa/app/xfa_fwltheme.cpp @@ -228,83 +228,6 @@ void* CXFA_FWLTheme::GetCapacity(CFWL_ThemePart* pThemePart, default: break; } - - int dwCapValue = static_cast(dwCapacity); - if (pThemePart->m_pWidget->GetClassID() == FWL_Type::MonthCalendar && - dwCapValue >= static_cast(CFWL_WidgetCapacity::Today) && - dwCapValue <= static_cast(CFWL_WidgetCapacity::December)) { - if (CXFA_FFWidget* pWidget = - XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) { - IXFA_AppProvider* pAppProvider = pWidget->GetAppProvider(); - m_wsResource.clear(); - switch (dwCapacity) { - case CFWL_WidgetCapacity::Sun: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Sun, m_wsResource); - break; - case CFWL_WidgetCapacity::Mon: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Mon, m_wsResource); - break; - case CFWL_WidgetCapacity::Tue: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Tue, m_wsResource); - break; - case CFWL_WidgetCapacity::Wed: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Wed, m_wsResource); - break; - case CFWL_WidgetCapacity::Thu: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Thu, m_wsResource); - break; - case CFWL_WidgetCapacity::Fri: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Fri, m_wsResource); - break; - case CFWL_WidgetCapacity::Sat: - pAppProvider->LoadString(XFA_IDS_StringWeekDay_Sat, m_wsResource); - break; - case CFWL_WidgetCapacity::January: - pAppProvider->LoadString(XFA_IDS_StringMonth_Jan, m_wsResource); - break; - case CFWL_WidgetCapacity::February: - pAppProvider->LoadString(XFA_IDS_StringMonth_Feb, m_wsResource); - break; - case CFWL_WidgetCapacity::March: - pAppProvider->LoadString(XFA_IDS_StringMonth_March, m_wsResource); - break; - case CFWL_WidgetCapacity::April: - pAppProvider->LoadString(XFA_IDS_StringMonth_April, m_wsResource); - break; - case CFWL_WidgetCapacity::May: - pAppProvider->LoadString(XFA_IDS_StringMonth_May, m_wsResource); - break; - case CFWL_WidgetCapacity::June: - pAppProvider->LoadString(XFA_IDS_StringMonth_June, m_wsResource); - break; - case CFWL_WidgetCapacity::July: - pAppProvider->LoadString(XFA_IDS_StringMonth_July, m_wsResource); - break; - case CFWL_WidgetCapacity::August: - pAppProvider->LoadString(XFA_IDS_StringMonth_Aug, m_wsResource); - break; - case CFWL_WidgetCapacity::September: - pAppProvider->LoadString(XFA_IDS_StringMonth_Sept, m_wsResource); - break; - case CFWL_WidgetCapacity::October: - pAppProvider->LoadString(XFA_IDS_StringMonth_Oct, m_wsResource); - break; - case CFWL_WidgetCapacity::November: - pAppProvider->LoadString(XFA_IDS_StringMonth_Nov, m_wsResource); - break; - case CFWL_WidgetCapacity::December: - pAppProvider->LoadString(XFA_IDS_StringMonth_Dec, m_wsResource); - break; - case CFWL_WidgetCapacity::Today: - pAppProvider->LoadString(XFA_IDS_String_Today, m_wsResource); - break; - default: - break; - } - if (!m_wsResource.IsEmpty()) - return &m_wsResource; - } - } return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity); } -- cgit v1.2.3