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_XFA_UTILS_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_UTILS_H_ |
8 #define XFA_FXFA_PARSER_XFA_UTILS_H_ | 8 #define XFA_FXFA_PARSER_XFA_UTILS_H_ |
9 | 9 |
10 #include "xfa/fde/xml/fde_xml.h" | 10 #include "xfa/fde/xml/fde_xml.h" |
11 #include "xfa/fgas/crt/fgas_stream.h" | 11 #include "xfa/fgas/crt/fgas_stream.h" |
12 #include "xfa/fgas/crt/fgas_utils.h" | 12 #include "xfa/fgas/crt/fgas_utils.h" |
13 #include "xfa/fxfa/include/fxfa_basic.h" | 13 #include "xfa/fxfa/include/fxfa_basic.h" |
14 | 14 |
15 class CFDE_XMLElement; | 15 class CFDE_XMLElement; |
16 class CFDE_XMLNode; | 16 class CFDE_XMLNode; |
17 class CXFA_LocaleValue; | 17 class CXFA_LocaleValue; |
18 class CXFA_Node; | 18 class CXFA_Node; |
19 class CXFA_WidgetData; | 19 class CXFA_WidgetData; |
20 | 20 |
21 inline FX_BOOL XFA_IsSpace(FX_WCHAR c) { | |
22 return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); | |
23 } | |
24 inline FX_BOOL XFA_IsDigit(FX_WCHAR c) { | |
25 return c >= '0' && c <= '9'; | |
26 } | |
27 | |
28 FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier( | 21 FX_BOOL XFA_FDEExtension_ResolveNamespaceQualifier( |
29 CFDE_XMLElement* pNode, | 22 CFDE_XMLElement* pNode, |
30 const CFX_WideStringC& wsQualifier, | 23 const CFX_WideStringC& wsQualifier, |
31 CFX_WideString& wsNamespaceURI); | 24 CFX_WideString& wsNamespaceURI); |
| 25 |
32 template <class NodeType, class TraverseStrategy> | 26 template <class NodeType, class TraverseStrategy> |
33 class CXFA_NodeIteratorTemplate { | 27 class CXFA_NodeIteratorTemplate { |
34 public: | 28 public: |
35 CXFA_NodeIteratorTemplate(NodeType* pRootNode = nullptr) | 29 CXFA_NodeIteratorTemplate(NodeType* pRootNode = nullptr) |
36 : m_pRoot(pRootNode) { | 30 : m_pRoot(pRootNode) { |
37 if (pRootNode) { | 31 if (pRootNode) { |
38 m_NodeStack.Push(pRootNode); | 32 m_NodeStack.Push(pRootNode); |
39 } | 33 } |
40 } | 34 } |
41 FX_BOOL Init(NodeType* pRootNode) { | 35 FX_BOOL Init(NodeType* pRootNode) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 FX_BOOL XFA_IsLayoutElement(XFA_Element eElement, | 176 FX_BOOL XFA_IsLayoutElement(XFA_Element eElement, |
183 FX_BOOL bLayoutContainer = FALSE); | 177 FX_BOOL bLayoutContainer = FALSE); |
184 | 178 |
185 void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode); | 179 void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode); |
186 void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, | 180 void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, |
187 IFX_Stream* pStream, | 181 IFX_Stream* pStream, |
188 const FX_CHAR* pChecksum = nullptr, | 182 const FX_CHAR* pChecksum = nullptr, |
189 FX_BOOL bSaveXML = FALSE); | 183 FX_BOOL bSaveXML = FALSE); |
190 | 184 |
191 #endif // XFA_FXFA_PARSER_XFA_UTILS_H_ | 185 #endif // XFA_FXFA_PARSER_XFA_UTILS_H_ |
OLD | NEW |