summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/fxfa.h18
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.cpp23
2 files changed, 8 insertions, 33 deletions
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index 412d36b7c2..a86fb63c4d 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -177,13 +177,6 @@ class IXFA_AppProvider {
virtual ~IXFA_AppProvider() {}
/**
- * Specifies the name of the client application in which a form currently
- * exists. Such as Exchange-Pro.
- */
- virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0;
- virtual void GetAppType(CFX_WideString& wsAppType) = 0;
-
- /**
* Returns the language of the running host application. Such as zh_CN
*/
virtual void GetLanguage(CFX_WideString& wsLanguage) = 0;
@@ -194,17 +187,6 @@ class IXFA_AppProvider {
virtual void GetPlatform(CFX_WideString& wsPlatform) = 0;
/**
- * Indicates the packaging of the application that is running the script. Such
- * as Full
- */
- virtual void GetVariation(CFX_WideString& wsVariation) = 0;
-
- /**
- * Indicates the version number of the current application. Such as 9
- */
- virtual void GetVersion(CFX_WideString& wsVersion) = 0;
-
- /**
* Get application name, such as Phantom.
*/
virtual void GetAppName(CFX_WideString& wsName) = 0;
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,