diff options
author | dan sinclair <dsinclair@chromium.org> | 2018-02-19 18:18:38 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-19 18:18:38 +0000 |
commit | 00961a731b4811f84b5610d0b752f2f2b610f8ff (patch) | |
tree | 3eeba992b11a7ecbfb89fc7009acba4da2d42f14 /xfa/fxfa/fm2js/cxfa_fmexpression.cpp | |
parent | d276a52cd5061e0d4ee4aa79b8e89bbeb0a89da3 (diff) | |
download | pdfium-00961a731b4811f84b5610d0b752f2f2b610f8ff.tar.xz |
Remove base class ToJavaScript methods in FormCalc
This CL removes the Loop base class as it adds no functionality. Other
base classes have had their ToJavaScript methods set as pure virtual and
their constructors made protected.
Change-Id: I5c77b8734d23c576dd52db7f72396ecdf2f7bd22
Reviewed-on: https://pdfium-review.googlesource.com/27270
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmexpression.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmexpression.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp index 97652bcd37..ae6cdb44d0 100644 --- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp @@ -27,11 +27,6 @@ CXFA_FMExpression::CXFA_FMExpression(uint32_t line) CXFA_FMExpression::CXFA_FMExpression(uint32_t line, XFA_FM_EXPTYPE type) : m_type(type), m_line(line) {} -bool CXFA_FMExpression::ToJavaScript(CFX_WideTextBuf& js, ReturnType type) { - CXFA_FMToJavaScriptDepth depthManager; - return !CXFA_IsTooBig(js) && depthManager.IsWithinMaxDepth(); -} - CXFA_FMFunctionDefinition::CXFA_FMFunctionDefinition( uint32_t line, bool isGlobal, @@ -291,18 +286,11 @@ bool CXFA_FMIfExpression::ToJavaScript(CFX_WideTextBuf& js, ReturnType type) { return !CXFA_IsTooBig(js); } -CXFA_FMLoopExpression::~CXFA_FMLoopExpression() {} - -bool CXFA_FMLoopExpression::ToJavaScript(CFX_WideTextBuf& js, ReturnType type) { - CXFA_FMToJavaScriptDepth depthManager; - return !CXFA_IsTooBig(js) && depthManager.IsWithinMaxDepth(); -} - CXFA_FMWhileExpression::CXFA_FMWhileExpression( uint32_t line, std::unique_ptr<CXFA_FMSimpleExpression> pCondition, std::unique_ptr<CXFA_FMExpression> pExpression) - : CXFA_FMLoopExpression(line), + : CXFA_FMExpression(line), m_pCondition(std::move(pCondition)), m_pExpression(std::move(pExpression)) {} @@ -369,7 +357,7 @@ CXFA_FMForExpression::CXFA_FMForExpression( int32_t iDirection, std::unique_ptr<CXFA_FMSimpleExpression> pStep, std::unique_ptr<CXFA_FMExpression> pList) - : CXFA_FMLoopExpression(line), + : CXFA_FMExpression(line), m_wsVariant(wsVariant), m_pAssignment(std::move(pAssignment)), m_pAccessor(std::move(pAccessor)), @@ -434,7 +422,7 @@ CXFA_FMForeachExpression::CXFA_FMForeachExpression( const WideStringView& wsIdentifier, std::vector<std::unique_ptr<CXFA_FMSimpleExpression>>&& pAccessors, std::unique_ptr<CXFA_FMExpression> pList) - : CXFA_FMLoopExpression(line), + : CXFA_FMExpression(line), m_wsIdentifier(wsIdentifier), m_pAccessors(std::move(pAccessors)), m_pList(std::move(pList)) {} |