| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 1 | // 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_sourceset.h" |
| 8 | |
| Tom Sepez | da86ca3 | 2019-01-25 18:38:26 +0000 | [diff] [blame] | 9 | #include "fxjs/xfa/cjx_model.h" |
| Dan Sinclair | 93bb725 | 2017-12-07 22:33:43 +0000 | [diff] [blame] | 10 | #include "third_party/base/ptr_util.h" |
| 11 | |
| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 12 | namespace { |
| 13 | |
| Lei Zhang | ec7d8e2 | 2018-02-07 19:57:25 +0000 | [diff] [blame] | 14 | const CXFA_Node::AttributeData kSourceSetAttributeData[] = { |
| Dan Sinclair | 21b0827 | 2017-11-30 20:22:20 +0000 | [diff] [blame] | 15 | {XFA_Attribute::Id, XFA_AttributeType::CData, nullptr}, |
| 16 | {XFA_Attribute::Name, XFA_AttributeType::CData, nullptr}, |
| 17 | {XFA_Attribute::Use, XFA_AttributeType::CData, nullptr}, |
| 18 | {XFA_Attribute::Usehref, XFA_AttributeType::CData, nullptr}, |
| Tom Sepez | a8c86c2 | 2019-01-25 22:06:03 +0000 | [diff] [blame] | 19 | }; |
| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 20 | |
| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 21 | } // namespace |
| 22 | |
| Dan Sinclair | c40c5aa | 2017-11-30 21:29:11 +0000 | [diff] [blame] | 23 | CXFA_SourceSet::CXFA_SourceSet(CXFA_Document* doc, XFA_PacketType packet) |
| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 24 | : CXFA_Node(doc, |
| 25 | packet, |
| 26 | XFA_XDPPACKET_SourceSet, |
| 27 | XFA_ObjectType::ModelNode, |
| 28 | XFA_Element::SourceSet, |
| Tom Sepez | c0fa5f6 | 2019-01-25 20:07:27 +0000 | [diff] [blame] | 29 | {}, |
| Lei Zhang | ec7d8e2 | 2018-02-07 19:57:25 +0000 | [diff] [blame] | 30 | kSourceSetAttributeData, |
| Tom Sepez | da86ca3 | 2019-01-25 18:38:26 +0000 | [diff] [blame] | 31 | pdfium::MakeUnique<CJX_Model>(this)) {} |
| Dan Sinclair | f473672 | 2017-11-27 18:10:47 +0000 | [diff] [blame] | 32 | |
| Tom Sepez | 7fc43dd | 2018-12-13 17:54:26 +0000 | [diff] [blame] | 33 | CXFA_SourceSet::~CXFA_SourceSet() = default; |