Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cjx_source.cpp
Go to the documentation of this file.
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_source.h"
8
9
#
include
"core/fxcrt/span.h"
10
#
include
"fxjs/js_resources.h"
11
#
include
"fxjs/xfa/cfxjse_value.h"
12
#
include
"xfa/fxfa/parser/cxfa_source.h"
13
14
const
CJX_MethodSpec
CJX_Source::MethodSpecs[] = {
15
{
"addNew"
, addNew_static},
16
{
"cancel"
, cancel_static},
17
{
"cancelBatch"
, cancelBatch_static},
18
{
"close"
, close_static},
19
{
"delete"
, deleteItem_static},
20
{
"first"
, first_static},
21
{
"hasDataChanged"
, hasDataChanged_static},
22
{
"isBOF"
, isBOF_static},
23
{
"isEOF"
, isEOF_static},
24
{
"last"
, last_static},
25
{
"next"
, next_static},
26
{
"open"
, open_static},
27
{
"previous"
, previous_static},
28
{
"requery"
, requery_static},
29
{
"resync"
, resync_static},
30
{
"update"
, update_static},
31
{
"updateBatch"
, updateBatch_static}};
32
33
CJX_Source::CJX_Source(CXFA_Source* src) :
CJX_Node
(src) {
34
DefineMethods(MethodSpecs);
35
}
36
37
CJX_Source::~
CJX_Source
() =
default
;
38
39
bool
CJX_Source::
DynamicTypeIs
(
TypeTag
eType)
const
{
40
return
eType == static_type__ || ParentType__
::
DynamicTypeIs
(eType);
41
}
42
43
CJS_Result
CJX_Source::next(
CFXJSE_Engine
* runtime,
44
pdfium::span<v8::Local<v8::Value>> params) {
45
if
(!params.empty())
46
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
47
48
return
CJS_Result
::
Success
(
)
;
49
}
50
51
CJS_Result
CJX_Source::cancelBatch(
CFXJSE_Engine
* runtime,
52
pdfium::span<v8::Local<v8::Value>> params) {
53
if
(!params.empty())
54
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
55
56
return
CJS_Result
::
Success
(
)
;
57
}
58
59
CJS_Result
CJX_Source::first(
CFXJSE_Engine
* runtime,
60
pdfium::span<v8::Local<v8::Value>> params) {
61
if
(!params.empty())
62
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
63
64
return
CJS_Result
::
Success
(
)
;
65
}
66
67
CJS_Result
CJX_Source::updateBatch(
CFXJSE_Engine
* runtime,
68
pdfium::span<v8::Local<v8::Value>> params) {
69
if
(!params.empty())
70
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
71
72
return
CJS_Result
::
Success
(
)
;
73
}
74
75
CJS_Result
CJX_Source::previous(
CFXJSE_Engine
* runtime,
76
pdfium::span<v8::Local<v8::Value>> params) {
77
if
(!params.empty())
78
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
79
80
return
CJS_Result
::
Success
(
)
;
81
}
82
83
CJS_Result
CJX_Source::isBOF(
CFXJSE_Engine
* runtime,
84
pdfium::span<v8::Local<v8::Value>> params) {
85
if
(!params.empty())
86
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
87
88
return
CJS_Result
::
Success
(
)
;
89
}
90
91
CJS_Result
CJX_Source::isEOF(
CFXJSE_Engine
* runtime,
92
pdfium::span<v8::Local<v8::Value>> params) {
93
if
(!params.empty())
94
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
95
96
return
CJS_Result
::
Success
(
)
;
97
}
98
99
CJS_Result
CJX_Source::cancel(
CFXJSE_Engine
* runtime,
100
pdfium::span<v8::Local<v8::Value>> params) {
101
if
(!params.empty())
102
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
103
104
return
CJS_Result
::
Success
(
)
;
105
}
106
107
CJS_Result
CJX_Source::update(
CFXJSE_Engine
* runtime,
108
pdfium::span<v8::Local<v8::Value>> params) {
109
if
(!params.empty())
110
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
111
112
return
CJS_Result
::
Success
(
)
;
113
}
114
115
CJS_Result
CJX_Source::open(
CFXJSE_Engine
* runtime,
116
pdfium::span<v8::Local<v8::Value>> params) {
117
if
(!params.empty())
118
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
119
120
return
CJS_Result
::
Success
(
)
;
121
}
122
123
CJS_Result
CJX_Source::deleteItem(
CFXJSE_Engine
* runtime,
124
pdfium::span<v8::Local<v8::Value>> params) {
125
if
(!params.empty())
126
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
127
128
return
CJS_Result
::
Success
(
)
;
129
}
130
131
CJS_Result
CJX_Source::addNew(
CFXJSE_Engine
* runtime,
132
pdfium::span<v8::Local<v8::Value>> params) {
133
if
(!params.empty())
134
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
135
136
return
CJS_Result
::
Success
(
)
;
137
}
138
139
CJS_Result
CJX_Source::requery(
CFXJSE_Engine
* runtime,
140
pdfium::span<v8::Local<v8::Value>> params) {
141
if
(!params.empty())
142
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
143
144
return
CJS_Result
::
Success
(
)
;
145
}
146
147
CJS_Result
CJX_Source::resync(
CFXJSE_Engine
* runtime,
148
pdfium::span<v8::Local<v8::Value>> params) {
149
if
(!params.empty())
150
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
151
152
return
CJS_Result
::
Success
(
)
;
153
}
154
155
CJS_Result
CJX_Source::close(
CFXJSE_Engine
* runtime,
156
pdfium::span<v8::Local<v8::Value>> params) {
157
if
(!params.empty())
158
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
159
160
return
CJS_Result
::
Success
(
)
;
161
}
162
163
CJS_Result
CJX_Source::last(
CFXJSE_Engine
* runtime,
164
pdfium::span<v8::Local<v8::Value>> params) {
165
if
(!params.empty())
166
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
167
168
return
CJS_Result
::
Success
(
)
;
169
}
170
171
CJS_Result
CJX_Source::hasDataChanged(
172
CFXJSE_Engine
* runtime,
173
pdfium::span<v8::Local<v8::Value>> params) {
174
if
(!params.empty())
175
return
CJS_Result
::
Failure
(
JSMessage
::
kParamError
)
;
176
177
return
CJS_Result
::
Success
(
)
;
178
}
179
180
void
CJX_Source::db(
v8
::Isolate* pIsolate,
181
v8::Local<v8::Value>* pValue,
182
bool
bSetting,
183
XFA_Attribute
eAttribute) {}
CFXJSE_Engine::EventParamScope
friend class EventParamScope
Definition
cfxjse_engine.h:127
CJS_Result
Definition
cjs_result.h:15
CJS_Result::Success
static CJS_Result Success()
Definition
cjs_result.h:28
CJS_Result::Failure
static CJS_Result Failure(JSMessage id)
Definition
cjs_result.h:35
CJX_Node
Definition
cjx_node.h:17
CJX_Node::DynamicTypeIs
bool DynamicTypeIs(TypeTag eType) const override
Definition
cjx_node.cpp:112
CJX_Object::TypeTag
TypeTag
Definition
cjx_object.h:49
CJX_Source::~CJX_Source
~CJX_Source() override
CJX_Source::DynamicTypeIs
bool DynamicTypeIs(TypeTag eType) const override
Definition
cjx_source.cpp:39
XFA_Attribute
XFA_Attribute
Definition
fxfa_basic.h:67
JSMessage
JSMessage
Definition
js_resources.h:12
JSMessage::kParamError
@ kParamError
Definition
js_resources.h:14
v8
Definition
fxv8_unittest.h:15
CJX_MethodSpec
Definition
cjx_object.h:40
qtwebengine
src
3rdparty
chromium
third_party
pdfium
fxjs
xfa
cjx_source.cpp
Generated on
for Qt by
1.18.0