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

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

Issue 1946213003: Remove CLASSHASH defines in favour of an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() { 178 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() {
179 ClearDateItem(); 179 ClearDateItem();
180 delete m_pDateTime; 180 delete m_pDateTime;
181 m_arrSelDays.RemoveAll(); 181 m_arrSelDays.RemoveAll();
182 } 182 }
183 FWL_ERR CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const { 183 FWL_ERR CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const {
184 wsClass = FWL_CLASS_MonthCalendar; 184 wsClass = FWL_CLASS_MonthCalendar;
185 return FWL_ERR_Succeeded; 185 return FWL_ERR_Succeeded;
186 } 186 }
187 uint32_t CFWL_MonthCalendarImp::GetClassID() const { 187
188 return FWL_CLASSHASH_MonthCalendar;
189 }
190 FWL_ERR CFWL_MonthCalendarImp::Initialize() { 188 FWL_ERR CFWL_MonthCalendarImp::Initialize() {
191 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) 189 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded)
192 return FWL_ERR_Indefinite; 190 return FWL_ERR_Indefinite;
193 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this); 191 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this);
194 return FWL_ERR_Succeeded; 192 return FWL_ERR_Succeeded;
195 } 193 }
196 FWL_ERR CFWL_MonthCalendarImp::Finalize() { 194 FWL_ERR CFWL_MonthCalendarImp::Finalize() {
197 delete m_pDelegate; 195 delete m_pDelegate;
198 m_pDelegate = nullptr; 196 m_pDelegate = nullptr;
199 return CFWL_WidgetImp::Finalize(); 197 return CFWL_WidgetImp::Finalize();
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 if (m_pOwner->m_iHovered > 0) { 1187 if (m_pOwner->m_iHovered > 0) {
1190 CFX_RectF rtInvalidate; 1188 CFX_RectF rtInvalidate;
1191 rtInvalidate.Set(0, 0, 0, 0); 1189 rtInvalidate.Set(0, 0, 0, 0);
1192 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); 1190 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate);
1193 m_pOwner->m_iHovered = -1; 1191 m_pOwner->m_iHovered = -1;
1194 if (!rtInvalidate.IsEmpty()) { 1192 if (!rtInvalidate.IsEmpty()) {
1195 m_pOwner->Repaint(&rtInvalidate); 1193 m_pOwner->Repaint(&rtInvalidate);
1196 } 1194 }
1197 } 1195 }
1198 } 1196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698