1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2017 The PDFium Authors
2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file.
4*3ac0a46fSAndroid Build Coastguard Worker
5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6*3ac0a46fSAndroid Build Coastguard Worker
7*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/xfa/cjx_datawindow.h"
8*3ac0a46fSAndroid Build Coastguard Worker
9*3ac0a46fSAndroid Build Coastguard Worker #include <vector>
10*3ac0a46fSAndroid Build Coastguard Worker
11*3ac0a46fSAndroid Build Coastguard Worker #include "fxjs/xfa/cfxjse_value.h"
12*3ac0a46fSAndroid Build Coastguard Worker #include "xfa/fxfa/parser/cscript_datawindow.h"
13*3ac0a46fSAndroid Build Coastguard Worker
14*3ac0a46fSAndroid Build Coastguard Worker const CJX_MethodSpec CJX_DataWindow::MethodSpecs[] = {
15*3ac0a46fSAndroid Build Coastguard Worker {"gotoRecord", gotoRecord_static},
16*3ac0a46fSAndroid Build Coastguard Worker {"isRecordGroup", isRecordGroup_static},
17*3ac0a46fSAndroid Build Coastguard Worker {"moveCurrentRecord", moveCurrentRecord_static},
18*3ac0a46fSAndroid Build Coastguard Worker {"record", record_static}};
19*3ac0a46fSAndroid Build Coastguard Worker
CJX_DataWindow(CScript_DataWindow * window)20*3ac0a46fSAndroid Build Coastguard Worker CJX_DataWindow::CJX_DataWindow(CScript_DataWindow* window)
21*3ac0a46fSAndroid Build Coastguard Worker : CJX_Object(window) {
22*3ac0a46fSAndroid Build Coastguard Worker DefineMethods(MethodSpecs);
23*3ac0a46fSAndroid Build Coastguard Worker }
24*3ac0a46fSAndroid Build Coastguard Worker
25*3ac0a46fSAndroid Build Coastguard Worker CJX_DataWindow::~CJX_DataWindow() = default;
26*3ac0a46fSAndroid Build Coastguard Worker
DynamicTypeIs(TypeTag eType) const27*3ac0a46fSAndroid Build Coastguard Worker bool CJX_DataWindow::DynamicTypeIs(TypeTag eType) const {
28*3ac0a46fSAndroid Build Coastguard Worker return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
29*3ac0a46fSAndroid Build Coastguard Worker }
30*3ac0a46fSAndroid Build Coastguard Worker
moveCurrentRecord(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)31*3ac0a46fSAndroid Build Coastguard Worker CJS_Result CJX_DataWindow::moveCurrentRecord(
32*3ac0a46fSAndroid Build Coastguard Worker CFXJSE_Engine* runtime,
33*3ac0a46fSAndroid Build Coastguard Worker const std::vector<v8::Local<v8::Value>>& params) {
34*3ac0a46fSAndroid Build Coastguard Worker return CJS_Result::Success();
35*3ac0a46fSAndroid Build Coastguard Worker }
36*3ac0a46fSAndroid Build Coastguard Worker
record(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)37*3ac0a46fSAndroid Build Coastguard Worker CJS_Result CJX_DataWindow::record(
38*3ac0a46fSAndroid Build Coastguard Worker CFXJSE_Engine* runtime,
39*3ac0a46fSAndroid Build Coastguard Worker const std::vector<v8::Local<v8::Value>>& params) {
40*3ac0a46fSAndroid Build Coastguard Worker return CJS_Result::Success();
41*3ac0a46fSAndroid Build Coastguard Worker }
42*3ac0a46fSAndroid Build Coastguard Worker
gotoRecord(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)43*3ac0a46fSAndroid Build Coastguard Worker CJS_Result CJX_DataWindow::gotoRecord(
44*3ac0a46fSAndroid Build Coastguard Worker CFXJSE_Engine* runtime,
45*3ac0a46fSAndroid Build Coastguard Worker const std::vector<v8::Local<v8::Value>>& params) {
46*3ac0a46fSAndroid Build Coastguard Worker return CJS_Result::Success();
47*3ac0a46fSAndroid Build Coastguard Worker }
48*3ac0a46fSAndroid Build Coastguard Worker
isRecordGroup(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)49*3ac0a46fSAndroid Build Coastguard Worker CJS_Result CJX_DataWindow::isRecordGroup(
50*3ac0a46fSAndroid Build Coastguard Worker CFXJSE_Engine* runtime,
51*3ac0a46fSAndroid Build Coastguard Worker const std::vector<v8::Local<v8::Value>>& params) {
52*3ac0a46fSAndroid Build Coastguard Worker return CJS_Result::Success();
53*3ac0a46fSAndroid Build Coastguard Worker }
54*3ac0a46fSAndroid Build Coastguard Worker
recordsBefore(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)55*3ac0a46fSAndroid Build Coastguard Worker void CJX_DataWindow::recordsBefore(v8::Isolate* pIsolate,
56*3ac0a46fSAndroid Build Coastguard Worker v8::Local<v8::Value>* pValue,
57*3ac0a46fSAndroid Build Coastguard Worker bool bSetting,
58*3ac0a46fSAndroid Build Coastguard Worker XFA_Attribute eAttribute) {}
59*3ac0a46fSAndroid Build Coastguard Worker
currentRecordNumber(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)60*3ac0a46fSAndroid Build Coastguard Worker void CJX_DataWindow::currentRecordNumber(v8::Isolate* pIsolate,
61*3ac0a46fSAndroid Build Coastguard Worker v8::Local<v8::Value>* pValue,
62*3ac0a46fSAndroid Build Coastguard Worker bool bSetting,
63*3ac0a46fSAndroid Build Coastguard Worker XFA_Attribute eAttribute) {}
64*3ac0a46fSAndroid Build Coastguard Worker
recordsAfter(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)65*3ac0a46fSAndroid Build Coastguard Worker void CJX_DataWindow::recordsAfter(v8::Isolate* pIsolate,
66*3ac0a46fSAndroid Build Coastguard Worker v8::Local<v8::Value>* pValue,
67*3ac0a46fSAndroid Build Coastguard Worker bool bSetting,
68*3ac0a46fSAndroid Build Coastguard Worker XFA_Attribute eAttribute) {}
69*3ac0a46fSAndroid Build Coastguard Worker
isDefined(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)70*3ac0a46fSAndroid Build Coastguard Worker void CJX_DataWindow::isDefined(v8::Isolate* pIsolate,
71*3ac0a46fSAndroid Build Coastguard Worker v8::Local<v8::Value>* pValue,
72*3ac0a46fSAndroid Build Coastguard Worker bool bSetting,
73*3ac0a46fSAndroid Build Coastguard Worker XFA_Attribute eAttribute) {}
74