diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-13 07:43:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-13 07:43:20 -0700 |
commit | f51e4dc24b3784a3af09278f2d38cf0ba1c4c8cd (patch) | |
tree | 8ba2252f463711a6a5d9c71e997683bc586006e7 /xfa/fxfa/parser/cscript_hostpseudomodel.cpp | |
parent | f2b940ce281ac5b690bf661fb686fcb5eed34d02 (diff) | |
download | pdfium-f51e4dc24b3784a3af09278f2d38cf0ba1c4c8cd.tar.xz |
Cleanup CPDFXFA_App methods
This CL removes methods which are never called, or are only called once
and return a static value. Those values are inlined at the calling site.
Review-Url: https://codereview.chromium.org/2418633002
Diffstat (limited to 'xfa/fxfa/parser/cscript_hostpseudomodel.cpp')
-rw-r--r-- | xfa/fxfa/parser/cscript_hostpseudomodel.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp index 1525b0629b..89230c34e9 100644 --- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp @@ -44,16 +44,13 @@ void CScript_HostPseudoModel::AppType(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute) { CXFA_FFNotify* pNotify = m_pDocument->GetNotify(); - if (!pNotify) { + if (!pNotify) return; - } if (bSetting) { ThrowException(XFA_IDS_INVAlID_PROP_SET); return; } - CFX_WideString wsAppType; - pNotify->GetAppProvider()->GetAppType(wsAppType); - pValue->SetString(FX_UTF8Encode(wsAppType).AsStringC()); + pValue->SetString("Exchange"); } void CScript_HostPseudoModel::CalculationsEnabled(CFXJSE_Value* pValue, @@ -169,23 +166,21 @@ void CScript_HostPseudoModel::ValidationsEnabled(CFXJSE_Value* pValue, FX_BOOL bEnabled = pNotify->GetDocEnvironment()->IsValidationsEnabled(hDoc); pValue->SetBoolean(bEnabled); } + void CScript_HostPseudoModel::Variation(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute) { - if (!m_pDocument->GetScriptContext()->IsRunAtClient()) { + if (!m_pDocument->GetScriptContext()->IsRunAtClient()) return; - } + CXFA_FFNotify* pNotify = m_pDocument->GetNotify(); - if (!pNotify) { + if (!pNotify) return; - } if (bSetting) { ThrowException(XFA_IDS_UNABLE_SET_VARIATION); return; } - CFX_WideString wsVariation; - pNotify->GetAppProvider()->GetVariation(wsVariation); - pValue->SetString(FX_UTF8Encode(wsVariation).AsStringC()); + pValue->SetString("Full"); } void CScript_HostPseudoModel::Version(CFXJSE_Value* pValue, @@ -199,9 +194,7 @@ void CScript_HostPseudoModel::Version(CFXJSE_Value* pValue, ThrowException(XFA_IDS_UNABLE_SET_VERSION); return; } - CFX_WideString wsVersion; - pNotify->GetAppProvider()->GetVersion(wsVersion); - pValue->SetString(FX_UTF8Encode(wsVersion).AsStringC()); + pValue->SetString("11"); } void CScript_HostPseudoModel::Name(CFXJSE_Value* pValue, |