summaryrefslogtreecommitdiff
path: root/xfa/fde/xml/fde_xml.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-04 11:55:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-04 11:55:38 -0700
commit6e56a5ebc88e05fe0bf05624eba9aeed57fa6d60 (patch)
tree298fe044daa5bcee963fc9c8b398fd870c5b9571 /xfa/fde/xml/fde_xml.h
parent5838dbd3809d1d16945009c7f9d6111dda3797f0 (diff)
downloadpdfium-6e56a5ebc88e05fe0bf05624eba9aeed57fa6d60.tar.xz
Replace FDE_XMLSYNTAX defines with enum classes.
This CL replaces FDE_XMLSYNTAXMODE_ with FDE_XmlSyntaxState:: and FDE_XMLSYNTAXSTATUS_ with FDE_XmlSyntaxResult::. The various variables also have their names updated to make them clearer. Review URL: https://codereview.chromium.org/1856003002
Diffstat (limited to 'xfa/fde/xml/fde_xml.h')
-rw-r--r--xfa/fde/xml/fde_xml.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/xfa/fde/xml/fde_xml.h b/xfa/fde/xml/fde_xml.h
index 9d0a869524..61dd4b040e 100644
--- a/xfa/fde/xml/fde_xml.h
+++ b/xfa/fde/xml/fde_xml.h
@@ -10,6 +10,24 @@
#include "xfa/fgas/crt/fgas_stream.h"
#include "xfa/fgas/crt/fgas_utils.h"
+enum class FDE_XmlSyntaxResult {
+ None,
+ InstructionOpen,
+ InstructionClose,
+ ElementOpen,
+ ElementBreak,
+ ElementClose,
+ TargetName,
+ TagName,
+ AttriName,
+ AttriValue,
+ Text,
+ CData,
+ TargetData,
+ Error,
+ EndOfString
+};
+
enum FDE_XMLNODETYPE {
FDE_XMLNODE_Unknown = 0,
FDE_XMLNODE_Instruction,
@@ -45,20 +63,4 @@ struct FDE_XMLREADERHANDLER {
const CFX_WideString& wsValue);
};
-#define FDE_XMLSYNTAXSTATUS_None 0x00
-#define FDE_XMLSYNTAXSTATUS_InstructionOpen 0x01
-#define FDE_XMLSYNTAXSTATUS_InstructionClose 0x02
-#define FDE_XMLSYNTAXSTATUS_ElementOpen 0x03
-#define FDE_XMLSYNTAXSTATUS_ElementBreak 0x04
-#define FDE_XMLSYNTAXSTATUS_ElementClose 0x05
-#define FDE_XMLSYNTAXSTATUS_TargetName 0x06
-#define FDE_XMLSYNTAXSTATUS_TagName 0x07
-#define FDE_XMLSYNTAXSTATUS_AttriName 0x08
-#define FDE_XMLSYNTAXSTATUS_AttriValue 0x09
-#define FDE_XMLSYNTAXSTATUS_Text 0x0A
-#define FDE_XMLSYNTAXSTATUS_CData 0x0B
-#define FDE_XMLSYNTAXSTATUS_TargetData 0x0C
-#define FDE_XMLSYNTAXSTATUS_Error 0xFE
-#define FDE_XMLSYNTAXSTATUS_EOS 0xFF
-
#endif // XFA_FDE_XML_FDE_XML_H_