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 "fxjs/xfa/cjx_delta.h"
8
9 #include <vector>
10
11 #include "fxjs/js_resources.h"
12 #include "fxjs/xfa/cfxjse_value.h"
13 #include "xfa/fxfa/parser/cxfa_delta.h"
14
15 const CJX_MethodSpec CJX_Delta::MethodSpecs[] = {{"restore", restore_static}};
16
CJX_Delta(CXFA_Delta * delta)17 CJX_Delta::CJX_Delta(CXFA_Delta* delta) : CJX_Object(delta) {
18 DefineMethods(MethodSpecs);
19 }
20
~CJX_Delta()21 CJX_Delta::~CJX_Delta() {}
22
DynamicTypeIs(TypeTag eType) const23 bool CJX_Delta::DynamicTypeIs(TypeTag eType) const {
24 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
25 }
26
restore(CFX_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)27 CJS_Result CJX_Delta::restore(CFX_V8* runtime,
28 const std::vector<v8::Local<v8::Value>>& params) {
29 if (!params.empty())
30 return CJS_Result::Failure(JSMessage::kParamError);
31
32 return CJS_Result::Success();
33 }
34
currentValue(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)35 void CJX_Delta::currentValue(CFXJSE_Value* pValue,
36 bool bSetting,
37 XFA_Attribute eAttribute) {}
38
savedValue(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)39 void CJX_Delta::savedValue(CFXJSE_Value* pValue,
40 bool bSetting,
41 XFA_Attribute eAttribute) {}
42
target(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)43 void CJX_Delta::target(CFXJSE_Value* pValue,
44 bool bSetting,
45 XFA_Attribute eAttribute) {}
46