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

Side by Side Diff: xfa/fwl/basewidget/fwl_barcodeimp.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
« no previous file with comments | « xfa/fwl/basewidget/fwl_barcodeimp.h ('k') | xfa/fwl/basewidget/fwl_caretimp.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_barcodeimp.h" 7 #include "xfa/fwl/basewidget/fwl_barcodeimp.h"
8 8
9 #include "xfa/fwl/basewidget/fwl_editimp.h" 9 #include "xfa/fwl/basewidget/fwl_editimp.h"
10 #include "xfa/fwl/basewidget/fxmath_barcodeimp.h" 10 #include "xfa/fwl/basewidget/fxmath_barcodeimp.h"
(...skipping 20 matching lines...) Expand all
31 31
32 CFWL_BarcodeImp::CFWL_BarcodeImp(const CFWL_WidgetImpProperties& properties, 32 CFWL_BarcodeImp::CFWL_BarcodeImp(const CFWL_WidgetImpProperties& properties,
33 IFWL_Widget* pOuter) 33 IFWL_Widget* pOuter)
34 : CFWL_EditImp(properties, pOuter), 34 : CFWL_EditImp(properties, pOuter),
35 m_pBarcodeEngine(NULL), 35 m_pBarcodeEngine(NULL),
36 m_dwStatus(0), 36 m_dwStatus(0),
37 m_type(BC_UNKNOWN) {} 37 m_type(BC_UNKNOWN) {}
38 CFWL_BarcodeImp::~CFWL_BarcodeImp() { 38 CFWL_BarcodeImp::~CFWL_BarcodeImp() {
39 ReleaseBarcodeEngine(); 39 ReleaseBarcodeEngine();
40 } 40 }
41
41 FWL_Error CFWL_BarcodeImp::GetClassName(CFX_WideString& wsClass) const { 42 FWL_Error CFWL_BarcodeImp::GetClassName(CFX_WideString& wsClass) const {
42 wsClass = FWL_CLASS_Barcode; 43 wsClass = FWL_CLASS_Barcode;
43 return FWL_Error::Succeeded; 44 return FWL_Error::Succeeded;
44 } 45 }
45 uint32_t CFWL_BarcodeImp::GetClassID() const { 46
46 return FWL_CLASSHASH_Barcode; 47 FWL_Type CFWL_BarcodeImp::GetClassID() const {
48 return FWL_Type::Barcode;
47 } 49 }
50
48 FWL_Error CFWL_BarcodeImp::Initialize() { 51 FWL_Error CFWL_BarcodeImp::Initialize() {
49 if (!m_pDelegate) { 52 if (!m_pDelegate) {
50 m_pDelegate = new CFWL_BarcodeImpDelegate(this); 53 m_pDelegate = new CFWL_BarcodeImpDelegate(this);
51 } 54 }
52 if (CFWL_EditImp::Initialize() != FWL_Error::Succeeded) 55 if (CFWL_EditImp::Initialize() != FWL_Error::Succeeded)
53 return FWL_Error::Indefinite; 56 return FWL_Error::Indefinite;
54 return FWL_Error::Succeeded; 57 return FWL_Error::Succeeded;
55 } 58 }
56 FWL_Error CFWL_BarcodeImp::Finalize() { 59 FWL_Error CFWL_BarcodeImp::Finalize() {
57 delete m_pDelegate; 60 delete m_pDelegate;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 : CFWL_EditImpDelegate(pOwner) {} 224 : CFWL_EditImpDelegate(pOwner) {}
222 225
223 void CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { 226 void CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
224 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { 227 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) {
225 CFWL_BarcodeImp* pOwner = static_cast<CFWL_BarcodeImp*>(m_pOwner); 228 CFWL_BarcodeImp* pOwner = static_cast<CFWL_BarcodeImp*>(m_pOwner);
226 pOwner->ReleaseBarcodeEngine(); 229 pOwner->ReleaseBarcodeEngine();
227 pOwner->m_dwStatus = XFA_BCS_NeedUpdate; 230 pOwner->m_dwStatus = XFA_BCS_NeedUpdate;
228 } 231 }
229 CFWL_EditImpDelegate::OnProcessEvent(pEvent); 232 CFWL_EditImpDelegate::OnProcessEvent(pEvent);
230 } 233 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_barcodeimp.h ('k') | xfa/fwl/basewidget/fwl_caretimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698