summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_object.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_object.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp
index 7823015695..93d31244f6 100644
--- a/xfa/fxfa/parser/cxfa_object.cpp
+++ b/xfa/fxfa/parser/cxfa_object.cpp
@@ -9,11 +9,12 @@
#include <utility>
#include "core/fxcrt/fx_extension.h"
+#include "fxjs/cfxjse_engine.h"
#include "fxjs/cfxjse_value.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-#include "xfa/fxfa/parser/cxfa_nodelist.h"
+#include "xfa/fxfa/parser/cxfa_treelist.h"
CXFA_Object::CXFA_Object(CXFA_Document* pDocument,
XFA_ObjectType objectType,
@@ -30,20 +31,28 @@ CXFA_Object::CXFA_Object(CXFA_Document* pDocument,
CXFA_Object::~CXFA_Object() {}
+void CXFA_Object::GetSOMExpression(WideString& wsSOMExpression) {
+ CFXJSE_Engine* pScriptContext = m_pDocument->GetScriptContext();
+ if (!pScriptContext)
+ return;
+
+ pScriptContext->GetSomExpression(ToNode(this), wsSOMExpression);
+}
+
CXFA_Node* CXFA_Object::AsNode() {
return IsNode() ? static_cast<CXFA_Node*>(this) : nullptr;
}
-CXFA_NodeList* CXFA_Object::AsNodeList() {
- return IsNodeList() ? static_cast<CXFA_NodeList*>(this) : nullptr;
+CXFA_TreeList* CXFA_Object::AsTreeList() {
+ return IsTreeList() ? static_cast<CXFA_TreeList*>(this) : nullptr;
}
const CXFA_Node* CXFA_Object::AsNode() const {
return IsNode() ? static_cast<const CXFA_Node*>(this) : nullptr;
}
-const CXFA_NodeList* CXFA_Object::AsNodeList() const {
- return IsNodeList() ? static_cast<const CXFA_NodeList*>(this) : nullptr;
+const CXFA_TreeList* CXFA_Object::AsTreeList() const {
+ return IsTreeList() ? static_cast<const CXFA_TreeList*>(this) : nullptr;
}
CXFA_Node* ToNode(CXFA_Object* pObj) {