| 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/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fwl/core/fwl_noteimp.h" | 10 #include "xfa/fwl/core/fwl_noteimp.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 int32_t iMid = (iStart + iEnd) / 2; | 104 int32_t iMid = (iStart + iEnd) / 2; |
| 105 XFA_LPCBARCODETYPEENUMINFO pInfo = g_XFABarCodeTypeEnumData + iMid; | 105 XFA_LPCBARCODETYPEENUMINFO pInfo = g_XFABarCodeTypeEnumData + iMid; |
| 106 if (uHash == pInfo->uHash) { | 106 if (uHash == pInfo->uHash) { |
| 107 return pInfo; | 107 return pInfo; |
| 108 } else if (uHash < pInfo->uHash) { | 108 } else if (uHash < pInfo->uHash) { |
| 109 iEnd = iMid - 1; | 109 iEnd = iMid - 1; |
| 110 } else { | 110 } else { |
| 111 iStart = iMid + 1; | 111 iStart = iMid + 1; |
| 112 } | 112 } |
| 113 } while (iStart <= iEnd); | 113 } while (iStart <= iEnd); |
| 114 return NULL; | 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 = CFWL_Barcode::Create(); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, | 231 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, |
| 232 FX_FLOAT fx, | 232 FX_FLOAT fx, |
| 233 FX_FLOAT fy) { | 233 FX_FLOAT fy) { |
| 234 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 234 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; |
| 235 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { | 235 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { |
| 236 return FALSE; | 236 return FALSE; |
| 237 } | 237 } |
| 238 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); | 238 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); |
| 239 } | 239 } |
| OLD | NEW |