summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-30 21:29:11 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-30 21:29:11 +0000
commitc40c5aa2d7f1753dd382c35955deafdaca660020 (patch)
treeb427f5516046d40b8dd63f8c7a552fac0bf278ae /xfa/fxfa/parser/cxfa_node.h
parent9daec60824d085db8c2f841fd389c725df1f8b0b (diff)
downloadpdfium-c40c5aa2d7f1753dd382c35955deafdaca660020.tar.xz
A CXFA_Node can only be in one packet
When a CXFA_Node is created it's created as part of a specific packet. Previously the code would accept an XFA_XDPPACKET which was stored internally. This had the potential to allow a node to exist in multiple packets. This CL changes the XFA_XDPPacket to the XFA_PacketType enum class and cleans up a lot of uses to use the more specific packet type. Change-Id: I7fc8c843bfa6bd32295ae58a26bcec311e43c4b0 Reviewed-on: https://pdfium-review.googlesource.com/20012 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.h')
-rw-r--r--xfa/fxfa/parser/cxfa_node.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h
index a2e8b3042c..066be5e8fe 100644
--- a/xfa/fxfa/parser/cxfa_node.h
+++ b/xfa/fxfa/parser/cxfa_node.h
@@ -70,7 +70,7 @@ class CXFA_Node : public CXFA_Object {
static XFA_Element NameToElement(const WideString& name);
static std::unique_ptr<CXFA_Node> Create(CXFA_Document* doc,
XFA_Element element,
- XFA_XDPPACKET packet);
+ XFA_PacketType packet);
~CXFA_Node() override;
@@ -84,7 +84,7 @@ class CXFA_Node : public CXFA_Object {
XFA_Attribute GetAttribute(size_t i) const;
XFA_AttributeType GetAttributeType(XFA_Attribute type) const;
- XFA_XDPPACKET GetPacketID() const { return m_ePacket; }
+ XFA_PacketType GetPacketType() const { return m_ePacket; }
void SetFlag(uint32_t dwFlag, bool bNotify);
void ClearFlag(uint32_t dwFlag);
@@ -123,7 +123,7 @@ class CXFA_Node : public CXFA_Object {
bool IsAttributeInXML();
bool IsFormContainer() const {
- return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode();
+ return m_ePacket == XFA_PacketType::Form && IsContainerNode();
}
void SetXMLMappingNode(CFX_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; }
CFX_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; }
@@ -182,7 +182,7 @@ class CXFA_Node : public CXFA_Object {
protected:
CXFA_Node(CXFA_Document* pDoc,
- XFA_XDPPACKET ePacket,
+ XFA_PacketType ePacket,
uint32_t validPackets,
XFA_ObjectType oType,
XFA_Element eType,
@@ -208,7 +208,7 @@ class CXFA_Node : public CXFA_Object {
CXFA_Node* m_pLastChild;
CXFA_Node* m_pParent;
CFX_XMLNode* m_pXMLNode;
- const XFA_XDPPACKET m_ePacket;
+ const XFA_PacketType m_ePacket;
uint16_t m_uNodeFlags;
uint32_t m_dwNameHash;
CXFA_Node* m_pAuxNode;