kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 1 | // Copyright 2017 The PDFium Authors |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 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_jog.h" |
| 8 | |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 9 | #include "fxjs/xfa/cjx_node.h" |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 10 | #include "xfa/fxfa/parser/cxfa_document.h" |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 11 | |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 12 | namespace { |
| 13 | |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 14 | const CXFA_Node::AttributeData kJogAttributeData[] = { |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 15 | {XFA_Attribute::Desc, XFA_AttributeType::CData, nullptr}, |
| 16 | {XFA_Attribute::Lock, XFA_AttributeType::Integer, (void*)0}, |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 17 | }; |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 18 | |
| 19 | } // namespace |
| 20 | |
| 21 | CXFA_Jog::CXFA_Jog(CXFA_Document* doc, XFA_PacketType packet) |
| 22 | : CXFA_Node(doc, |
| 23 | packet, |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 24 | XFA_XDPPACKET::kConfig, |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 25 | XFA_ObjectType::ContentNode, |
| 26 | XFA_Element::Jog, |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 27 | {}, |
| 28 | kJogAttributeData, |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 29 | cppgc::MakeGarbageCollected<CJX_Node>( |
| 30 | doc->GetHeap()->GetAllocationHandle(), |
| 31 | this)) {} |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 32 | |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 33 | CXFA_Jog::~CXFA_Jog() = default; |