| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_SRC_FXFA_PARSER_XFA_SCRIPT_RESOLVEPROCESSOR_H_ | |
| 8 #define XFA_SRC_FXFA_PARSER_XFA_SCRIPT_RESOLVEPROCESSOR_H_ | |
| 9 | |
| 10 #include "xfa/include/fxfa/fxfa_objectacc.h" | |
| 11 #include "xfa/src/fxfa/parser/xfa_object.h" | |
| 12 #include "xfa/src/fxfa/parser/xfa_script.h" | |
| 13 | |
| 14 class CXFA_NodeHelper; | |
| 15 class CXFA_ScriptContext; | |
| 16 | |
| 17 class CXFA_ResolveNodesData { | |
| 18 public: | |
| 19 CXFA_ResolveNodesData(CXFA_ScriptContext* pSC = NULL) | |
| 20 : m_pSC(pSC), | |
| 21 m_CurNode(NULL), | |
| 22 m_wsName(), | |
| 23 m_uHashName(0), | |
| 24 m_wsCondition(), | |
| 25 m_nLevel(0), | |
| 26 m_Nodes(), | |
| 27 m_dwStyles(XFA_RESOLVENODE_Children), | |
| 28 m_pScriptAttribute(NULL), | |
| 29 m_dwFlag(XFA_RESOVENODE_RSTYPE_Nodes) {} | |
| 30 ~CXFA_ResolveNodesData() { m_Nodes.RemoveAll(); } | |
| 31 CXFA_ScriptContext* m_pSC; | |
| 32 CXFA_Object* m_CurNode; | |
| 33 CFX_WideString m_wsName; | |
| 34 uint32_t m_uHashName; | |
| 35 CFX_WideString m_wsCondition; | |
| 36 int32_t m_nLevel; | |
| 37 CXFA_ObjArray m_Nodes; | |
| 38 FX_DWORD m_dwStyles; | |
| 39 const XFA_SCRIPTATTRIBUTEINFO* m_pScriptAttribute; | |
| 40 XFA_RESOVENODE_RSTYPE m_dwFlag; | |
| 41 }; | |
| 42 class CXFA_ResolveProcessor { | |
| 43 public: | |
| 44 CXFA_ResolveProcessor(void); | |
| 45 ~CXFA_ResolveProcessor(void); | |
| 46 int32_t XFA_ResolveNodes(CXFA_ResolveNodesData& rnd); | |
| 47 int32_t XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData& rnd); | |
| 48 int32_t XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData& rnd); | |
| 49 int32_t XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesData& rnd); | |
| 50 int32_t XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData& rnd); | |
| 51 int32_t XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData& rnd); | |
| 52 int32_t XFA_ResolveNodes_Normal(CXFA_ResolveNodesData& rnd); | |
| 53 int32_t XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curNode, | |
| 54 CXFA_ResolveNodesData& rnd, | |
| 55 const CFX_WideStringC& strAttr); | |
| 56 void XFA_ResolveNode_ConditionArray(int32_t iCurIndex, | |
| 57 CFX_WideString wsCondition, | |
| 58 int32_t iFoundCount, | |
| 59 CXFA_ResolveNodesData& rnd); | |
| 60 void XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, | |
| 61 CFX_WideString wsCondition, | |
| 62 int32_t iFoundCount, | |
| 63 CXFA_ResolveNodesData& rnd); | |
| 64 int32_t XFA_ResolveNodes_GetFilter(const CFX_WideStringC& wsExpression, | |
| 65 int32_t nStart, | |
| 66 CXFA_ResolveNodesData& rnd); | |
| 67 void XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesData& rnd, | |
| 68 CFX_WideString wsCondition); | |
| 69 int32_t XFA_ResolveNodes_PopStack(CFX_Int32Array& stack); | |
| 70 void XFA_ResolveNodes_SetStylesForChild(FX_DWORD dwParentStyles, | |
| 71 CXFA_ResolveNodesData& rnd); | |
| 72 int32_t XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENODE_RS& resolveNodeRS, | |
| 73 CFX_WideString& wsLastCondition); | |
| 74 void XFA_ResolveNode_SetIndexDataBind(CFX_WideString& wsNextCondition, | |
| 75 int32_t& iIndex, | |
| 76 int32_t iCount); | |
| 77 CXFA_NodeHelper* GetNodeHelper() { return m_pNodeHelper; } | |
| 78 | |
| 79 private: | |
| 80 CXFA_NodeHelper* m_pNodeHelper; | |
| 81 | |
| 82 public: | |
| 83 int32_t m_iCurStart; | |
| 84 }; | |
| 85 | |
| 86 #endif // XFA_SRC_FXFA_PARSER_XFA_SCRIPT_RESOLVEPROCESSOR_H_ | |
| OLD | NEW |