diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutitem.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutitem.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.h b/xfa/fxfa/parser/cxfa_layoutitem.h index f5568df575..c9b285935e 100644 --- a/xfa/fxfa/parser/cxfa_layoutitem.h +++ b/xfa/fxfa/parser/cxfa_layoutitem.h @@ -18,8 +18,8 @@ class CXFA_LayoutItem { public: virtual ~CXFA_LayoutItem(); - bool IsContainerLayoutItem() const { return !m_bIsContentLayoutItem; } - bool IsContentLayoutItem() const { return m_bIsContentLayoutItem; } + bool IsContainerLayoutItem() const { return m_ItemType == kContainerItem; } + bool IsContentLayoutItem() const { return m_ItemType == kContentItem; } CXFA_ContainerLayoutItem* AsContainerLayoutItem(); CXFA_ContentLayoutItem* AsContentLayoutItem(); @@ -28,7 +28,6 @@ class CXFA_LayoutItem { CXFA_Node* GetFormNode() const { return m_pFormNode.Get(); } void SetFormNode(CXFA_Node* pNode) { m_pFormNode = pNode; } - void AddChild(CXFA_LayoutItem* pChildItem); void AddHeadChild(CXFA_LayoutItem* pChildItem); void RemoveChild(CXFA_LayoutItem* pChildItem); @@ -39,9 +38,10 @@ class CXFA_LayoutItem { CXFA_LayoutItem* m_pFirstChild = nullptr; // Raw, intra-tree pointer. protected: - CXFA_LayoutItem(CXFA_Node* pNode, bool bIsContentLayoutItem); + enum ItemType { kContainerItem, kContentItem }; + CXFA_LayoutItem(CXFA_Node* pNode, ItemType type); - bool m_bIsContentLayoutItem; + const ItemType m_ItemType; UnownedPtr<CXFA_Node> m_pFormNode; }; |