From 209821f79d0bbeeaeadf4e82ff643ee20d676222 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 23 Nov 2016 09:02:34 -0800 Subject: 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 --- xfa/fwl/core/ifwl_monthcalendar.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'xfa/fwl/core/ifwl_monthcalendar.cpp') 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( - 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); -- cgit v1.2.3