summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-07-18 06:36:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-18 06:36:51 -0700
commitc1df5d4375027aa9d0b88f456f95177c016e8cad (patch)
treea06026f0df134604b4cc8082b15a1875ddcc00a0 /xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
parente8a80664a888526ca4f0d08b4e6b290eb0aa0d76 (diff)
downloadpdfium-c1df5d4375027aa9d0b88f456f95177c016e8cad.tar.xz
Pass element hash and name into CXFA_Object constructor.
Providing the element hash and name in the constructor allows us to remove the calls to XFA_GetElementByID in the get methods. Review-Url: https://codereview.chromium.org/2101403002
Diffstat (limited to 'xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
index 0341fc12de..95b9a3605b 100644
--- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
@@ -20,8 +20,11 @@ CScript_SignaturePseudoModel::CScript_SignaturePseudoModel(
CXFA_Document* pDocument)
: CXFA_Object(pDocument,
XFA_ObjectType::Object,
- XFA_Element::SignaturePseudoModel) {}
+ XFA_Element::SignaturePseudoModel,
+ CFX_WideStringC(L"signaturePseudoModel")) {}
+
CScript_SignaturePseudoModel::~CScript_SignaturePseudoModel() {}
+
void CScript_SignaturePseudoModel::Verify(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
@@ -42,6 +45,7 @@ void CScript_SignaturePseudoModel::Verify(CFXJSE_Arguments* pArguments) {
if (pValue)
pValue->SetInteger(bVerify);
}
+
void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 3 || iLength > 7) {
@@ -73,6 +77,7 @@ void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) {
if (pValue)
pValue->SetBoolean(bSign);
}
+
void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 0) {
@@ -90,6 +95,7 @@ void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) {
pArguments->GetReturnValue()->Assign(
m_pDocument->GetScriptContext()->GetJSValueFromMap(pList));
}
+
void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {