Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: xfa/fxfa/parser/cscript_signaturepseudomodel.cpp

Issue 2323523002: Remove unused code in CPDFXFA_Document (Closed)
Patch Set: Review feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/cscript_layoutpseudomodel.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
diff --git a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
index 071ae3990083a67992544141160adc8e4a2ca0aa..83e84b6d79769c90eae99cd2ce83f9827f01682b 100644
--- a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
@@ -29,19 +29,10 @@ void CScript_SignaturePseudoModel::Verify(CFXJSE_Arguments* pArguments) {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"verify");
return;
}
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- CXFA_FFDoc* hDoc = pNotify->GetHDOC();
- CXFA_Node* pNode = nullptr;
- if (iLength >= 1) {
- pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
- }
- int32_t bVerify = pNotify->GetDocProvider()->Verify(hDoc, pNode);
+
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
- pValue->SetInteger(bVerify);
+ pValue->SetInteger(0);
}
void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) {
@@ -50,48 +41,18 @@ void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign");
return;
}
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- CXFA_FFDoc* hDoc = pNotify->GetHDOC();
- CXFA_NodeList* pNodeList = nullptr;
- CFX_WideString wsExpression;
- CFX_WideString wsXMLIdent;
- if (iLength >= 1) {
- pNodeList = (CXFA_NodeList*)pArguments->GetObject(0);
- }
- if (iLength >= 2) {
- CFX_ByteString bsExpression = pArguments->GetUTF8String(1);
- wsExpression = CFX_WideString::FromUTF8(bsExpression.AsStringC());
- }
- if (iLength >= 3) {
- CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2);
- wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent.AsStringC());
- }
- FX_BOOL bSign = pNotify->GetDocProvider()->Sign(
- hDoc, pNodeList, wsExpression.AsStringC(), wsXMLIdent.AsStringC());
+
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
- pValue->SetBoolean(bSign);
+ pValue->SetBoolean(FALSE);
}
void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) {
- int32_t iLength = pArguments->GetLength();
- if (iLength != 0) {
+ if (pArguments->GetLength() != 0) {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
return;
}
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- CXFA_FFDoc* hDoc = pNotify->GetHDOC();
- CXFA_NodeList* pList = pNotify->GetDocProvider()->Enumerate(hDoc);
- if (!pList)
- return;
- pArguments->GetReturnValue()->Assign(
- m_pDocument->GetScriptContext()->GetJSValueFromMap(pList));
+ return;
}
void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) {
@@ -100,21 +61,8 @@ void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear");
return;
}
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- CXFA_FFDoc* hDoc = pNotify->GetHDOC();
- CXFA_Node* pNode = nullptr;
- FX_BOOL bClear = TRUE;
- if (iLength >= 1) {
- pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
- }
- if (iLength >= 2) {
- bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
- }
- FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear);
+
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
- pValue->SetBoolean(bFlag);
+ pValue->SetBoolean(FALSE);
}
« no previous file with comments | « xfa/fxfa/parser/cscript_layoutpseudomodel.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698