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/fxfa/app/xfa_ffbarcode.h" | 7 #include "xfa/fxfa/app/xfa_ffbarcode.h" |
8 | 8 |
9 #include "core/fxcrt/fx_ext.h" | 9 #include "core/fxcrt/fx_ext.h" |
10 #include "xfa/fwl/core/fwl_noteimp.h" | 10 #include "xfa/fwl/core/fwl_noteimp.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 return nullptr; | 114 return nullptr; |
115 } | 115 } |
116 | 116 |
117 } // namespace. | 117 } // namespace. |
118 | 118 |
119 CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView, | 119 CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView, |
120 CXFA_WidgetAcc* pDataAcc) | 120 CXFA_WidgetAcc* pDataAcc) |
121 : CXFA_FFTextEdit(pPageView, pDataAcc) {} | 121 : CXFA_FFTextEdit(pPageView, pDataAcc) {} |
122 CXFA_FFBarcode::~CXFA_FFBarcode() {} | 122 CXFA_FFBarcode::~CXFA_FFBarcode() {} |
123 FX_BOOL CXFA_FFBarcode::LoadWidget() { | 123 FX_BOOL CXFA_FFBarcode::LoadWidget() { |
124 CFWL_Barcode* pFWLBarcode = CFWL_Barcode::Create(); | 124 CFWL_Barcode* pFWLBarcode = new CFWL_Barcode; |
125 if (pFWLBarcode) { | 125 if (pFWLBarcode) { |
Lei Zhang
2016/10/18 19:12:14
remove
dsinclair
2016/10/19 14:41:38
Done.
| |
126 pFWLBarcode->Initialize(); | 126 pFWLBarcode->Initialize(); |
127 } | 127 } |
128 m_pNormalWidget = pFWLBarcode; | 128 m_pNormalWidget = pFWLBarcode; |
129 m_pNormalWidget->SetLayoutItem(this); | 129 m_pNormalWidget->SetLayoutItem(this); |
130 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); | 130 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); |
131 CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); | 131 CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); |
132 pNoteDriver->RegisterEventTarget(pWidget, pWidget); | 132 pNoteDriver->RegisterEventTarget(pWidget, pWidget); |
133 m_pOldDelegate = m_pNormalWidget->SetDelegate(this); | 133 m_pOldDelegate = m_pNormalWidget->SetDelegate(this); |
134 m_pNormalWidget->LockUpdate(); | 134 m_pNormalWidget->LockUpdate(); |
135 CFX_WideString wsText; | 135 CFX_WideString wsText; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 } | 235 } |
236 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, | 236 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, |
237 FX_FLOAT fx, | 237 FX_FLOAT fx, |
238 FX_FLOAT fy) { | 238 FX_FLOAT fy) { |
239 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 239 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; |
240 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { | 240 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { |
241 return FALSE; | 241 return FALSE; |
242 } | 242 } |
243 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); | 243 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); |
244 } | 244 } |
OLD | NEW |