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

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

Issue 1857713003: Rename GetCStr and GetPtr to match CFX_ByteString (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 8 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/parser/xfa_basic_imp.cpp ('k') | xfa/fxfa/parser/xfa_document_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 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/parser/xfa_document_datamerger_imp.h" 7 #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fde/xml/fde_xml_imp.h" 10 #include "xfa/fde/xml/fde_xml_imp.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 break; 391 break;
392 } 392 }
393 } 393 }
394 return NULL; 394 return NULL;
395 } 395 }
396 static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument, 396 static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument,
397 CFX_WideStringC wsName, 397 CFX_WideStringC wsName,
398 CXFA_Node* pDataScope, 398 CXFA_Node* pDataScope,
399 XFA_ELEMENT eMatchNodeType) { 399 XFA_ELEMENT eMatchNodeType) {
400 uint32_t dwNameHash = 400 uint32_t dwNameHash =
401 wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), 401 wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
402 wsName.GetLength()); 402 wsName.GetLength());
403 if (dwNameHash != 0) { 403 if (dwNameHash != 0) {
404 CXFA_Node* pBounded = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash); 404 CXFA_Node* pBounded = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash);
405 if (!pBounded) { 405 if (!pBounded) {
406 pBounded = XFA_DataMerge_ScopeMatchGlobalBinding(pDataScope, dwNameHash, 406 pBounded = XFA_DataMerge_ScopeMatchGlobalBinding(pDataScope, dwNameHash,
407 eMatchNodeType); 407 eMatchNodeType);
408 if (pBounded) { 408 if (pBounded) {
409 XFA_DataMerge_RegisterGlobalBinding(pDocument, dwNameHash, pBounded); 409 XFA_DataMerge_RegisterGlobalBinding(pDocument, dwNameHash, pBounded);
410 } 410 }
411 } 411 }
412 return pBounded; 412 return pBounded;
413 } 413 }
414 return NULL; 414 return NULL;
415 } 415 }
416 static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument, 416 static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument,
417 CFX_WideStringC wsName, 417 CFX_WideStringC wsName,
418 CXFA_Node* pDataScope, 418 CXFA_Node* pDataScope,
419 XFA_ELEMENT eMatchNodeType) { 419 XFA_ELEMENT eMatchNodeType) {
420 uint32_t dwNameHash = 420 uint32_t dwNameHash =
421 wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.GetPtr(), 421 wsName.IsEmpty() ? 0 : FX_HashCode_String_GetW(wsName.raw_str(),
422 wsName.GetLength()); 422 wsName.GetLength());
423 if (dwNameHash != 0) { 423 if (dwNameHash != 0) {
424 for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = NULL; 424 for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = NULL;
425 pCurDataScope && 425 pCurDataScope &&
426 pCurDataScope->GetPacketID() == XFA_XDPPACKET_Datasets; 426 pCurDataScope->GetPacketID() == XFA_XDPPACKET_Datasets;
427 pLastDataScope = pCurDataScope, 427 pLastDataScope = pCurDataScope,
428 pCurDataScope = 428 pCurDataScope =
429 pCurDataScope->GetNodeItem(XFA_NODEITEM_Parent)) { 429 pCurDataScope->GetNodeItem(XFA_NODEITEM_Parent)) {
430 for (CXFA_Node* pDataChild = 430 for (CXFA_Node* pDataChild =
431 pCurDataScope->GetFirstChildByName(dwNameHash); 431 pCurDataScope->GetFirstChildByName(dwNameHash);
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 } 1423 }
1424 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); 1424 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL);
1425 } 1425 }
1426 XFA_DataMerge_ClearGlobalBinding(this); 1426 XFA_DataMerge_ClearGlobalBinding(this);
1427 if (bDoDataMerge) { 1427 if (bDoDataMerge) {
1428 DoDataMerge(); 1428 DoDataMerge();
1429 } 1429 }
1430 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); 1430 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor();
1431 pLayoutProcessor->SetForceReLayout(TRUE); 1431 pLayoutProcessor->SetForceReLayout(TRUE);
1432 } 1432 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_basic_imp.cpp ('k') | xfa/fxfa/parser/xfa_document_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698