From c5a8f217fedc1224104b34f7577044776a9d83d8 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 20 Jun 2016 11:11:12 -0700 Subject: Split the XFA_OBJECTTYPE enum into two parts. Currently the object type and the node flags are both mixed into the single XFA_OBJECTTYPE_* enum. These two things are un-related and should not share a single type. This Cl creates an XFA_ObjectType enum class and a XFA_NodeFlag enum to hold the two types. Accessors are added to determine if the flags are set (or called where they already existed. Review-Url: https://codereview.chromium.org/2083453003 --- xfa/fxfa/parser/xfa_document_imp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/parser/xfa_document_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index ffc7ed6729..76ec4ec465 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -292,8 +292,8 @@ static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument, pFormChild = pFormChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { if (pFormChild->GetClassID() == pProtoNode->GetClassID() && pFormChild->GetNameHash() == pProtoNode->GetNameHash() && - pFormChild->HasFlag(XFA_NODEFLAG_UnusedNode)) { - pFormChild->ClearFlag(XFA_NODEFLAG_UnusedNode); + pFormChild->IsUnusedNode()) { + pFormChild->ClearFlag(XFA_NodeFlag_UnusedNode); pExistingNode = pFormChild; break; } @@ -319,7 +319,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, true); + pNode->SetFlag(XFA_NodeFlag_UnusedNode, true); } } pDestNode->SetTemplateNode(pProtoNode); @@ -333,7 +333,7 @@ static void XFA_ProtoMerge_MergeNode(CXFA_Document* pDocument, CXFA_NodeIterator sIterator(pDestNode); for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode; pNode = sIterator.MoveToNext()) { - pNode->ClearFlag(XFA_NODEFLAG_UnusedNode); + pNode->ClearFlag(XFA_NodeFlag_UnusedNode); } } } -- cgit v1.2.3