Remove more ScriptAttributeString() wrappers, part 3
Change-Id: I70dbd6dc3636e395fb9e1c473ae496a805e819d7
Reviewed-on: https://pdfium-review.googlesource.com/c/46570
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cjx_encrypt.cpp b/fxjs/xfa/cjx_encrypt.cpp
index 566a54b..fc0ed4c 100644
--- a/fxjs/xfa/cjx_encrypt.cpp
+++ b/fxjs/xfa/cjx_encrypt.cpp
@@ -12,18 +12,6 @@
CJX_Encrypt::~CJX_Encrypt() = default;
-void CJX_Encrypt::use(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_Encrypt::format(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {}
-
-void CJX_Encrypt::usehref(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
diff --git a/fxjs/xfa/cjx_encrypt.h b/fxjs/xfa/cjx_encrypt.h
index 7bb31f7..fe9b619 100644
--- a/fxjs/xfa/cjx_encrypt.h
+++ b/fxjs/xfa/cjx_encrypt.h
@@ -18,8 +18,6 @@
~CJX_Encrypt() override;
JSE_PROP(format);
- JSE_PROP(use);
- JSE_PROP(usehref);
};
#endif // FXJS_XFA_CJX_ENCRYPT_H_
diff --git a/fxjs/xfa/cjx_event.cpp b/fxjs/xfa/cjx_event.cpp
index 9ac493e..f5505d6 100644
--- a/fxjs/xfa/cjx_event.cpp
+++ b/fxjs/xfa/cjx_event.cpp
@@ -11,27 +11,3 @@
CJX_Event::CJX_Event(CXFA_Event* node) : CJX_Node(node) {}
CJX_Event::~CJX_Event() = default;
-
-void CJX_Event::ref(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_Event::use(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_Event::usehref(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_Event::activity(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
diff --git a/fxjs/xfa/cjx_event.h b/fxjs/xfa/cjx_event.h
index 64cd84b..9fabe22 100644
--- a/fxjs/xfa/cjx_event.h
+++ b/fxjs/xfa/cjx_event.h
@@ -16,11 +16,6 @@
public:
explicit CJX_Event(CXFA_Event* node);
~CJX_Event() override;
-
- JSE_PROP(activity);
- JSE_PROP(ref);
- JSE_PROP(use);
- JSE_PROP(usehref);
};
#endif // FXJS_XFA_CJX_EVENT_H_
diff --git a/fxjs/xfa/cjx_exclgroup.cpp b/fxjs/xfa/cjx_exclgroup.cpp
index a97b076..b6d01c2 100644
--- a/fxjs/xfa/cjx_exclgroup.cpp
+++ b/fxjs/xfa/cjx_exclgroup.cpp
@@ -143,24 +143,6 @@
bool bSetting,
XFA_Attribute eAttribute) {}
-void CJX_ExclGroup::access(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::accessKey(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::anchorType(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_ExclGroup::borderColor(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
@@ -173,36 +155,12 @@
ScriptSomBorderWidth(pValue, bSetting, eAttribute);
}
-void CJX_ExclGroup::colSpan(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_ExclGroup::fillColor(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
ScriptSomFillColor(pValue, bSetting, eAttribute);
}
-void CJX_ExclGroup::h(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::hAlign(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::layout(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_ExclGroup::mandatory(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
@@ -215,80 +173,8 @@
ScriptSomMandatoryMessage(pValue, bSetting, eAttribute);
}
-void CJX_ExclGroup::maxH(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::maxW(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::minH(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::minW(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::presence(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::relevant(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::use(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::usehref(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_ExclGroup::validationMessage(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
ScriptSomValidationMessage(pValue, bSetting, eAttribute);
}
-
-void CJX_ExclGroup::vAlign(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::w(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::x(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExclGroup::y(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
diff --git a/fxjs/xfa/cjx_exclgroup.h b/fxjs/xfa/cjx_exclgroup.h
index 2387079..60e56bc 100644
--- a/fxjs/xfa/cjx_exclgroup.h
+++ b/fxjs/xfa/cjx_exclgroup.h
@@ -24,33 +24,14 @@
JSE_METHOD(selectedMember, CJX_ExclGroup);
JSE_PROP(defaultValue); /* {default} */
- JSE_PROP(access);
- JSE_PROP(accessKey);
- JSE_PROP(anchorType);
JSE_PROP(borderColor);
JSE_PROP(borderWidth);
- JSE_PROP(colSpan);
JSE_PROP(fillColor);
- JSE_PROP(h);
- JSE_PROP(hAlign);
- JSE_PROP(layout);
JSE_PROP(mandatory);
JSE_PROP(mandatoryMessage);
- JSE_PROP(maxH);
- JSE_PROP(maxW);
- JSE_PROP(minH);
- JSE_PROP(minW);
- JSE_PROP(presence);
JSE_PROP(rawValue);
- JSE_PROP(relevant);
JSE_PROP(transient);
- JSE_PROP(use);
- JSE_PROP(usehref);
JSE_PROP(validationMessage);
- JSE_PROP(vAlign);
- JSE_PROP(w);
- JSE_PROP(x);
- JSE_PROP(y);
private:
static const CJX_MethodSpec MethodSpecs[];
diff --git a/fxjs/xfa/cjx_exdata.cpp b/fxjs/xfa/cjx_exdata.cpp
index 66085a2..6ea3877 100644
--- a/fxjs/xfa/cjx_exdata.cpp
+++ b/fxjs/xfa/cjx_exdata.cpp
@@ -12,44 +12,8 @@
CJX_ExData::~CJX_ExData() = default;
-void CJX_ExData::use(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExData::contentType(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExData::transferEncoding(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
void CJX_ExData::defaultValue(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
ScriptSomDefaultValue(pValue, bSetting, eAttribute);
}
-
-void CJX_ExData::usehref(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExData::maxLength(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
-
-void CJX_ExData::href(CFXJSE_Value* pValue,
- bool bSetting,
- XFA_Attribute eAttribute) {
- ScriptAttributeString(pValue, bSetting, eAttribute);
-}
diff --git a/fxjs/xfa/cjx_exdata.h b/fxjs/xfa/cjx_exdata.h
index b25ef07..e61cb47 100644
--- a/fxjs/xfa/cjx_exdata.h
+++ b/fxjs/xfa/cjx_exdata.h
@@ -18,12 +18,6 @@
~CJX_ExData() override;
JSE_PROP(defaultValue); /* {default} */
- JSE_PROP(contentType);
- JSE_PROP(href);
- JSE_PROP(maxLength);
- JSE_PROP(transferEncoding);
- JSE_PROP(use);
- JSE_PROP(usehref);
};
#endif // FXJS_XFA_CJX_EXDATA_H_
diff --git a/xfa/fxfa/parser/xfa_basic_data_element_script.cpp b/xfa/fxfa/parser/xfa_basic_data_element_script.cpp
index a461788..b3d51d6 100644
--- a/xfa/fxfa/parser/xfa_basic_data_element_script.cpp
+++ b/xfa/fxfa/parser/xfa_basic_data_element_script.cpp
@@ -1455,22 +1455,22 @@
/* event */
{ATTR(0xbb8df5d,
"ref",
- &CJX_Event::ref,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Ref,
XFA_ScriptType::Basic)},
{ATTR(0xc0811ed,
"use",
- &CJX_Event::use,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Use,
XFA_ScriptType::Basic)},
{ATTR(0xbc254332,
"usehref",
- &CJX_Event::usehref,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Usehref,
XFA_ScriptType::Basic)},
{ATTR(0xd6128d8d,
"activity",
- &CJX_Event::activity,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Activity,
XFA_ScriptType::Basic)},
@@ -2662,32 +2662,32 @@
/* exclGroup */
{ATTR(0x68,
"h",
- &CJX_ExclGroup::h,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::H,
XFA_ScriptType::Basic)},
{ATTR(0x77,
"w",
- &CJX_ExclGroup::w,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::W,
XFA_ScriptType::Basic)},
{ATTR(0x78,
"x",
- &CJX_ExclGroup::x,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::X,
XFA_ScriptType::Basic)},
{ATTR(0x79,
"y",
- &CJX_ExclGroup::y,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Y,
XFA_ScriptType::Basic)},
{ATTR(0x2282c73,
"hAlign",
- &CJX_ExclGroup::hAlign,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::HAlign,
XFA_ScriptType::Basic)},
{ATTR(0xc0811ed,
"use",
- &CJX_ExclGroup::use,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Use,
XFA_ScriptType::Basic)},
{ATTR(0xf23332f,
@@ -2702,7 +2702,7 @@
XFA_ScriptType::Object)},
{ATTR(0x25839852,
"access",
- &CJX_ExclGroup::access,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Access,
XFA_ScriptType::Basic)},
{ATTR(0x3b1ddd06,
@@ -2712,7 +2712,7 @@
XFA_ScriptType::Basic)},
{ATTR(0x570ce835,
"presence",
- &CJX_ExclGroup::presence,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Presence,
XFA_ScriptType::Basic)},
{ATTR(0x5a3b375d,
@@ -2727,32 +2727,32 @@
XFA_ScriptType::Basic)},
{ATTR(0x7a7cc341,
"vAlign",
- &CJX_ExclGroup::vAlign,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::VAlign,
XFA_ScriptType::Basic)},
{ATTR(0x7c2ff6ae,
"maxH",
- &CJX_ExclGroup::maxH,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::MaxH,
XFA_ScriptType::Basic)},
{ATTR(0x7c2ff6bd,
"maxW",
- &CJX_ExclGroup::maxW,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::MaxW,
XFA_ScriptType::Basic)},
{ATTR(0x7d02356c,
"minH",
- &CJX_ExclGroup::minH,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::MinH,
XFA_ScriptType::Basic)},
{ATTR(0x7d02357b,
"minW",
- &CJX_ExclGroup::minW,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::MinW,
XFA_ScriptType::Basic)},
{ATTR(0x7e7e845e,
"layout",
- &CJX_ExclGroup::layout,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Layout,
XFA_ScriptType::Basic)},
{ATTR(0x846599f8,
@@ -2767,7 +2767,7 @@
XFA_ScriptType::Basic)},
{ATTR(0x8e1c2921,
"relevant",
- &CJX_ExclGroup::relevant,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Relevant,
XFA_ScriptType::Basic)},
{ATTR(0xa03cf627,
@@ -2782,22 +2782,22 @@
XFA_ScriptType::Basic)},
{ATTR(0xac06e2b0,
"colSpan",
- &CJX_ExclGroup::colSpan,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::ColSpan,
XFA_ScriptType::Basic)},
{ATTR(0xbc254332,
"usehref",
- &CJX_ExclGroup::usehref,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Usehref,
XFA_ScriptType::Basic)},
{ATTR(0xc2bd40fd,
"anchorType",
- &CJX_ExclGroup::anchorType,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::AnchorType,
XFA_ScriptType::Basic)},
{ATTR(0xc4fed09b,
"accessKey",
- &CJX_ExclGroup::accessKey,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::AccessKey,
XFA_ScriptType::Basic)},
{ATTR(0xcabfa3d0,
@@ -4432,17 +4432,17 @@
/* exData */
{ATTR(0xc0811ed,
"use",
- &CJX_ExData::use,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Use,
XFA_ScriptType::Basic)},
{ATTR(0x42fed1fd,
"contentType",
- &CJX_ExData::contentType,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::ContentType,
XFA_ScriptType::Basic)},
{ATTR(0x54fa722c,
"transferEncoding",
- &CJX_ExData::transferEncoding,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::TransferEncoding,
XFA_ScriptType::Basic)},
{ATTR(0xa52682bd,
@@ -4452,12 +4452,12 @@
XFA_ScriptType::Basic)},
{ATTR(0xbc254332,
"usehref",
- &CJX_ExData::usehref,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Usehref,
XFA_ScriptType::Basic)},
{ATTR(0xc4547a08,
"maxLength",
- &CJX_ExData::maxLength,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::MaxLength,
XFA_ScriptType::Basic)},
{ATTR(0xd6e27f1d,
@@ -4467,7 +4467,7 @@
XFA_ScriptType::Basic)},
{ATTR(0xdb55fec5,
"href",
- &CJX_ExData::href,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Href,
XFA_ScriptType::Basic)},
@@ -5094,7 +5094,7 @@
/* encrypt */
{ATTR(0xc0811ed,
"use",
- &CJX_Encrypt::use,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Use,
XFA_ScriptType::Basic)},
{ATTR(0x28dee6e9,
@@ -5104,7 +5104,7 @@
XFA_ScriptType::Basic)},
{ATTR(0xbc254332,
"usehref",
- &CJX_Encrypt::usehref,
+ &CJX_Object::ScriptAttributeString,
XFA_Attribute::Usehref,
XFA_ScriptType::Basic)},
{ATTR(0xbe52dfbf,