summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_imp.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-14 18:29:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-14 18:29:56 -0700
commitb1a59597db4b8ce3ffc34dbfda2fb1ecb80c2397 (patch)
tree4bef693fc2b5722a86d75ee6110da8c9d5530f6d /xfa/fxfa/parser/xfa_document_imp.cpp
parentb1c80fb8b843a2a345b2cd6005e591dc731355f4 (diff)
downloadpdfium-b1a59597db4b8ce3ffc34dbfda2fb1ecb80c2397.tar.xz
Simplify XFA event handling.
- Avoid casting to void* - Don't bother firing events that no one listens for Review URL: https://codereview.chromium.org/1890563003
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_imp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp
index 2b848ab1b3..8ea2ebb1cb 100644
--- a/xfa/fxfa/parser/xfa_document_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp
@@ -312,7 +312,7 @@ static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument,
if (pFormChild->GetClassID() == pProtoNode->GetClassID() &&
pFormChild->GetNameHash() == pProtoNode->GetNameHash() &&
pFormChild->HasFlag(XFA_NODEFLAG_UnusedNode)) {
- pFormChild->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
+ pFormChild->ClearFlag(XFA_NODEFLAG_UnusedNode);
pExistingNode = pFormChild;
break;
}
@@ -338,7 +338,7 @@ static void XFA_ProtoMerge_MergeNode(CXFA_Document* pDocument,
CXFA_NodeIterator sIterator(pDestNode);
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
- pNode->SetFlag(XFA_NODEFLAG_UnusedNode);
+ pNode->SetFlag(XFA_NODEFLAG_UnusedNode, true);
}
}
pDestNode->SetTemplateNode(pProtoNode);
@@ -352,7 +352,7 @@ static void XFA_ProtoMerge_MergeNode(CXFA_Document* pDocument,
CXFA_NodeIterator sIterator(pDestNode);
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode;
pNode = sIterator.MoveToNext()) {
- pNode->SetFlag(XFA_NODEFLAG_UnusedNode, FALSE);
+ pNode->ClearFlag(XFA_NODEFLAG_UnusedNode);
}
}
}