diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-23 07:52:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-23 07:52:01 -0700 |
commit | 937a11304dbf7abd97b76da8154e2b3bf5141aeb (patch) | |
tree | 931234ed6d3d1ec96972c92c720f7600b80a708f /xfa/fxfa/parser/xfa_object.h | |
parent | 070fcdfeafb17a9d3ada1418f48fd7f19aa4cf83 (diff) | |
download | pdfium-937a11304dbf7abd97b76da8154e2b3bf5141aeb.tar.xz |
Remove CXFA_OrdinaryObject class
The CXFA_OrdinaryObject class no longer has any functionality but is just wraps
CXFA_Object and sets the object type for the sub classes. This Cl removes the
class and has the subclass set the object type themselves.
This CL also renames the OrdinaryObject type to just Object.
Review-Url: https://codereview.chromium.org/2082343003
Diffstat (limited to 'xfa/fxfa/parser/xfa_object.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_object.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index 67e4a2efad..8b1f2303f6 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -16,10 +16,9 @@ class CXFA_Document; class CXFA_Node; class CXFA_NodeList; -class CXFA_OrdinaryObject; enum class XFA_ObjectType { - OrdinaryObject, + Object, OrdinaryList, NodeList, Node, @@ -65,9 +64,6 @@ class CXFA_Object : public CFXJSE_HostObject { m_objectType == XFA_ObjectType::ContentNode || m_objectType == XFA_ObjectType::VariablesThis; } - bool IsOrdinaryObject() const { - return m_objectType == XFA_ObjectType::OrdinaryObject; - } bool IsNodeList() const { return m_objectType == XFA_ObjectType::NodeList; } bool IsOrdinaryList() const { return m_objectType == XFA_ObjectType::OrdinaryList; @@ -85,11 +81,9 @@ class CXFA_Object : public CFXJSE_HostObject { } CXFA_Node* AsNode(); - CXFA_OrdinaryObject* AsOrdinaryObject(); CXFA_NodeList* AsNodeList(); const CXFA_Node* AsNode() const; - const CXFA_OrdinaryObject* AsOrdinaryObject() const; const CXFA_NodeList* AsNodeList() const; XFA_Element GetElementType() const; @@ -684,12 +678,6 @@ class CXFA_Node : public CXFA_Object { XFA_MAPMODULEDATA* m_pMapModuleData; }; -class CXFA_OrdinaryObject : public CXFA_Object { - public: - CXFA_OrdinaryObject(CXFA_Document* pDocument, XFA_Element eElement); - ~CXFA_OrdinaryObject() override; -}; - class CXFA_ThisProxy : public CXFA_Object { public: CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Node* pScriptNode); @@ -797,9 +785,7 @@ typedef CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> inline CXFA_Node* CXFA_Object::AsNode() { return IsNode() ? static_cast<CXFA_Node*>(this) : nullptr; } -inline CXFA_OrdinaryObject* CXFA_Object::AsOrdinaryObject() { - return IsOrdinaryObject() ? static_cast<CXFA_OrdinaryObject*>(this) : nullptr; -} + inline CXFA_NodeList* CXFA_Object::AsNodeList() { return IsNodeList() ? static_cast<CXFA_NodeList*>(this) : nullptr; } @@ -807,10 +793,7 @@ inline CXFA_NodeList* CXFA_Object::AsNodeList() { inline const CXFA_Node* CXFA_Object::AsNode() const { return IsNode() ? static_cast<const CXFA_Node*>(this) : nullptr; } -inline const CXFA_OrdinaryObject* CXFA_Object::AsOrdinaryObject() const { - return IsOrdinaryObject() ? static_cast<const CXFA_OrdinaryObject*>(this) - : nullptr; -} + inline const CXFA_NodeList* CXFA_Object::AsNodeList() const { return IsNodeList() ? static_cast<const CXFA_NodeList*>(this) : nullptr; } |