summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_datetimepicker.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-10 13:01:54 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-10 13:01:54 -0800
commit72f15a08aa47afb61e3c60b3f754309696c471ec (patch)
tree6b08637b12c08c6780e633abb100184d9b5feada /xfa/fwl/core/ifwl_datetimepicker.cpp
parentd2bf06228d7572545717cd36ea0dabc67e9b6d84 (diff)
downloadpdfium-72f15a08aa47afb61e3c60b3f754309696c471ec.tar.xz
Fold IFWL_DateTimeCalendar into IFWL_MonthCalendar
The IFWL_MonthCalendar was never instantiated and had a single sub-class. This CL folds the subclass into IFWL_MonthCalendar and uses MonthCalendar directly. Review-Url: https://codereview.chromium.org/2491443003
Diffstat (limited to 'xfa/fwl/core/ifwl_datetimepicker.cpp')
-rw-r--r--xfa/fwl/core/ifwl_datetimepicker.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fwl/core/ifwl_datetimepicker.cpp b/xfa/fwl/core/ifwl_datetimepicker.cpp
index 4ac43ea114..31e5b65cf0 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.cpp
+++ b/xfa/fwl/core/ifwl_datetimepicker.cpp
@@ -11,7 +11,6 @@
#include "xfa/fwl/core/cfwl_themebackground.h"
#include "xfa/fwl/core/cfwl_widgetmgr.h"
#include "xfa/fwl/core/fwl_noteimp.h"
-#include "xfa/fwl/core/ifwl_datetimecalendar.h"
#include "xfa/fwl/core/ifwl_datetimeedit.h"
#include "xfa/fwl/core/ifwl_formproxy.h"
#include "xfa/fwl/core/ifwl_spinbutton.h"
@@ -46,7 +45,7 @@ IFWL_DateTimePicker::IFWL_DateTimePicker(
monthProp->m_pParent = this;
monthProp->m_pThemeProvider = m_pProperties->m_pThemeProvider;
m_pMonthCal.reset(
- new IFWL_DateTimeCalendar(m_pOwnerApp, std::move(monthProp), this));
+ new IFWL_MonthCalendar(m_pOwnerApp, std::move(monthProp), this));
CFX_RectF rtMonthCal;
m_pMonthCal->GetWidgetRect(rtMonthCal, true);
@@ -454,14 +453,14 @@ IFWL_DateTimeEdit* IFWL_DateTimePicker::GetDataTimeEdit() {
FWL_Error IFWL_DateTimePicker::DisForm_Initialize() {
m_pProperties->m_dwStyleExes = FWL_STYLEEXT_DTP_ShortDateFormat;
- DisForm_InitDateTimeCalendar();
+ DisForm_InitMonthCalendar();
DisForm_InitDateTimeEdit();
RegisterEventTarget(m_pMonthCal.get());
RegisterEventTarget(m_pEdit.get());
return FWL_Error::Succeeded;
}
-void IFWL_DateTimePicker::DisForm_InitDateTimeCalendar() {
+void IFWL_DateTimePicker::DisForm_InitMonthCalendar() {
if (m_pMonthCal)
return;
@@ -472,8 +471,7 @@ void IFWL_DateTimePicker::DisForm_InitDateTimeCalendar() {
prop->m_pParent = this;
prop->m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pMonthCal.reset(
- new IFWL_DateTimeCalendar(m_pOwnerApp, std::move(prop), this));
+ m_pMonthCal.reset(new IFWL_MonthCalendar(m_pOwnerApp, std::move(prop), this));
CFX_RectF rtMonthCal;
m_pMonthCal->GetWidgetRect(rtMonthCal, true);
rtMonthCal.Set(0, 0, rtMonthCal.width, rtMonthCal.height);