summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fwltheme.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-02 17:17:02 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-03 19:54:37 +0000
commitc8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d (patch)
treea5aedd888a3981f53722b7d65ea969d246f267c8 /xfa/fxfa/app/xfa_fwltheme.cpp
parentdb194cf018069b930d0e3d5fc0242e14f70e8620 (diff)
downloadpdfium-c8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_fwltheme.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.cpp77
1 files changed, 0 insertions, 77 deletions
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<int>(dwCapacity);
- if (pThemePart->m_pWidget->GetClassID() == FWL_Type::MonthCalendar &&
- dwCapValue >= static_cast<int>(CFWL_WidgetCapacity::Today) &&
- dwCapValue <= static_cast<int>(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);
}