OLD | NEW |
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/cfwl_barcode.h" | 7 #include "xfa/fwl/core/cfwl_barcode.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 BC_TYPE tEngineType = m_pBarcodeEngine->GetType(); | 82 BC_TYPE tEngineType = m_pBarcodeEngine->GetType(); |
83 if (tEngineType == BC_QR_CODE || tEngineType == BC_PDF417 || | 83 if (tEngineType == BC_QR_CODE || tEngineType == BC_PDF417 || |
84 tEngineType == BC_DATAMATRIX) { | 84 tEngineType == BC_DATAMATRIX) { |
85 return true; | 85 return true; |
86 } | 86 } |
87 return false; | 87 return false; |
88 } | 88 } |
89 | 89 |
90 void CFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) { | 90 void CFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) { |
91 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { | 91 if (pEvent->GetType() == CFWL_Event::Type::TextChanged) { |
92 m_pBarcodeEngine.reset(); | 92 m_pBarcodeEngine.reset(); |
93 m_dwStatus = XFA_BCS_NeedUpdate; | 93 m_dwStatus = XFA_BCS_NeedUpdate; |
94 } | 94 } |
95 CFWL_Edit::OnProcessEvent(pEvent); | 95 CFWL_Edit::OnProcessEvent(pEvent); |
96 } | 96 } |
97 | 97 |
98 void CFWL_Barcode::SetCharEncoding(BC_CHAR_ENCODING encoding) { | 98 void CFWL_Barcode::SetCharEncoding(BC_CHAR_ENCODING encoding) { |
99 m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; | 99 m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING; |
100 m_eCharEncoding = encoding; | 100 m_eCharEncoding = encoding; |
101 } | 101 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 223 } |
224 | 224 |
225 void CFWL_Barcode::CreateBarcodeEngine() { | 225 void CFWL_Barcode::CreateBarcodeEngine() { |
226 if (m_pBarcodeEngine || m_type == BC_UNKNOWN) | 226 if (m_pBarcodeEngine || m_type == BC_UNKNOWN) |
227 return; | 227 return; |
228 | 228 |
229 std::unique_ptr<CFX_Barcode> pBarcode(new CFX_Barcode); | 229 std::unique_ptr<CFX_Barcode> pBarcode(new CFX_Barcode); |
230 if (pBarcode->Create(m_type)) | 230 if (pBarcode->Create(m_type)) |
231 m_pBarcodeEngine = std::move(pBarcode); | 231 m_pBarcodeEngine = std::move(pBarcode); |
232 } | 232 } |
OLD | NEW |