summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_program.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_program.h')
-rw-r--r--xfa/fxfa/fm2js/xfa_program.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/xfa/fxfa/fm2js/xfa_program.h b/xfa/fxfa/fm2js/xfa_program.h
index 2f6de5e3a8..aa29bba87b 100644
--- a/xfa/fxfa/fm2js/xfa_program.h
+++ b/xfa/fxfa/fm2js/xfa_program.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXFA_FM2JS_XFA_PROGRAM_H_
#define XFA_FXFA_FM2JS_XFA_PROGRAM_H_
+#include <memory>
+
#include "xfa/fxfa/fm2js/xfa_error.h"
#include "xfa/fxfa/fm2js/xfa_fmparse.h"
@@ -14,15 +16,17 @@ class CXFA_FMProgram {
public:
CXFA_FMProgram();
~CXFA_FMProgram();
+
int32_t Init(const CFX_WideStringC& wsFormcalc);
int32_t ParseProgram();
int32_t TranslateProgram(CFX_WideTextBuf& wsJavaScript);
- CXFA_FMErrorInfo& GetError() { return m_pErrorInfo; }
+
+ const CXFA_FMErrorInfo& GetError() const { return m_pErrorInfo; }
private:
CXFA_FMErrorInfo m_pErrorInfo;
CXFA_FMParse m_parse;
- CXFA_FMFunctionDefinition* m_globalFunction;
+ std::unique_ptr<CXFA_FMFunctionDefinition> m_globalFunction;
};
#endif // XFA_FXFA_FM2JS_XFA_PROGRAM_H_