OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fxfa/parser/cscript_signaturepseudomodel.h" | 7 #include "xfa/fxfa/parser/cscript_signaturepseudomodel.h" |
8 | 8 |
9 #include "fxjs/cfxjse_arguments.h" | 9 #include "fxjs/cfxjse_arguments.h" |
10 #include "xfa/fxfa/app/xfa_ffnotify.h" | 10 #include "xfa/fxfa/app/xfa_ffnotify.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) { | 38 void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) { |
39 int32_t iLength = pArguments->GetLength(); | 39 int32_t iLength = pArguments->GetLength(); |
40 if (iLength < 3 || iLength > 7) { | 40 if (iLength < 3 || iLength > 7) { |
41 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign"); | 41 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign"); |
42 return; | 42 return; |
43 } | 43 } |
44 | 44 |
45 CFXJSE_Value* pValue = pArguments->GetReturnValue(); | 45 CFXJSE_Value* pValue = pArguments->GetReturnValue(); |
46 if (pValue) | 46 if (pValue) |
47 pValue->SetBoolean(FALSE); | 47 pValue->SetBoolean(false); |
48 } | 48 } |
49 | 49 |
50 void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) { | 50 void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) { |
51 if (pArguments->GetLength() != 0) { | 51 if (pArguments->GetLength() != 0) { |
52 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate"); | 52 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate"); |
53 return; | 53 return; |
54 } | 54 } |
55 return; | 55 return; |
56 } | 56 } |
57 | 57 |
58 void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) { | 58 void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) { |
59 int32_t iLength = pArguments->GetLength(); | 59 int32_t iLength = pArguments->GetLength(); |
60 if (iLength < 1 || iLength > 2) { | 60 if (iLength < 1 || iLength > 2) { |
61 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear"); | 61 ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear"); |
62 return; | 62 return; |
63 } | 63 } |
64 | 64 |
65 CFXJSE_Value* pValue = pArguments->GetReturnValue(); | 65 CFXJSE_Value* pValue = pArguments->GetReturnValue(); |
66 if (pValue) | 66 if (pValue) |
67 pValue->SetBoolean(FALSE); | 67 pValue->SetBoolean(false); |
68 } | 68 } |
OLD | NEW |