summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_parser_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_parser_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_parser_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 75ccb1122a..5dd6be50ce 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -175,7 +175,7 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode,
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLChild);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
break;
}
}
@@ -694,7 +694,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
}
pNode->SetXMLMappingNode(pDataXMLNode);
if (pDataXMLNode != pXMLDocumentNode) {
- pNode->SetFlag(XFA_NODEFLAG_OwnXMLNode, TRUE, FALSE);
+ pNode->SetFlag(XFA_NODEFLAG_OwnXMLNode, false);
}
return pNode;
}
@@ -1145,7 +1145,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
XFA_ATTRIBUTEENUM_MetaData);
pXFAChild->InsertChild(pXFAMetaData);
pXFAMetaData->SetXMLMappingNode(pXMLElement);
- pXFAMetaData->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAMetaData->SetFlag(XFA_NODEFLAG_Initialized, false);
}
if (!bNeedValue) {
CFX_WideString wsNilName = FX_WSTRC(L"xsi:nil");
@@ -1161,7 +1161,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
}
}
pXFAChild->SetXMLMappingNode(pXMLElement);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
}
continue;
case FDE_XMLNODE_CharData: {
@@ -1180,7 +1180,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsCharData);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCharData);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
}
continue;
case FDE_XMLNODE_Text: {
@@ -1198,7 +1198,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsText);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLText);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
}
continue;
case FDE_XMLNODE_Instruction:
@@ -1259,7 +1259,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
wsValueTextBuf << wsCurValue;
wsCurValueTextBuf.Clear();
}
@@ -1276,7 +1276,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
ParseDataValue(pXFAChild, pXMLChild, ePacketID);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLChild);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
CFX_WideStringC wsCurValue = pXFAChild->GetCData(XFA_ATTRIBUTE_Value);
wsValueTextBuf << wsCurValue;
}
@@ -1294,7 +1294,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
pXFAChild->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
- pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, TRUE, FALSE);
+ pXFAChild->SetFlag(XFA_NODEFLAG_Initialized, false);
}
wsValueTextBuf << wsCurValue;
wsCurValueTextBuf.Clear();