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_datawindow.h"
8
9 #include <vector>
10
11 #include "fxjs/xfa/cfxjse_value.h"
12 #include "xfa/fxfa/parser/cscript_datawindow.h"
13
14 const CJX_MethodSpec CJX_DataWindow::MethodSpecs[] = {
15 {"gotoRecord", gotoRecord_static},
16 {"isRecordGroup", isRecordGroup_static},
17 {"moveCurrentRecord", moveCurrentRecord_static},
18 {"record", record_static}};
19
CJX_DataWindow(CScript_DataWindow * window)20 CJX_DataWindow::CJX_DataWindow(CScript_DataWindow* window)
21 : CJX_Object(window) {
22 DefineMethods(MethodSpecs);
23 }
24
~CJX_DataWindow()25 CJX_DataWindow::~CJX_DataWindow() {}
26
DynamicTypeIs(TypeTag eType) const27 bool CJX_DataWindow::DynamicTypeIs(TypeTag eType) const {
28 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
29 }
30
moveCurrentRecord(CFX_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)31 CJS_Result CJX_DataWindow::moveCurrentRecord(
32 CFX_V8* runtime,
33 const std::vector<v8::Local<v8::Value>>& params) {
34 return CJS_Result::Success();
35 }
36
record(CFX_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)37 CJS_Result CJX_DataWindow::record(
38 CFX_V8* runtime,
39 const std::vector<v8::Local<v8::Value>>& params) {
40 return CJS_Result::Success();
41 }
42
gotoRecord(CFX_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)43 CJS_Result CJX_DataWindow::gotoRecord(
44 CFX_V8* runtime,
45 const std::vector<v8::Local<v8::Value>>& params) {
46 return CJS_Result::Success();
47 }
48
isRecordGroup(CFX_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)49 CJS_Result CJX_DataWindow::isRecordGroup(
50 CFX_V8* runtime,
51 const std::vector<v8::Local<v8::Value>>& params) {
52 return CJS_Result::Success();
53 }
54
recordsBefore(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)55 void CJX_DataWindow::recordsBefore(CFXJSE_Value* pValue,
56 bool bSetting,
57 XFA_Attribute eAttribute) {}
58
currentRecordNumber(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)59 void CJX_DataWindow::currentRecordNumber(CFXJSE_Value* pValue,
60 bool bSetting,
61 XFA_Attribute eAttribute) {}
62
recordsAfter(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)63 void CJX_DataWindow::recordsAfter(CFXJSE_Value* pValue,
64 bool bSetting,
65 XFA_Attribute eAttribute) {}
66
isDefined(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)67 void CJX_DataWindow::isDefined(CFXJSE_Value* pValue,
68 bool bSetting,
69 XFA_Attribute eAttribute) {}
70