• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <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 
25 CJX_DataWindow::~CJX_DataWindow() = default;
26 
DynamicTypeIs(TypeTag eType) const27 bool CJX_DataWindow::DynamicTypeIs(TypeTag eType) const {
28   return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
29 }
30 
moveCurrentRecord(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)31 CJS_Result CJX_DataWindow::moveCurrentRecord(
32     CFXJSE_Engine* runtime,
33     const std::vector<v8::Local<v8::Value>>& params) {
34   return CJS_Result::Success();
35 }
36 
record(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)37 CJS_Result CJX_DataWindow::record(
38     CFXJSE_Engine* runtime,
39     const std::vector<v8::Local<v8::Value>>& params) {
40   return CJS_Result::Success();
41 }
42 
gotoRecord(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)43 CJS_Result CJX_DataWindow::gotoRecord(
44     CFXJSE_Engine* runtime,
45     const std::vector<v8::Local<v8::Value>>& params) {
46   return CJS_Result::Success();
47 }
48 
isRecordGroup(CFXJSE_Engine * runtime,const std::vector<v8::Local<v8::Value>> & params)49 CJS_Result CJX_DataWindow::isRecordGroup(
50     CFXJSE_Engine* runtime,
51     const std::vector<v8::Local<v8::Value>>& params) {
52   return CJS_Result::Success();
53 }
54 
recordsBefore(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)55 void CJX_DataWindow::recordsBefore(v8::Isolate* pIsolate,
56                                    v8::Local<v8::Value>* pValue,
57                                    bool bSetting,
58                                    XFA_Attribute eAttribute) {}
59 
currentRecordNumber(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)60 void CJX_DataWindow::currentRecordNumber(v8::Isolate* pIsolate,
61                                          v8::Local<v8::Value>* pValue,
62                                          bool bSetting,
63                                          XFA_Attribute eAttribute) {}
64 
recordsAfter(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)65 void CJX_DataWindow::recordsAfter(v8::Isolate* pIsolate,
66                                   v8::Local<v8::Value>* pValue,
67                                   bool bSetting,
68                                   XFA_Attribute eAttribute) {}
69 
isDefined(v8::Isolate * pIsolate,v8::Local<v8::Value> * pValue,bool bSetting,XFA_Attribute eAttribute)70 void CJX_DataWindow::isDefined(v8::Isolate* pIsolate,
71                                v8::Local<v8::Value>* pValue,
72                                bool bSetting,
73                                XFA_Attribute eAttribute) {}
74