summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_list.cpp
blob: 6f5fc29ca5283d05f5d05e94c24065c95faecbf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "xfa/fxfa/parser/cxfa_list.h"

#include <utility>

#include "core/fxcrt/fx_extension.h"
#include "fxjs/cfxjse_engine.h"
#include "fxjs/xfa/cjx_treelist.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"

CXFA_List::CXFA_List(CXFA_Document* pDocument, std::unique_ptr<CJX_Object> obj)
    : CXFA_List(pDocument,
                XFA_ObjectType::List,
                XFA_Element::List,
                WideStringView(L"list"),
                std::move(obj)) {}

CXFA_List::CXFA_List(CXFA_Document* pDocument,
                     XFA_ObjectType objectType,
                     XFA_Element eType,
                     const WideStringView& elementName,
                     std::unique_ptr<CJX_Object> obj)
    : CXFA_Object(pDocument, objectType, eType, elementName, std::move(obj)) {
  m_pDocument->GetScriptContext()->AddToCacheList(
      std::unique_ptr<CXFA_List>(this));
}

CXFA_List::~CXFA_List() {}