Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fwl/core/ifwl_monthcalendar.h" | 7 #include "xfa/fwl/core/ifwl_monthcalendar.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Width)); | 718 pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Width)); |
| 719 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_WeekNumbers) | 719 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_WeekNumbers) |
| 720 m_fMCWid += m_fWeekNumWid; | 720 m_fMCWid += m_fWeekNumWid; |
| 721 | 721 |
| 722 m_fMCHei = *static_cast<FX_FLOAT*>( | 722 m_fMCHei = *static_cast<FX_FLOAT*>( |
| 723 pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Height)); | 723 pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Height)); |
| 724 } | 724 } |
| 725 | 725 |
| 726 void IFWL_MonthCalendar::InitDate() { | 726 void IFWL_MonthCalendar::InitDate() { |
| 727 if (m_pProperties->m_pDataProvider) { | 727 if (m_pProperties->m_pDataProvider) { |
| 728 IFWL_MonthCalendar::DataProvider* pDateProv = | 728 m_iYear = 2011; |
|
npm
2016/11/23 16:42:31
Add a TODO?
dsinclair
2016/11/23 16:46:40
Done.
| |
| 729 static_cast<IFWL_MonthCalendar::DataProvider*>( | 729 m_iMonth = 1; |
| 730 m_pProperties->m_pDataProvider); | 730 m_iDay = 1; |
| 731 m_iYear = pDateProv->GetCurYear(this); | |
| 732 m_iMonth = pDateProv->GetCurMonth(this); | |
| 733 m_iDay = pDateProv->GetCurDay(this); | |
| 734 m_iCurYear = m_iYear; | 731 m_iCurYear = m_iYear; |
| 735 m_iCurMonth = m_iMonth; | 732 m_iCurMonth = m_iMonth; |
| 736 } else { | 733 } else { |
| 737 m_iDay = 1; | 734 m_iDay = 1; |
| 738 m_iMonth = 1; | 735 m_iMonth = 1; |
| 739 m_iYear = 1; | 736 m_iYear = 1; |
| 740 m_iCurYear = m_iYear; | 737 m_iCurYear = m_iYear; |
| 741 m_iCurMonth = m_iMonth; | 738 m_iCurMonth = m_iMonth; |
| 742 } | 739 } |
| 743 GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday); | 740 GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday); |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1110 uint32_t dwSt, | 1107 uint32_t dwSt, |
| 1111 CFX_RectF rc, | 1108 CFX_RectF rc, |
| 1112 CFX_WideString& wsday) | 1109 CFX_WideString& wsday) |
| 1113 : iDay(day), | 1110 : iDay(day), |
| 1114 iDayOfWeek(dayofweek), | 1111 iDayOfWeek(dayofweek), |
| 1115 dwStates(dwSt), | 1112 dwStates(dwSt), |
| 1116 rect(rc), | 1113 rect(rc), |
| 1117 wsDay(wsday) {} | 1114 wsDay(wsday) {} |
| 1118 | 1115 |
| 1119 IFWL_MonthCalendar::DATEINFO::~DATEINFO() {} | 1116 IFWL_MonthCalendar::DATEINFO::~DATEINFO() {} |
| OLD | NEW |