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

Unified Diff: xfa/fxfa/parser/xfa_document_datamerger_imp.cpp

Issue 1890563003: Simplify XFA event handling. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datadescription_imp.cpp ('k') | xfa/fxfa/parser/xfa_document_imp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index a75a8ea72cbe74c9e32bdc643da8f1b7863037ff..0de107806f1a024c63cf6b15d7ceaf1ab14393c5 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -525,7 +525,7 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
pFormParent->RemoveChild(pExistingNode);
pFormParent->InsertChild(pExistingNode);
}
- pExistingNode->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
+ pExistingNode->ClearFlag(XFA_NODEFLAG_UnusedNode);
pExistingNode->SetTemplateNode(pTemplateNode);
if (bRecursive && pExistingNode->GetClassID() != XFA_ELEMENT_Items) {
for (CXFA_Node* pTemplateChild =
@@ -538,7 +538,7 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument,
}
}
}
- pExistingNode->SetFlag(XFA_NODEFLAG_Initialized);
+ pExistingNode->SetFlag(XFA_NODEFLAG_Initialized, true);
return pExistingNode;
}
CXFA_Node* pNewNode = pTemplateNode->CloneTemplateToForm(FALSE);
@@ -591,7 +591,7 @@ static CXFA_Node* XFA_NodeMerge_CloneOrMergeInstanceManager(
}
pFormParent->RemoveChild(pExistingNode);
pFormParent->InsertChild(pExistingNode);
- pExistingNode->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
+ pExistingNode->ClearFlag(XFA_NODEFLAG_UnusedNode);
pExistingNode->SetTemplateNode(pTemplateNode);
return pExistingNode;
}
@@ -785,11 +785,11 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet(
} else if (pInstMgrNode) {
pOccurNode = pInstMgrNode->GetFirstChildByClass(XFA_ELEMENT_Occur);
if (pOccurNode) {
- pOccurNode->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
+ pOccurNode->ClearFlag(XFA_NODEFLAG_UnusedNode);
}
}
if (pInstMgrNode) {
- pInstMgrNode->SetFlag(XFA_NODEFLAG_Initialized);
+ pInstMgrNode->SetFlag(XFA_NODEFLAG_Initialized, true);
pSearchArray = &subformArray;
if (pFormParentNode->GetClassID() == XFA_ELEMENT_PageArea) {
bOneInstance = TRUE;
@@ -1348,7 +1348,7 @@ void CXFA_Document::DoDataMerge() {
sIterator(pFormRoot);
for (CXFA_Node* pNode = sIterator.MoveToNext(); pNode;
pNode = sIterator.MoveToNext()) {
- pNode->SetFlag(XFA_NODEFLAG_UnusedNode);
+ pNode->SetFlag(XFA_NODEFLAG_UnusedNode, true);
}
}
CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer(
@@ -1406,12 +1406,12 @@ void CXFA_Document::DoDataMerge() {
pNode->GetNodeItem(XFA_NODEITEM_Parent)->RemoveChild(pNode);
pNode = pNext;
} else {
- pNode->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
- pNode->SetFlag(XFA_NODEFLAG_Initialized);
+ pNode->ClearFlag(XFA_NODEFLAG_UnusedNode);
+ pNode->SetFlag(XFA_NODEFLAG_Initialized, true);
pNode = sIterator.MoveToNext();
}
} else {
- pNode->SetFlag(XFA_NODEFLAG_Initialized);
+ pNode->SetFlag(XFA_NODEFLAG_Initialized, true);
pNode = sIterator.MoveToNext();
}
}
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datadescription_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