Home | History | Annotate | Download | only in parser
      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_list.h"
      8 
      9 #include <utility>
     10 
     11 #include "core/fxcrt/fx_extension.h"
     12 #include "fxjs/cfxjse_engine.h"
     13 #include "fxjs/xfa/cjx_treelist.h"
     14 #include "xfa/fxfa/parser/cxfa_document.h"
     15 #include "xfa/fxfa/parser/cxfa_node.h"
     16 
     17 CXFA_List::CXFA_List(CXFA_Document* pDocument, std::unique_ptr<CJX_Object> obj)
     18     : CXFA_List(pDocument,
     19                 XFA_ObjectType::List,
     20                 XFA_Element::List,
     21                 WideStringView(L"list"),
     22                 std::move(obj)) {}
     23 
     24 CXFA_List::CXFA_List(CXFA_Document* pDocument,
     25                      XFA_ObjectType objectType,
     26                      XFA_Element eType,
     27                      const WideStringView& elementName,
     28                      std::unique_ptr<CJX_Object> obj)
     29     : CXFA_Object(pDocument, objectType, eType, elementName, std::move(obj)) {
     30   m_pDocument->GetScriptContext()->AddToCacheList(
     31       std::unique_ptr<CXFA_List>(this));
     32 }
     33 
     34 CXFA_List::~CXFA_List() {}
     35