Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(867)

Side by Side Diff: xfa/fxfa/parser/cxfa_widgetdata.cpp

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix issue from c4 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/fm2js/xfa_simpleexpression.cpp ('k') | xfa/fxfa/parser/xfa_basic_imp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fxfa/fm2js/xfa_simpleexpression.cpp ('k') | xfa/fxfa/parser/xfa_basic_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698