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