| 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   pFWLBarcode->Initialize(); | 
| 126     pFWLBarcode->Initialize(); | 126 | 
| 127   } |  | 
| 128   m_pNormalWidget = pFWLBarcode; | 127   m_pNormalWidget = pFWLBarcode; | 
| 129   m_pNormalWidget->SetLayoutItem(this); | 128   m_pNormalWidget->SetLayoutItem(this); | 
| 130   IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); | 129   IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); | 
| 131   CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); | 130   CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); | 
| 132   pNoteDriver->RegisterEventTarget(pWidget, pWidget); | 131   pNoteDriver->RegisterEventTarget(pWidget, pWidget); | 
| 133   m_pOldDelegate = m_pNormalWidget->SetDelegate(this); | 132   m_pOldDelegate = m_pNormalWidget->SetDelegate(this); | 
| 134   m_pNormalWidget->LockUpdate(); | 133   m_pNormalWidget->LockUpdate(); | 
| 135   CFX_WideString wsText; | 134   CFX_WideString wsText; | 
| 136   m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); | 135   m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); | 
| 137   pFWLBarcode->SetText(wsText); | 136   pFWLBarcode->SetText(wsText); | 
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 235 } | 234 } | 
| 236 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, | 235 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, | 
| 237                                       FX_FLOAT fx, | 236                                       FX_FLOAT fx, | 
| 238                                       FX_FLOAT fy) { | 237                                       FX_FLOAT fy) { | 
| 239   CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 238   CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 
| 240   if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { | 239   if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { | 
| 241     return FALSE; | 240     return FALSE; | 
| 242   } | 241   } | 
| 243   return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); | 242   return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); | 
| 244 } | 243 } | 
| OLD | NEW | 
|---|