7#include "fxjs/xfa/cjx_boolean.h"
10#include "fxjs/xfa/cfxjse_value.h"
11#include "v8/include/v8-primitive.h"
12#include "xfa/fxfa/parser/cxfa_boolean.h"
14CJX_Boolean::CJX_Boolean(CXFA_Boolean* node) :
CJX_Object(node) {}
22void CJX_Boolean::defaultValue(
v8::Isolate* pIsolate,
23 v8::Local<v8::Value>* pValue,
28 fxv8::NewBooleanHelper(pIsolate,
GetContent(
true).EqualsASCII(
"1"));
34 newValue = fxv8::ReentrantToByteStringHelper(pIsolate, *pValue);
37 WideString wsNewValue
(iValue == 0 ? L"0" : L"1"
);
38 WideString wsFormatValue
(wsNewValue
);
43 SetContent(wsNewValue, wsFormatValue,
true,
true,
true);
46void CJX_Boolean::value(
v8::Isolate* pIsolate,
47 v8::Local<v8::Value>* pValue,
50 defaultValue(pIsolate, pValue, bSetting, eAttribute);
bool DynamicTypeIs(TypeTag eType) const override
WideString GetContent(bool bScriptModify) const
virtual bool DynamicTypeIs(TypeTag eType) const
CXFA_Node * GetXFANode() const
void SetContent(const WideString &wsContent, const WideString &wsXMLValue, bool bNotify, bool bScriptModify, bool bSyncData)
WideString GetFormatDataValue(const WideString &wsValue)
const char * c_str() const
WideString & operator=(WideString &&that) noexcept
WideString(const WideString &other)
WideString(const wchar_t *ptr)
int32_t FXSYS_atoi(const char *str)
bool IsUndefined(v8::Local< v8::Value > value)
bool IsNull(v8::Local< v8::Value > value)