Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: xfa/fwl/basewidget/fwl_monthcalendarimp.cpp

Issue 2207093005: Use smart pointers for class owned pointers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more change Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/basewidget/fwl_monthcalendarimp.h" 7 #include "xfa/fwl/basewidget/fwl_monthcalendarimp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int32_t iMonth, 144 int32_t iMonth,
145 int32_t iDay) { 145 int32_t iDay) {
146 return static_cast<CFWL_MonthCalendarImp*>(GetImpl()) 146 return static_cast<CFWL_MonthCalendarImp*>(GetImpl())
147 ->SetSelect(iYear, iMonth, iDay); 147 ->SetSelect(iYear, iMonth, iDay);
148 } 148 }
149 149
150 CFWL_MonthCalendarImp::CFWL_MonthCalendarImp( 150 CFWL_MonthCalendarImp::CFWL_MonthCalendarImp(
151 const CFWL_WidgetImpProperties& properties, 151 const CFWL_WidgetImpProperties& properties,
152 IFWL_Widget* pOuter) 152 IFWL_Widget* pOuter)
153 : CFWL_WidgetImp(properties, pOuter), 153 : CFWL_WidgetImp(properties, pOuter),
154 m_bInit(FALSE),
155 m_pDateTime(new CFX_DateTime),
154 m_iCurYear(2011), 156 m_iCurYear(2011),
155 m_iCurMonth(1), 157 m_iCurMonth(1),
156 m_iYear(2011), 158 m_iYear(2011),
157 m_iMonth(1), 159 m_iMonth(1),
158 m_iDay(1), 160 m_iDay(1),
159 m_iHovered(-1), 161 m_iHovered(-1),
160 m_iLBtnPartStates(CFWL_PartState_Normal), 162 m_iLBtnPartStates(CFWL_PartState_Normal),
161 m_iRBtnPartStates(CFWL_PartState_Normal) { 163 m_iRBtnPartStates(CFWL_PartState_Normal),
164 m_iMaxSel(1) {
162 m_rtHead.Reset(); 165 m_rtHead.Reset();
163 m_rtWeek.Reset(); 166 m_rtWeek.Reset();
164 m_rtLBtn.Reset(); 167 m_rtLBtn.Reset();
165 m_rtRBtn.Reset(); 168 m_rtRBtn.Reset();
166 m_rtDates.Reset(); 169 m_rtDates.Reset();
167 m_rtHSep.Reset(); 170 m_rtHSep.Reset();
168 m_rtHeadText.Reset(); 171 m_rtHeadText.Reset();
169 m_rtToday.Reset(); 172 m_rtToday.Reset();
170 m_rtTodayFlag.Reset(); 173 m_rtTodayFlag.Reset();
171 m_rtClient.Reset(); 174 m_rtClient.Reset();
172 m_rtWeekNum.Reset(); 175 m_rtWeekNum.Reset();
173 m_rtWeekNumSep.Reset(); 176 m_rtWeekNumSep.Reset();
174 m_pDateTime = new CFX_DateTime;
175 m_bInit = FALSE;
176 m_iMaxSel = 1;
177 } 177 }
178 178
179 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() { 179 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() {
180 ClearDateItem(); 180 ClearDateItem();
181 delete m_pDateTime;
182 m_arrSelDays.RemoveAll(); 181 m_arrSelDays.RemoveAll();
183 } 182 }
184 183
185 FWL_Error CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const { 184 FWL_Error CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const {
186 wsClass = FWL_CLASS_MonthCalendar; 185 wsClass = FWL_CLASS_MonthCalendar;
187 return FWL_Error::Succeeded; 186 return FWL_Error::Succeeded;
188 } 187 }
189 188
190 FWL_Type CFWL_MonthCalendarImp::GetClassID() const { 189 FWL_Type CFWL_MonthCalendarImp::GetClassID() const {
191 return FWL_Type::MonthCalendar; 190 return FWL_Type::MonthCalendar;
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 uint32_t dwSt, 1202 uint32_t dwSt,
1204 CFX_RectF rc, 1203 CFX_RectF rc,
1205 CFX_WideString& wsday) 1204 CFX_WideString& wsday)
1206 : iDay(day), 1205 : iDay(day),
1207 iDayOfWeek(dayofweek), 1206 iDayOfWeek(dayofweek),
1208 dwStates(dwSt), 1207 dwStates(dwSt),
1209 rect(rc), 1208 rect(rc),
1210 wsDay(wsday) {} 1209 wsDay(wsday) {}
1211 1210
1212 FWL_DATEINFO::~FWL_DATEINFO() {} 1211 FWL_DATEINFO::~FWL_DATEINFO() {}
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_tooltipctrlimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698