Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: xfa/fxfa/parser/xfa_document.h

Issue 1835703002: Remove FX_DWORD from XFA, part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_doclayout.h ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_XFA_DOCUMENT_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_DOCUMENT_H_
8 #define XFA_FXFA_PARSER_XFA_DOCUMENT_H_ 8 #define XFA_FXFA_PARSER_XFA_DOCUMENT_H_
9 9
10 #include "xfa/fxfa/parser/xfa_localemgr.h" 10 #include "xfa/fxfa/parser/xfa_localemgr.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 XFA_PAGEEVENT eEvent, 75 XFA_PAGEEVENT eEvent,
76 void* pParam = NULL) = 0; 76 void* pParam = NULL) = 0;
77 77
78 virtual void OnNodeEvent(CXFA_Node* pSender, 78 virtual void OnNodeEvent(CXFA_Node* pSender,
79 XFA_NODEEVENT eEvent, 79 XFA_NODEEVENT eEvent,
80 void* pParam = NULL, 80 void* pParam = NULL,
81 void* pParam2 = NULL, 81 void* pParam2 = NULL,
82 void* pParam3 = NULL, 82 void* pParam3 = NULL,
83 void* pParam4 = NULL) = 0; 83 void* pParam4 = NULL) = 0;
84 virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, 84 virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender,
85 FX_DWORD dwEvent, 85 uint32_t dwEvent,
86 void* pParam = NULL, 86 void* pParam = NULL,
87 void* pAdditional = NULL, 87 void* pAdditional = NULL,
88 void* pAdditional2 = NULL) = 0; 88 void* pAdditional2 = NULL) = 0;
89 89
90 virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode) = 0; 90 virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode) = 0;
91 virtual void OnLayoutEvent(IXFA_DocLayout* pLayout, 91 virtual void OnLayoutEvent(IXFA_DocLayout* pLayout,
92 CXFA_LayoutItem* pSender, 92 CXFA_LayoutItem* pSender,
93 XFA_LAYOUTEVENT eEvent, 93 XFA_LAYOUTEVENT eEvent,
94 void* pParam = NULL, 94 void* pParam = NULL,
95 void* pParam2 = NULL) = 0; 95 void* pParam2 = NULL) = 0;
(...skipping 20 matching lines...) Expand all
116 virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0; 116 virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL) = 0;
117 virtual int32_t GetLayoutStatus() = 0; 117 virtual int32_t GetLayoutStatus() = 0;
118 virtual void RunNodeInitialize(CXFA_Node* pNode) = 0; 118 virtual void RunNodeInitialize(CXFA_Node* pNode) = 0;
119 virtual void RunSubformIndexChange(CXFA_Node* pSubformNode) = 0; 119 virtual void RunSubformIndexChange(CXFA_Node* pSubformNode) = 0;
120 virtual CXFA_Node* GetFocusWidgetNode() = 0; 120 virtual CXFA_Node* GetFocusWidgetNode() = 0;
121 virtual void SetFocusWidgetNode(CXFA_Node* pNode) = 0; 121 virtual void SetFocusWidgetNode(CXFA_Node* pNode) = 0;
122 }; 122 };
123 class IXFA_ObjFactory { 123 class IXFA_ObjFactory {
124 public: 124 public:
125 virtual ~IXFA_ObjFactory() {} 125 virtual ~IXFA_ObjFactory() {}
126 virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement) = 0; 126 virtual CXFA_Node* CreateNode(uint32_t dwPacket, XFA_ELEMENT eElement) = 0;
127 virtual CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket, 127 virtual CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket,
128 XFA_ELEMENT eElement) = 0; 128 XFA_ELEMENT eElement) = 0;
129 }; 129 };
130 #define XFA_DOCFLAG_StrictScoping 0x0001 130 #define XFA_DOCFLAG_StrictScoping 0x0001
131 #define XFA_DOCFLAG_HasInteractive 0x0002 131 #define XFA_DOCFLAG_HasInteractive 0x0002
132 #define XFA_DOCFLAG_Interactive 0x0004 132 #define XFA_DOCFLAG_Interactive 0x0004
133 #define XFA_DOCFLAG_Scripting 0x0008 133 #define XFA_DOCFLAG_Scripting 0x0008
134 class CScript_DataWindow; 134 class CScript_DataWindow;
135 class CScript_EventPseudoModel; 135 class CScript_EventPseudoModel;
136 class CScript_HostPseudoModel; 136 class CScript_HostPseudoModel;
137 class CScript_LogPseudoModel; 137 class CScript_LogPseudoModel;
138 class CScript_LayoutPseudoModel; 138 class CScript_LayoutPseudoModel;
139 class CScript_SignaturePseudoModel; 139 class CScript_SignaturePseudoModel;
140 class CXFA_Document : public IXFA_ObjFactory { 140 class CXFA_Document : public IXFA_ObjFactory {
141 public: 141 public:
142 CXFA_Document(IXFA_DocParser* pParser); 142 CXFA_Document(IXFA_DocParser* pParser);
143 ~CXFA_Document(); 143 ~CXFA_Document();
144 CXFA_Node* GetRoot() const { return m_pRootNode; } 144 CXFA_Node* GetRoot() const { return m_pRootNode; }
145 IXFA_DocParser* GetParser() const { return m_pParser; } 145 IXFA_DocParser* GetParser() const { return m_pParser; }
146 IXFA_Notify* GetNotify() const; 146 IXFA_Notify* GetNotify() const;
147 void SetRoot(CXFA_Node* pNewRoot); 147 void SetRoot(CXFA_Node* pNewRoot);
148 CXFA_Object* GetXFAObject(const CFX_WideStringC& wsNodeName); 148 CXFA_Object* GetXFAObject(const CFX_WideStringC& wsNodeName);
149 CXFA_Object* GetXFAObject(FX_DWORD wsNodeNameHash); 149 CXFA_Object* GetXFAObject(uint32_t wsNodeNameHash);
150 void AddPurgeNode(CXFA_Node* pNode); 150 void AddPurgeNode(CXFA_Node* pNode);
151 FX_BOOL RemovePurgeNode(CXFA_Node* pNode); 151 FX_BOOL RemovePurgeNode(CXFA_Node* pNode);
152 void PurgeNodes(); 152 void PurgeNodes();
153 bool HasFlag(FX_DWORD dwFlag) { return (m_dwDocFlags & dwFlag) == dwFlag; } 153 bool HasFlag(uint32_t dwFlag) { return (m_dwDocFlags & dwFlag) == dwFlag; }
154 void SetFlag(FX_DWORD dwFlag, FX_BOOL bOn = TRUE); 154 void SetFlag(uint32_t dwFlag, FX_BOOL bOn = TRUE);
155 FX_BOOL IsInteractive(); 155 FX_BOOL IsInteractive();
156 XFA_VERSION GetCurVersionMode() { return m_eCurVersionMode; } 156 XFA_VERSION GetCurVersionMode() { return m_eCurVersionMode; }
157 XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS); 157 XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS);
158 CXFA_LocaleMgr* GetLocalMgr(); 158 CXFA_LocaleMgr* GetLocalMgr();
159 virtual CXFA_Node* CreateNode(FX_DWORD dwPacket, XFA_ELEMENT eElement); 159 virtual CXFA_Node* CreateNode(uint32_t dwPacket, XFA_ELEMENT eElement);
160 virtual CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket, 160 virtual CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket,
161 XFA_ELEMENT eElement); 161 XFA_ELEMENT eElement);
162 void DoProtoMerge(); 162 void DoProtoMerge();
163 CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID); 163 CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID);
164 void DoDataMerge(); 164 void DoDataMerge();
165 void DoDataRemerge(FX_BOOL bDoDataMerge); 165 void DoDataRemerge(FX_BOOL bDoDataMerge);
166 CXFA_Node* DataMerge_CopyContainer(CXFA_Node* pTemplateNode, 166 CXFA_Node* DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
167 CXFA_Node* pFormNode, 167 CXFA_Node* pFormNode,
168 CXFA_Node* pDataScope, 168 CXFA_Node* pDataScope,
169 FX_BOOL bOneInstance = FALSE, 169 FX_BOOL bOneInstance = FALSE,
170 FX_BOOL bDataMerge = TRUE, 170 FX_BOOL bDataMerge = TRUE,
171 FX_BOOL bUpLevel = TRUE); 171 FX_BOOL bUpLevel = TRUE);
172 void DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot); 172 void DataMerge_UpdateBindingRelations(CXFA_Node* pFormUpdateRoot);
173 CXFA_Node* GetNotBindNode(CXFA_ObjArray& arrayNodes); 173 CXFA_Node* GetNotBindNode(CXFA_ObjArray& arrayNodes);
174 CXFA_LayoutProcessor* GetLayoutProcessor(); 174 CXFA_LayoutProcessor* GetLayoutProcessor();
175 IXFA_DocLayout* GetDocLayout(); 175 IXFA_DocLayout* GetDocLayout();
176 IXFA_ScriptContext* InitScriptContext(FXJSE_HRUNTIME hRuntime); 176 IXFA_ScriptContext* InitScriptContext(FXJSE_HRUNTIME hRuntime);
177 IXFA_ScriptContext* GetScriptContext(); 177 IXFA_ScriptContext* GetScriptContext();
178 void ClearLayoutData(); 178 void ClearLayoutData();
179 179
180 CFX_MapPtrTemplate<FX_DWORD, CXFA_Node*> m_rgGlobalBinding; 180 CFX_MapPtrTemplate<uint32_t, CXFA_Node*> m_rgGlobalBinding;
181 CXFA_NodeArray m_pPendingPageSet; 181 CXFA_NodeArray m_pPendingPageSet;
182 182
183 protected: 183 protected:
184 IXFA_DocParser* m_pParser; 184 IXFA_DocParser* m_pParser;
185 IXFA_ScriptContext* m_pScriptContext; 185 IXFA_ScriptContext* m_pScriptContext;
186 CXFA_LayoutProcessor* m_pLayoutProcessor; 186 CXFA_LayoutProcessor* m_pLayoutProcessor;
187 CXFA_Node* m_pRootNode; 187 CXFA_Node* m_pRootNode;
188 CXFA_LocaleMgr* m_pLocalMgr; 188 CXFA_LocaleMgr* m_pLocalMgr;
189 CScript_DataWindow* m_pScriptDataWindow; 189 CScript_DataWindow* m_pScriptDataWindow;
190 CScript_EventPseudoModel* m_pScriptEvent; 190 CScript_EventPseudoModel* m_pScriptEvent;
191 CScript_HostPseudoModel* m_pScriptHost; 191 CScript_HostPseudoModel* m_pScriptHost;
192 CScript_LogPseudoModel* m_pScriptLog; 192 CScript_LogPseudoModel* m_pScriptLog;
193 CScript_LayoutPseudoModel* m_pScriptLayout; 193 CScript_LayoutPseudoModel* m_pScriptLayout;
194 CScript_SignaturePseudoModel* m_pScriptSignature; 194 CScript_SignaturePseudoModel* m_pScriptSignature;
195 CXFA_NodeSet m_rgPurgeNodes; 195 CXFA_NodeSet m_rgPurgeNodes;
196 XFA_VERSION m_eCurVersionMode; 196 XFA_VERSION m_eCurVersionMode;
197 FX_DWORD m_dwDocFlags; 197 uint32_t m_dwDocFlags;
198 friend class CXFA_SimpleParser; 198 friend class CXFA_SimpleParser;
199 }; 199 };
200 200
201 #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_H_ 201 #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_doclayout.h ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698