diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
commit | b048f791a15f2da781a01eba5b09eb9d389f9c11 (patch) | |
tree | 6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /core/include/fpdfdoc/fpdf_tagged.h | |
parent | c8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff) | |
download | pdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz |
clang-format all pdfium code.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'core/include/fpdfdoc/fpdf_tagged.h')
-rw-r--r-- | core/include/fpdfdoc/fpdf_tagged.h | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/core/include/fpdfdoc/fpdf_tagged.h b/core/include/fpdfdoc/fpdf_tagged.h index 706f5c04d7..3de6041dc1 100644 --- a/core/include/fpdfdoc/fpdf_tagged.h +++ b/core/include/fpdfdoc/fpdf_tagged.h @@ -14,89 +14,93 @@ class CPDF_StructTree; class IPDF_ReflowedPage; struct CPDF_StructKid; -class CPDF_StructTree -{ -public: +class CPDF_StructTree { + public: + static CPDF_StructTree* LoadDoc(const CPDF_Document* pDoc); - static CPDF_StructTree* LoadDoc(const CPDF_Document* pDoc); + static CPDF_StructTree* LoadPage(const CPDF_Document* pDoc, + const CPDF_Dictionary* pPageDict); - static CPDF_StructTree* LoadPage(const CPDF_Document* pDoc, const CPDF_Dictionary* pPageDict); + virtual ~CPDF_StructTree() {} - virtual ~CPDF_StructTree() {} + virtual int CountTopElements() const = 0; - virtual int CountTopElements() const = 0; - - virtual CPDF_StructElement* GetTopElement(int i) const = 0; + virtual CPDF_StructElement* GetTopElement(int i) const = 0; }; struct CPDF_StructKid { - enum { - Invalid, - Element, - PageContent, - StreamContent, - Object - } m_Type; - - union { - struct { - - CPDF_StructElement* m_pElement; - - CPDF_Dictionary* m_pDict; - } m_Element; - struct { + enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; - FX_DWORD m_PageObjNum; + union { + struct { + CPDF_StructElement* m_pElement; - FX_DWORD m_ContentId; - } m_PageContent; - struct { + CPDF_Dictionary* m_pDict; + } m_Element; + struct { + FX_DWORD m_PageObjNum; - FX_DWORD m_PageObjNum; + FX_DWORD m_ContentId; + } m_PageContent; + struct { + FX_DWORD m_PageObjNum; - FX_DWORD m_ContentId; + FX_DWORD m_ContentId; - FX_DWORD m_RefObjNum; - } m_StreamContent; - struct { + FX_DWORD m_RefObjNum; + } m_StreamContent; + struct { + FX_DWORD m_PageObjNum; - FX_DWORD m_PageObjNum; - - FX_DWORD m_RefObjNum; - } m_Object; - }; + FX_DWORD m_RefObjNum; + } m_Object; + }; }; -class CPDF_StructElement -{ -public: - virtual ~CPDF_StructElement() { } - - virtual CPDF_StructTree* GetTree() const = 0; - - virtual const CFX_ByteString& GetType() const = 0; - - virtual CPDF_StructElement* GetParent() const = 0; +class CPDF_StructElement { + public: + virtual ~CPDF_StructElement() {} - virtual CPDF_Dictionary * GetDict() const = 0; + virtual CPDF_StructTree* GetTree() const = 0; - virtual int CountKids() const = 0; + virtual const CFX_ByteString& GetType() const = 0; - virtual const CPDF_StructKid& GetKid(int index) const = 0; + virtual CPDF_StructElement* GetParent() const = 0; - virtual CFX_PtrArray* GetObjectArray() = 0; + virtual CPDF_Dictionary* GetDict() const = 0; - virtual CPDF_Object* GetAttr(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_BOOL bInheritable = FALSE, FX_FLOAT fLevel = 0.0F) = 0; + virtual int CountKids() const = 0; + virtual const CPDF_StructKid& GetKid(int index) const = 0; + virtual CFX_PtrArray* GetObjectArray() = 0; - virtual CFX_ByteString GetName(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, const CFX_ByteStringC& default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0; + virtual CPDF_Object* GetAttr(const CFX_ByteStringC& owner, + const CFX_ByteStringC& name, + FX_BOOL bInheritable = FALSE, + FX_FLOAT fLevel = 0.0F) = 0; - virtual FX_ARGB GetColor(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_ARGB default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0; + virtual CFX_ByteString GetName(const CFX_ByteStringC& owner, + const CFX_ByteStringC& name, + const CFX_ByteStringC& default_value, + FX_BOOL bInheritable = FALSE, + int subindex = -1) = 0; - virtual FX_FLOAT GetNumber(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, FX_FLOAT default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0; + virtual FX_ARGB GetColor(const CFX_ByteStringC& owner, + const CFX_ByteStringC& name, + FX_ARGB default_value, + FX_BOOL bInheritable = FALSE, + int subindex = -1) = 0; - virtual int GetInteger(const CFX_ByteStringC& owner, const CFX_ByteStringC& name, int default_value, FX_BOOL bInheritable = FALSE, int subindex = -1) = 0; + virtual FX_FLOAT GetNumber(const CFX_ByteStringC& owner, + const CFX_ByteStringC& name, + FX_FLOAT default_value, + FX_BOOL bInheritable = FALSE, + int subindex = -1) = 0; + virtual int GetInteger(const CFX_ByteStringC& owner, + const CFX_ByteStringC& name, + int default_value, + FX_BOOL bInheritable = FALSE, + int subindex = -1) = 0; }; #endif // CORE_INCLUDE_FPDFDOC_FPDF_TAGGED_H_ |