| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/parser/cxfa_widgetdata.h" | 7 #include "xfa/fxfa/parser/cxfa_widgetdata.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fxbarcode/include/BC_Library.h" | 10 #include "xfa/fxbarcode/include/BC_Library.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 pSelectedMember = pNode; | 459 pSelectedMember = pNode; |
| 460 break; | 460 break; |
| 461 } | 461 } |
| 462 } | 462 } |
| 463 return pSelectedMember; | 463 return pSelectedMember; |
| 464 } | 464 } |
| 465 | 465 |
| 466 CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName, | 466 CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName, |
| 467 FX_BOOL bNotify) { | 467 FX_BOOL bNotify) { |
| 468 CXFA_Node* pSelectedMember = NULL; | 468 CXFA_Node* pSelectedMember = NULL; |
| 469 uint32_t nameHash = | 469 uint32_t nameHash = FX_HashCode_GetW(wsName, false); |
| 470 FX_HashCode_String_GetW(wsName.c_str(), wsName.GetLength()); | |
| 471 for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)); | 470 for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)); |
| 472 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { | 471 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { |
| 473 if (pNode->GetNameHash() == nameHash) { | 472 if (pNode->GetNameHash() == nameHash) { |
| 474 CXFA_WidgetData widgetData(pNode); | 473 CXFA_WidgetData widgetData(pNode); |
| 475 widgetData.SetCheckState(XFA_CHECKSTATE_On, bNotify); | 474 widgetData.SetCheckState(XFA_CHECKSTATE_On, bNotify); |
| 476 pSelectedMember = pNode; | 475 pSelectedMember = pNode; |
| 477 break; | 476 break; |
| 478 } | 477 } |
| 479 } | 478 } |
| 480 return pSelectedMember; | 479 return pSelectedMember; |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 } | 1782 } |
| 1784 } | 1783 } |
| 1785 } else if (wc == L'.') { | 1784 } else if (wc == L'.') { |
| 1786 iTread_ = 0; | 1785 iTread_ = 0; |
| 1787 iLead = -1; | 1786 iLead = -1; |
| 1788 } | 1787 } |
| 1789 wsRet += wc; | 1788 wsRet += wc; |
| 1790 } | 1789 } |
| 1791 return wsRet; | 1790 return wsRet; |
| 1792 } | 1791 } |
| OLD | NEW |