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

Side by Side Diff: xfa/fwl/core/ifwl_monthcalendar.cpp

Issue 2435603003: Cleanup unused methods and return values in FWL code. (Closed)
Patch Set: Fix typo Created 4 years, 2 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/core/ifwl_monthcalendar.h ('k') | xfa/fwl/core/ifwl_picturebox.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/core/ifwl_monthcalendar.h" 7 #include "xfa/fwl/core/ifwl_monthcalendar.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 m_rtClient.Reset(); 144 m_rtClient.Reset();
145 m_rtWeekNum.Reset(); 145 m_rtWeekNum.Reset();
146 m_rtWeekNumSep.Reset(); 146 m_rtWeekNumSep.Reset();
147 } 147 }
148 148
149 IFWL_MonthCalendar::~IFWL_MonthCalendar() { 149 IFWL_MonthCalendar::~IFWL_MonthCalendar() {
150 ClearDateItem(); 150 ClearDateItem();
151 m_arrSelDays.RemoveAll(); 151 m_arrSelDays.RemoveAll();
152 } 152 }
153 153
154 FWL_Error IFWL_MonthCalendar::GetClassName(CFX_WideString& wsClass) const {
155 wsClass = FWL_CLASS_MonthCalendar;
156 return FWL_Error::Succeeded;
157 }
158
159 FWL_Type IFWL_MonthCalendar::GetClassID() const { 154 FWL_Type IFWL_MonthCalendar::GetClassID() const {
160 return FWL_Type::MonthCalendar; 155 return FWL_Type::MonthCalendar;
161 } 156 }
162 157
163 FWL_Error IFWL_MonthCalendar::Initialize() { 158 FWL_Error IFWL_MonthCalendar::Initialize() {
164 if (IFWL_Widget::Initialize() != FWL_Error::Succeeded) 159 if (IFWL_Widget::Initialize() != FWL_Error::Succeeded)
165 return FWL_Error::Indefinite; 160 return FWL_Error::Indefinite;
166 161
167 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this); 162 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this);
168 return FWL_Error::Succeeded; 163 return FWL_Error::Succeeded;
169 } 164 }
170 165
171 FWL_Error IFWL_MonthCalendar::Finalize() { 166 void IFWL_MonthCalendar::Finalize() {
172 delete m_pDelegate; 167 delete m_pDelegate;
173 m_pDelegate = nullptr; 168 m_pDelegate = nullptr;
174 return IFWL_Widget::Finalize(); 169 IFWL_Widget::Finalize();
175 } 170 }
176 171
177 FWL_Error IFWL_MonthCalendar::GetWidgetRect(CFX_RectF& rect, 172 FWL_Error IFWL_MonthCalendar::GetWidgetRect(CFX_RectF& rect,
178 FX_BOOL bAutoSize) { 173 FX_BOOL bAutoSize) {
179 if (bAutoSize) { 174 if (bAutoSize) {
180 CFX_SizeF fs = CalcSize(TRUE); 175 CFX_SizeF fs = CalcSize(TRUE);
181 rect.Set(0, 0, fs.x, fs.y); 176 rect.Set(0, 0, fs.x, fs.y);
182 IFWL_Widget::GetWidgetRect(rect, TRUE); 177 IFWL_Widget::GetWidgetRect(rect, TRUE);
183 } else { 178 } else {
184 rect = m_pProperties->m_rtWidget; 179 rect = m_pProperties->m_rtWidget;
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 uint32_t dwSt, 1211 uint32_t dwSt,
1217 CFX_RectF rc, 1212 CFX_RectF rc,
1218 CFX_WideString& wsday) 1213 CFX_WideString& wsday)
1219 : iDay(day), 1214 : iDay(day),
1220 iDayOfWeek(dayofweek), 1215 iDayOfWeek(dayofweek),
1221 dwStates(dwSt), 1216 dwStates(dwSt),
1222 rect(rc), 1217 rect(rc),
1223 wsDay(wsday) {} 1218 wsDay(wsday) {}
1224 1219
1225 FWL_DATEINFO::~FWL_DATEINFO() {} 1220 FWL_DATEINFO::~FWL_DATEINFO() {}
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_monthcalendar.h ('k') | xfa/fwl/core/ifwl_picturebox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698