summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_monthcalendar.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-23 09:02:34 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-23 09:02:34 -0800
commit209821f79d0bbeeaeadf4e82ff643ee20d676222 (patch)
tree8384d4422830f598fbe727448e1f39bdd73a895d /xfa/fwl/core/ifwl_monthcalendar.cpp
parent1e32d811c1c9f0a729e8072cf3530208cf52e763 (diff)
downloadpdfium-209821f79d0bbeeaeadf4e82ff643ee20d676222.tar.xz
Remove plumbing for today value
The calendar always sets today to 2011/01/01. This Cl removes the various DataProviders needed to plumb this value and just sets it where needed. Review-Url: https://codereview.chromium.org/2524993002
Diffstat (limited to 'xfa/fwl/core/ifwl_monthcalendar.cpp')
-rw-r--r--xfa/fwl/core/ifwl_monthcalendar.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/xfa/fwl/core/ifwl_monthcalendar.cpp b/xfa/fwl/core/ifwl_monthcalendar.cpp
index 0137f195c9..aaa15e47ae 100644
--- a/xfa/fwl/core/ifwl_monthcalendar.cpp
+++ b/xfa/fwl/core/ifwl_monthcalendar.cpp
@@ -724,22 +724,14 @@ void IFWL_MonthCalendar::GetCapValue() {
}
void IFWL_MonthCalendar::InitDate() {
- if (m_pProperties->m_pDataProvider) {
- IFWL_MonthCalendar::DataProvider* pDateProv =
- static_cast<IFWL_MonthCalendar::DataProvider*>(
- m_pProperties->m_pDataProvider);
- m_iYear = pDateProv->GetCurYear(this);
- m_iMonth = pDateProv->GetCurMonth(this);
- m_iDay = pDateProv->GetCurDay(this);
- m_iCurYear = m_iYear;
- m_iCurMonth = m_iMonth;
- } else {
- m_iDay = 1;
- m_iMonth = 1;
- m_iYear = 1;
- m_iCurYear = m_iYear;
- m_iCurMonth = m_iMonth;
- }
+ // TODO(dsinclair): These should pull the real today values instead of
+ // pretending it's 2011-01-01.
+ m_iYear = 2011;
+ m_iMonth = 1;
+ m_iDay = 1;
+ m_iCurYear = m_iYear;
+ m_iCurMonth = m_iMonth;
+
GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday);
GetHeadText(m_iCurYear, m_iCurMonth, m_wsHead);
m_dtMin = DATE(1500, 12, 1);