Index: xfa/fwl/basewidget/fwl_monthcalendarimp.cpp |
diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp |
index ca141a2d7ad7b751726e3bd0cf878ce7f520132f..7477f04bdce530ed9bbaac6c454aa3bb1b66d6d8 100644 |
--- a/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp |
+++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.cpp |
@@ -151,6 +151,8 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp( |
const CFWL_WidgetImpProperties& properties, |
IFWL_Widget* pOuter) |
: CFWL_WidgetImp(properties, pOuter), |
+ m_bInit(FALSE), |
+ m_pDateTime(new CFX_DateTime), |
m_iCurYear(2011), |
m_iCurMonth(1), |
m_iYear(2011), |
@@ -158,7 +160,8 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp( |
m_iDay(1), |
m_iHovered(-1), |
m_iLBtnPartStates(CFWL_PartState_Normal), |
- m_iRBtnPartStates(CFWL_PartState_Normal) { |
+ m_iRBtnPartStates(CFWL_PartState_Normal), |
+ m_iMaxSel(1) { |
m_rtHead.Reset(); |
m_rtWeek.Reset(); |
m_rtLBtn.Reset(); |
@@ -171,14 +174,10 @@ CFWL_MonthCalendarImp::CFWL_MonthCalendarImp( |
m_rtClient.Reset(); |
m_rtWeekNum.Reset(); |
m_rtWeekNumSep.Reset(); |
- m_pDateTime = new CFX_DateTime; |
- m_bInit = FALSE; |
- m_iMaxSel = 1; |
} |
CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() { |
ClearDateItem(); |
- delete m_pDateTime; |
m_arrSelDays.RemoveAll(); |
} |