blob: 31238a6f487df9340e4f454c025426ed2d6ae6d3 [file] [log] [blame]
Dan Sinclairf4736722017-11-27 18:10:47 +00001// Copyright 2017 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "xfa/fxfa/parser/cxfa_documentassembly.h"
8
Tom Sepezca63f7b2020-05-18 22:28:41 +00009#include <memory>
10
Tom Sepez148c1442019-01-25 18:56:26 +000011#include "fxjs/xfa/cjx_node.h"
Tom Sepez148c1442019-01-25 18:56:26 +000012
Dan Sinclairf4736722017-11-27 18:10:47 +000013namespace {
14
Lei Zhangec7d8e22018-02-07 19:57:25 +000015const CXFA_Node::AttributeData kDocumentAssemblyAttributeData[] = {
Dan Sinclair21b08272017-11-30 20:22:20 +000016 {XFA_Attribute::Desc, XFA_AttributeType::CData, nullptr},
17 {XFA_Attribute::Lock, XFA_AttributeType::Integer, (void*)0},
Tom Sepeza8c86c22019-01-25 22:06:03 +000018};
Dan Sinclairf4736722017-11-27 18:10:47 +000019
Dan Sinclairf4736722017-11-27 18:10:47 +000020} // namespace
21
22CXFA_DocumentAssembly::CXFA_DocumentAssembly(CXFA_Document* doc,
Dan Sinclairc40c5aa2017-11-30 21:29:11 +000023 XFA_PacketType packet)
Dan Sinclairf4736722017-11-27 18:10:47 +000024 : CXFA_Node(doc,
25 packet,
26 XFA_XDPPACKET_Config,
27 XFA_ObjectType::ContentNode,
28 XFA_Element::DocumentAssembly,
Tom Sepezc0fa5f62019-01-25 20:07:27 +000029 {},
Tom Sepez148c1442019-01-25 18:56:26 +000030 kDocumentAssemblyAttributeData,
Tom Sepezca63f7b2020-05-18 22:28:41 +000031 std::make_unique<CJX_Node>(this)) {}
Dan Sinclairf4736722017-11-27 18:10:47 +000032
Tom Sepez7fc43dd2018-12-13 17:54:26 +000033CXFA_DocumentAssembly::~CXFA_DocumentAssembly() = default;