| 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 #ifndef XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ | 7 #ifndef XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ |
| 8 #define XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ | 8 #define XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "xfa/fxfa/parser/xfa_object.h" | 12 #include "xfa/fxfa/parser/xfa_object.h" |
| 11 #include "xfa/fxfa/parser/xfa_resolvenode_rs.h" | 13 #include "xfa/fxfa/parser/xfa_resolvenode_rs.h" |
| 12 | 14 |
| 13 class CXFA_NodeHelper; | 15 class CXFA_NodeHelper; |
| 14 class CXFA_ScriptContext; | 16 class CXFA_ScriptContext; |
| 15 | 17 |
| 16 class CXFA_ResolveNodesData { | 18 class CXFA_ResolveNodesData { |
| 17 public: | 19 public: |
| 18 CXFA_ResolveNodesData(CXFA_ScriptContext* pSC = nullptr); | 20 CXFA_ResolveNodesData(CXFA_ScriptContext* pSC = nullptr); |
| 19 ~CXFA_ResolveNodesData(); | 21 ~CXFA_ResolveNodesData(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 39 int32_t GetFilter(const CFX_WideStringC& wsExpression, | 41 int32_t GetFilter(const CFX_WideStringC& wsExpression, |
| 40 int32_t nStart, | 42 int32_t nStart, |
| 41 CXFA_ResolveNodesData& rnd); | 43 CXFA_ResolveNodesData& rnd); |
| 42 int32_t SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, | 44 int32_t SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, |
| 43 CFX_WideString& wsLastCondition); | 45 CFX_WideString& wsLastCondition); |
| 44 void SetIndexDataBind(CFX_WideString& wsNextCondition, | 46 void SetIndexDataBind(CFX_WideString& wsNextCondition, |
| 45 int32_t& iIndex, | 47 int32_t& iIndex, |
| 46 int32_t iCount); | 48 int32_t iCount); |
| 47 void SetCurStart(int32_t start) { m_iCurStart = start; } | 49 void SetCurStart(int32_t start) { m_iCurStart = start; } |
| 48 | 50 |
| 49 CXFA_NodeHelper* GetNodeHelper() { return m_pNodeHelper; } | 51 CXFA_NodeHelper* GetNodeHelper() const { return m_pNodeHelper.get(); } |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 int32_t ResolveForAttributeRs(CXFA_Object* curNode, | 54 int32_t ResolveForAttributeRs(CXFA_Object* curNode, |
| 53 CXFA_ResolveNodesData& rnd, | 55 CXFA_ResolveNodesData& rnd, |
| 54 const CFX_WideStringC& strAttr); | 56 const CFX_WideStringC& strAttr); |
| 55 int32_t ResolveAnyChild(CXFA_ResolveNodesData& rnd); | 57 int32_t ResolveAnyChild(CXFA_ResolveNodesData& rnd); |
| 56 int32_t ResolveDollar(CXFA_ResolveNodesData& rnd); | 58 int32_t ResolveDollar(CXFA_ResolveNodesData& rnd); |
| 57 int32_t ResolveExcalmatory(CXFA_ResolveNodesData& rnd); | 59 int32_t ResolveExcalmatory(CXFA_ResolveNodesData& rnd); |
| 58 int32_t ResolveNumberSign(CXFA_ResolveNodesData& rnd); | 60 int32_t ResolveNumberSign(CXFA_ResolveNodesData& rnd); |
| 59 int32_t ResolveAsterisk(CXFA_ResolveNodesData& rnd); | 61 int32_t ResolveAsterisk(CXFA_ResolveNodesData& rnd); |
| 60 int32_t ResolveNormal(CXFA_ResolveNodesData& rnd); | 62 int32_t ResolveNormal(CXFA_ResolveNodesData& rnd); |
| 61 int32_t ResolvePopStack(CFX_Int32Array& stack); | 63 int32_t ResolvePopStack(CFX_Int32Array& stack); |
| 62 void SetStylesForChild(uint32_t dwParentStyles, CXFA_ResolveNodesData& rnd); | 64 void SetStylesForChild(uint32_t dwParentStyles, CXFA_ResolveNodesData& rnd); |
| 63 | 65 |
| 64 void ConditionArray(int32_t iCurIndex, | 66 void ConditionArray(int32_t iCurIndex, |
| 65 CFX_WideString wsCondition, | 67 CFX_WideString wsCondition, |
| 66 int32_t iFoundCount, | 68 int32_t iFoundCount, |
| 67 CXFA_ResolveNodesData& rnd); | 69 CXFA_ResolveNodesData& rnd); |
| 68 void DoPredicateFilter(int32_t iCurIndex, | 70 void DoPredicateFilter(int32_t iCurIndex, |
| 69 CFX_WideString wsCondition, | 71 CFX_WideString wsCondition, |
| 70 int32_t iFoundCount, | 72 int32_t iFoundCount, |
| 71 CXFA_ResolveNodesData& rnd); | 73 CXFA_ResolveNodesData& rnd); |
| 72 void FilterCondition(CXFA_ResolveNodesData& rnd, CFX_WideString wsCondition); | 74 void FilterCondition(CXFA_ResolveNodesData& rnd, CFX_WideString wsCondition); |
| 73 | 75 |
| 74 int32_t m_iCurStart; | 76 int32_t m_iCurStart; |
| 75 CXFA_NodeHelper* m_pNodeHelper; | 77 std::unique_ptr<CXFA_NodeHelper> m_pNodeHelper; |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 #endif // XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ | 80 #endif // XFA_FXFA_PARSER_CXFA_RESOLVEPROCESSOR_H_ |
| OLD | NEW |