| Index: xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
|
| diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
|
| index f9027dce185ae656ec81ffce45f83f64402aa1dc..ce08a7951deebd81422bcb9c198f499eee7bbd7b 100644
|
| --- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
|
| +++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
|
| @@ -41,7 +41,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
|
| + Throw(XFA_IDS_INVAlID_PROP_SET);
|
| return;
|
| }
|
| CFX_WideString wsAppType;
|
| @@ -57,7 +57,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
|
| + Throw(XFA_IDS_INVAlID_PROP_SET);
|
| return;
|
| }
|
| CFX_WideString wsAppType;
|
| @@ -107,7 +107,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Language(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_LANGUAGE);
|
| + Throw(XFA_IDS_UNABLE_SET_LANGUAGE);
|
| return;
|
| }
|
| CFX_WideString wsLanguage;
|
| @@ -124,7 +124,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(
|
| }
|
| CXFA_FFDoc* hDoc = pNotify->GetHDOC();
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_NUMPAGES);
|
| + Throw(XFA_IDS_UNABLE_SET_NUMPAGES);
|
| return;
|
| }
|
| int32_t iNumPages = pNotify->GetDocProvider()->CountPages(hDoc);
|
| @@ -139,7 +139,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_PLATFORM);
|
| + Throw(XFA_IDS_UNABLE_SET_PLATFORM);
|
| return;
|
| }
|
| CFX_WideString wsPlatform;
|
| @@ -198,7 +198,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Variation(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VARIATION);
|
| + Throw(XFA_IDS_UNABLE_SET_VARIATION);
|
| return;
|
| }
|
| CFX_WideString wsVariation;
|
| @@ -214,7 +214,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VERSION);
|
| + Throw(XFA_IDS_UNABLE_SET_VERSION);
|
| return;
|
| }
|
| CFX_WideString wsVersion;
|
| @@ -230,7 +230,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VERSION);
|
| + Throw(XFA_IDS_UNABLE_SET_VERSION);
|
| return;
|
| }
|
| CFX_WideString wsVersion;
|
| @@ -246,7 +246,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
|
| + Throw(XFA_IDS_INVAlID_PROP_SET);
|
| return;
|
| }
|
| CFX_WideString wsAppName;
|
| @@ -262,7 +262,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
|
| return;
|
| }
|
| if (bSetting) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
|
| + Throw(XFA_IDS_INVAlID_PROP_SET);
|
| return;
|
| }
|
| CFX_WideString wsFoxitAppName;
|
| @@ -276,7 +276,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength != 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"gotoURL");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"gotoURL");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -298,7 +298,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength != 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"openList");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"openList");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -350,7 +350,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response(
|
| CFXJSE_Arguments* pArguments) {
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 1 || iLength > 4) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -423,7 +423,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
|
| CFXJSE_Arguments* pArguments) {
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 0 || iLength > 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resetData");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resetData");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -475,7 +475,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Beep(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 0 || iLength > 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"beep");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"beep");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -495,7 +495,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength != 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setFocus");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setFocus");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -553,7 +553,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 1 || iLength > 4) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"messageBox");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"messageBox");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -607,7 +607,7 @@ FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
|
| }
|
| std::unique_ptr<CFXJSE_Value> pValueArg(pArguments->GetValue(iArgIndex));
|
| if (!FXJSE_Value_IsUTF8String(pValueArg.get()) && bIsJsType) {
|
| - ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
|
| + Throw(XFA_IDS_ARGUMENT_MISMATCH);
|
| return FALSE;
|
| }
|
| if (FXJSE_Value_IsNull(pValueArg.get())) {
|
| @@ -638,7 +638,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(
|
| }
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength != 8) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"print");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"print");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -704,7 +704,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(
|
| CFXJSE_Arguments* pArguments) {
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 0 || iLength > 1) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"importData");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"importData");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
| @@ -723,7 +723,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(
|
| CFXJSE_Arguments* pArguments) {
|
| int32_t iLength = pArguments->GetLength();
|
| if (iLength < 0 || iLength > 2) {
|
| - ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"exportData");
|
| + Throw(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"exportData");
|
| return;
|
| }
|
| CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
|
|
|