diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-30 21:26:51 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-30 21:26:51 +0000 |
commit | 9daec60824d085db8c2f841fd389c725df1f8b0b (patch) | |
tree | 2defab579e0d19a40932780864e1fe30cd5dbb4c /xfa/fxfa/parser/cxfa_node.cpp | |
parent | 8b357e7504ea804293983453540ae91c9fc57922 (diff) | |
download | pdfium-9daec60824d085db8c2f841fd389c725df1f8b0b.tar.xz |
Cleanup XFA packet code
Remove GetPacketByID, move GetPacketByName to the xfa_utils file.
Cleanup CreateNode to accept the XFA_XDPPACKET instead of the packet
info.
Change-Id: I0f246c84f61b6b4175ca307bdcd125d9bc24bb1e
Reviewed-on: https://pdfium-review.googlesource.com/20010
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.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index f24bddb990..c8e226633b 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -157,7 +157,7 @@ pdfium::Optional<XFA_ATTRIBUTEENUM> CXFA_Node::NameToAttributeEnum( } CXFA_Node::CXFA_Node(CXFA_Document* pDoc, - uint16_t ePacket, + XFA_XDPPACKET ePacket, uint32_t validPackets, XFA_ObjectType oType, XFA_Element eType, @@ -429,8 +429,7 @@ std::vector<CXFA_Node*> CXFA_Node::GetNodeList(uint32_t dwTypeFilter, if (!property) return nodes; - const XFA_PACKETINFO* pPacket = XFA_GetPacketByID(GetPacketID()); - CXFA_Node* pNewNode = m_pDocument->CreateNode(pPacket, *property); + CXFA_Node* pNewNode = m_pDocument->CreateNode(GetPacketID(), *property); if (pNewNode) { InsertChild(pNewNode, nullptr); pNewNode->SetFlag(XFA_NodeFlag_Initialized, true); |