From 0370d6b8aab1b7880dd2727e7d9aed04cc358360 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 26 Jan 2017 12:15:34 -0800 Subject: Cleanup CPDF_StructElement. Pre-cursor to properly ref-counting it. Rename to match the CPDF_/IPDF_ conventions. Move CPDF_ structure out of IPDF-defining headers. Break friendships. Review-Url: https://codereview.chromium.org/2640923006 --- core/fpdfdoc/fpdf_tagged.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'core/fpdfdoc/fpdf_tagged.h') diff --git a/core/fpdfdoc/fpdf_tagged.h b/core/fpdfdoc/fpdf_tagged.h index aa697ca248..3a1e2231fc 100644 --- a/core/fpdfdoc/fpdf_tagged.h +++ b/core/fpdfdoc/fpdf_tagged.h @@ -27,30 +27,6 @@ class IPDF_StructTree { virtual IPDF_StructElement* GetTopElement(int i) const = 0; }; -struct CPDF_StructKid { - enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; - - union { - struct { - IPDF_StructElement* m_pElement; - CPDF_Dictionary* m_pDict; - } m_Element; - struct { - uint32_t m_PageObjNum; - uint32_t m_ContentId; - } m_PageContent; - struct { - uint32_t m_PageObjNum; - uint32_t m_ContentId; - uint32_t m_RefObjNum; - } m_StreamContent; - struct { - uint32_t m_PageObjNum; - uint32_t m_RefObjNum; - } m_Object; - }; -}; - class IPDF_StructElement { public: virtual ~IPDF_StructElement() {} @@ -60,7 +36,7 @@ class IPDF_StructElement { virtual IPDF_StructElement* GetParent() const = 0; virtual CPDF_Dictionary* GetDict() const = 0; virtual int CountKids() const = 0; - virtual const CPDF_StructKid& GetKid(int index) const = 0; + virtual IPDF_StructElement* GetKidIfElement(int index) const = 0; virtual CPDF_Object* GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, -- cgit v1.2.3