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/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, FX_ArraySize(MethodSpecs));
23 }
24
~CJX_DataWindow()25 CJX_DataWindow::~CJX_DataWindow() {}
26
moveCurrentRecord(CJS_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)27 CJS_Return CJX_DataWindow::moveCurrentRecord(
28 CJS_V8* runtime,
29 const std::vector<v8::Local<v8::Value>>& params) {
30 return CJS_Return(true);
31 }
32
record(CJS_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)33 CJS_Return CJX_DataWindow::record(
34 CJS_V8* runtime,
35 const std::vector<v8::Local<v8::Value>>& params) {
36 return CJS_Return(true);
37 }
38
gotoRecord(CJS_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)39 CJS_Return CJX_DataWindow::gotoRecord(
40 CJS_V8* runtime,
41 const std::vector<v8::Local<v8::Value>>& params) {
42 return CJS_Return(true);
43 }
44
isRecordGroup(CJS_V8 * runtime,const std::vector<v8::Local<v8::Value>> & params)45 CJS_Return CJX_DataWindow::isRecordGroup(
46 CJS_V8* runtime,
47 const std::vector<v8::Local<v8::Value>>& params) {
48 return CJS_Return(true);
49 }
50
recordsBefore(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)51 void CJX_DataWindow::recordsBefore(CFXJSE_Value* pValue,
52 bool bSetting,
53 XFA_Attribute eAttribute) {}
54
currentRecordNumber(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)55 void CJX_DataWindow::currentRecordNumber(CFXJSE_Value* pValue,
56 bool bSetting,
57 XFA_Attribute eAttribute) {}
58
recordsAfter(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)59 void CJX_DataWindow::recordsAfter(CFXJSE_Value* pValue,
60 bool bSetting,
61 XFA_Attribute eAttribute) {}
62
isDefined(CFXJSE_Value * pValue,bool bSetting,XFA_Attribute eAttribute)63 void CJX_DataWindow::isDefined(CFXJSE_Value* pValue,
64 bool bSetting,
65 XFA_Attribute eAttribute) {}
66