| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/src/fxfa/fm2js/xfa_program.h" | 7 #include "xfa/fxfa/fm2js/xfa_program.h" |
| 8 | 8 |
| 9 CXFA_FMProgram::CXFA_FMProgram() : m_globalFunction(0) {} | 9 CXFA_FMProgram::CXFA_FMProgram() : m_globalFunction(0) {} |
| 10 CXFA_FMProgram::~CXFA_FMProgram() { | 10 CXFA_FMProgram::~CXFA_FMProgram() { |
| 11 if (m_globalFunction != 0) { | 11 if (m_globalFunction != 0) { |
| 12 delete m_globalFunction; | 12 delete m_globalFunction; |
| 13 m_globalFunction = 0; | 13 m_globalFunction = 0; |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 int32_t CXFA_FMProgram::Init(const CFX_WideStringC& wsFormcalc) { | 16 int32_t CXFA_FMProgram::Init(const CFX_WideStringC& wsFormcalc) { |
| 17 return m_parse.Init(wsFormcalc, &m_pErrorInfo); | 17 return m_parse.Init(wsFormcalc, &m_pErrorInfo); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 m_globalFunction = | 37 m_globalFunction = |
| 38 new CXFA_FMFunctionDefinition(1, 1, FX_WSTRC(L""), 0, expressions); | 38 new CXFA_FMFunctionDefinition(1, 1, FX_WSTRC(L""), 0, expressions); |
| 39 return 0; | 39 return 0; |
| 40 } | 40 } |
| 41 int32_t CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf& wsJavaScript) { | 41 int32_t CXFA_FMProgram::TranslateProgram(CFX_WideTextBuf& wsJavaScript) { |
| 42 m_globalFunction->ToJavaScript(wsJavaScript); | 42 m_globalFunction->ToJavaScript(wsJavaScript); |
| 43 wsJavaScript.AppendChar(0); | 43 wsJavaScript.AppendChar(0); |
| 44 return 0; | 44 return 0; |
| 45 } | 45 } |
| OLD | NEW |