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_viewerpreferences.h"
      8 
      9 namespace {
     10 
     11 const CXFA_Node::PropertyData kPropertyData[] = {
     12     {XFA_Element::PrintScaling, 1, 0},
     13     {XFA_Element::Enforce, 1, 0},
     14     {XFA_Element::NumberOfCopies, 1, 0},
     15     {XFA_Element::PageRange, 1, 0},
     16     {XFA_Element::AddViewerPreferences, 1, 0},
     17     {XFA_Element::ADBE_JSConsole, 1, 0},
     18     {XFA_Element::DuplexOption, 1, 0},
     19     {XFA_Element::ADBE_JSDebugger, 1, 0},
     20     {XFA_Element::PickTrayByPDFSize, 1, 0},
     21     {XFA_Element::Unknown, 0, 0}};
     22 const CXFA_Node::AttributeData kAttributeData[] = {
     23     {XFA_Attribute::Desc, XFA_AttributeType::CData, nullptr},
     24     {XFA_Attribute::Lock, XFA_AttributeType::Integer, (void*)0},
     25     {XFA_Attribute::Unknown, XFA_AttributeType::Integer, nullptr}};
     26 
     27 constexpr wchar_t kName[] = L"viewerPreferences";
     28 
     29 }  // namespace
     30 
     31 CXFA_ViewerPreferences::CXFA_ViewerPreferences(CXFA_Document* doc,
     32                                                XFA_PacketType packet)
     33     : CXFA_Node(doc,
     34                 packet,
     35                 XFA_XDPPACKET_Config,
     36                 XFA_ObjectType::Node,
     37                 XFA_Element::ViewerPreferences,
     38                 kPropertyData,
     39                 kAttributeData,
     40                 kName) {}
     41 
     42 CXFA_ViewerPreferences::~CXFA_ViewerPreferences() {}
     43