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

Side by Side Diff: xfa/fwl/core/ifwl_datetimeedit.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_datetimeedit.h ('k') | xfa/fwl/core/ifwl_datetimepicker.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_datetimeedit.h" 7 #include "xfa/fwl/core/ifwl_datetimeedit.h"
8 8
9 #include "xfa/fwl/core/cfwl_widgetmgr.h" 9 #include "xfa/fwl/core/cfwl_widgetmgr.h"
10 #include "xfa/fwl/core/ifwl_datetimepicker.h" 10 #include "xfa/fwl/core/ifwl_datetimepicker.h"
11 11
12 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties, 12 IFWL_DateTimeEdit::IFWL_DateTimeEdit(const CFWL_WidgetImpProperties& properties,
13 IFWL_Widget* pOuter) 13 IFWL_Widget* pOuter)
14 : IFWL_Edit(properties, pOuter) {} 14 : IFWL_Edit(properties, pOuter) {}
15 15
16 FWL_Error IFWL_DateTimeEdit::Initialize() { 16 FWL_Error IFWL_DateTimeEdit::Initialize() {
17 m_pDelegate = new CFWL_DateTimeEditImpDelegate(this); 17 m_pDelegate = new CFWL_DateTimeEditImpDelegate(this);
18 if (IFWL_Edit::Initialize() != FWL_Error::Succeeded) 18 if (IFWL_Edit::Initialize() != FWL_Error::Succeeded)
19 return FWL_Error::Indefinite; 19 return FWL_Error::Indefinite;
20 return FWL_Error::Succeeded; 20 return FWL_Error::Succeeded;
21 } 21 }
22 22
23 FWL_Error IFWL_DateTimeEdit::Finalize() { 23 void IFWL_DateTimeEdit::Finalize() {
24 delete m_pDelegate; 24 delete m_pDelegate;
25 m_pDelegate = nullptr; 25 m_pDelegate = nullptr;
26 return IFWL_Edit::Finalize(); 26 IFWL_Edit::Finalize();
27 } 27 }
28 28
29 CFWL_DateTimeEditImpDelegate::CFWL_DateTimeEditImpDelegate( 29 CFWL_DateTimeEditImpDelegate::CFWL_DateTimeEditImpDelegate(
30 IFWL_DateTimeEdit* pOwner) 30 IFWL_DateTimeEdit* pOwner)
31 : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {} 31 : CFWL_EditImpDelegate(pOwner), m_pOwner(pOwner) {}
32 32
33 void CFWL_DateTimeEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { 33 void CFWL_DateTimeEditImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
34 if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) { 34 if (m_pOwner->m_pWidgetMgr->IsFormDisabled()) {
35 DisForm_OnProcessMessage(pMessage); 35 DisForm_OnProcessMessage(pMessage);
36 return; 36 return;
(...skipping 26 matching lines...) Expand all
63 pDateTime->GetWidgetRect(rtInvalidate); 63 pDateTime->GetWidgetRect(rtInvalidate);
64 pDateTime->ShowMonthCalendar(FALSE); 64 pDateTime->ShowMonthCalendar(FALSE);
65 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); 65 rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top);
66 pDateTime->Repaint(&rtInvalidate); 66 pDateTime->Repaint(&rtInvalidate);
67 } 67 }
68 } 68 }
69 } 69 }
70 } 70 }
71 CFWL_EditImpDelegate::OnProcessMessage(pMessage); 71 CFWL_EditImpDelegate::OnProcessMessage(pMessage);
72 } 72 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_datetimeedit.h ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698