blob: 439276a0e556f7d0a470c62320f04bb028ba9f44 [file] [log] [blame]
kumarashishg826308d2023-06-23 13:21:22 +00001// Copyright 2017 The PDFium Authors
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -07002// 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_compressobjectstream.h"
8
Haibo Huang49cc9302020-04-27 16:14:24 -07009#include "fxjs/xfa/cjx_node.h"
kumarashishg826308d2023-06-23 13:21:22 +000010#include "xfa/fxfa/parser/cxfa_document.h"
Haibo Huang49cc9302020-04-27 16:14:24 -070011
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070012namespace {
13
Haibo Huang49cc9302020-04-27 16:14:24 -070014const CXFA_Node::AttributeData kCompressObjectStreamAttributeData[] = {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070015 {XFA_Attribute::Desc, XFA_AttributeType::CData, nullptr},
16 {XFA_Attribute::Lock, XFA_AttributeType::Integer, (void*)0},
Haibo Huang49cc9302020-04-27 16:14:24 -070017};
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070018
19} // namespace
20
21CXFA_CompressObjectStream::CXFA_CompressObjectStream(CXFA_Document* doc,
22 XFA_PacketType packet)
23 : CXFA_Node(doc,
24 packet,
kumarashishg826308d2023-06-23 13:21:22 +000025 XFA_XDPPACKET::kConfig,
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070026 XFA_ObjectType::ContentNode,
27 XFA_Element::CompressObjectStream,
Haibo Huang49cc9302020-04-27 16:14:24 -070028 {},
29 kCompressObjectStreamAttributeData,
kumarashishg826308d2023-06-23 13:21:22 +000030 cppgc::MakeGarbageCollected<CJX_Node>(
31 doc->GetHeap()->GetAllocationHandle(),
32 this)) {}
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070033
Haibo Huang49cc9302020-04-27 16:14:24 -070034CXFA_CompressObjectStream::~CXFA_CompressObjectStream() = default;