Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjx_occur.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_occur.h"
8
9#include "fxjs/fxv8.h"
10#include "fxjs/xfa/cfxjse_value.h"
11#include "v8/include/v8-primitive.h"
12#include "xfa/fxfa/parser/cxfa_occur.h"
13
14CJX_Occur::CJX_Occur(CXFA_Occur* node) : CJX_Node(node) {}
15
16CJX_Occur::~CJX_Occur() = default;
17
18bool CJX_Occur::DynamicTypeIs(TypeTag eType) const {
19 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
20}
21
22void CJX_Occur::max(v8::Isolate* pIsolate,
23 v8::Local<v8::Value>* pValue,
24 bool bSetting,
25 XFA_Attribute eAttribute) {
26 CXFA_Occur* occur = static_cast<CXFA_Occur*>(GetXFANode());
27 if (!bSetting) {
28 *pValue = fxv8::NewNumberHelper(pIsolate, occur->GetMax());
29 return;
30 }
31 occur->SetMax(fxv8::ReentrantToInt32Helper(pIsolate, *pValue));
32}
33
34// NOLINTNEXTLINE(build/include_what_you_use)
35void CJX_Occur::min(v8::Isolate* pIsolate,
36 v8::Local<v8::Value>* pValue,
37 bool bSetting,
38 XFA_Attribute eAttribute) {
39 CXFA_Occur* occur = static_cast<CXFA_Occur*>(GetXFANode());
40 if (!bSetting) {
41 *pValue = fxv8::NewNumberHelper(pIsolate, occur->GetMin());
42 return;
43 }
44 occur->SetMin(fxv8::ReentrantToInt32Helper(pIsolate, *pValue));
45}
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_node.cpp:112
CXFA_Node * GetXFANode() const
~CJX_Occur() override
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_occur.cpp:18
void SetMax(int32_t iMax)
int32_t GetMax()
void SetMin(int32_t iMin)
int32_t GetMin()
XFA_Attribute
Definition fxfa_basic.h:67