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

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

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments 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/parser/xfa_basic_imp.cpp ('k') | xfa/fxfa/parser/xfa_localemgr.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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 CFX_ArrayTemplate<CXFA_Node*> rgItemUnmatchList; 879 CFX_ArrayTemplate<CXFA_Node*> rgItemUnmatchList;
880 for (CXFA_Node* pTemplateChild = 880 for (CXFA_Node* pTemplateChild =
881 pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild); 881 pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild);
882 pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem( 882 pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem(
883 XFA_NODEITEM_NextSibling)) { 883 XFA_NODEITEM_NextSibling)) {
884 if (XFA_NeedGenerateForm(pTemplateChild, bUseInstanceManager)) { 884 if (XFA_NeedGenerateForm(pTemplateChild, bUseInstanceManager)) {
885 XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformSetNode, 885 XFA_NodeMerge_CloneOrMergeContainer(pDocument, pSubformSetNode,
886 pTemplateChild, TRUE); 886 pTemplateChild, TRUE);
887 } else if (pTemplateChild->GetObjectType() == 887 } else if (pTemplateChild->GetObjectType() ==
888 XFA_OBJECTTYPE_ContainerNode) { 888 XFA_OBJECTTYPE_ContainerNode) {
889 CXFA_Node* pDataMatch;
890 bSelfMatch = FALSE; 889 bSelfMatch = FALSE;
891 eBindMatch = XFA_ATTRIBUTEENUM_None; 890 eBindMatch = XFA_ATTRIBUTEENUM_None;
891 CXFA_Node* pDataMatch;
892 if (eRelation != XFA_ATTRIBUTEENUM_Ordered && 892 if (eRelation != XFA_ATTRIBUTEENUM_Ordered &&
893 (pDataMatch = XFA_DataMerge_FindMatchingDataNode( 893 (pDataMatch = XFA_DataMerge_FindMatchingDataNode(
894 pDocument, pTemplateChild, pDataScope, bAccessedDataDOM, 894 pDocument, pTemplateChild, pDataScope, bAccessedDataDOM,
895 FALSE, NULL, bSelfMatch, eBindMatch))) { 895 FALSE, NULL, bSelfMatch, eBindMatch)) != nullptr) {
896 XFA_DataMerge_RecurseRecord sNewRecord = {pTemplateChild, 896 XFA_DataMerge_RecurseRecord sNewRecord = {pTemplateChild,
897 pDataMatch}; 897 pDataMatch};
898 if (bSelfMatch) { 898 if (bSelfMatch) {
899 rgItemMatchList.InsertAt(0, sNewRecord); 899 rgItemMatchList.InsertAt(0, sNewRecord);
900 } else { 900 } else {
901 rgItemMatchList.Add(sNewRecord); 901 rgItemMatchList.Add(sNewRecord);
902 } 902 }
903 } else { 903 } else {
904 rgItemUnmatchList.Add(pTemplateChild); 904 rgItemUnmatchList.Add(pTemplateChild);
905 } 905 }
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 } 1413 }
1414 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); 1414 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL);
1415 } 1415 }
1416 XFA_DataMerge_ClearGlobalBinding(this); 1416 XFA_DataMerge_ClearGlobalBinding(this);
1417 if (bDoDataMerge) { 1417 if (bDoDataMerge) {
1418 DoDataMerge(); 1418 DoDataMerge();
1419 } 1419 }
1420 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); 1420 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor();
1421 pLayoutProcessor->SetForceReLayout(TRUE); 1421 pLayoutProcessor->SetForceReLayout(TRUE);
1422 } 1422 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_basic_imp.cpp ('k') | xfa/fxfa/parser/xfa_localemgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698