summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/fpdf_tagged.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-04-06 13:38:54 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-06 18:09:57 +0000
commit7f389615a0fca78532482d6f4070d18c5d2f9f5d (patch)
tree9e47feb57a5bfd57abe48eb0104c5952fe394ab0 /core/fpdfdoc/fpdf_tagged.h
parent25553aa8f74ddccbfcb3bb7b8f55d3f2ac00338f (diff)
downloadpdfium-7f389615a0fca78532482d6f4070d18c5d2f9f5d.tar.xz
Cleanup the tagged code
This CL removes the IPDF_Struct* classes in favour of their only implementation. The tagged code was split out into files matching the classes they contain. The friendship between CPDF_StructTree and CPDF_StructElement was broken in favour of accessors. Bug: pdfium:672 Change-Id: Iade83b608fb7168b3b0f41338d10d5fd8ab91a6e Reviewed-on: https://pdfium-review.googlesource.com/3820 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/fpdf_tagged.h')
-rw-r--r--core/fpdfdoc/fpdf_tagged.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/core/fpdfdoc/fpdf_tagged.h b/core/fpdfdoc/fpdf_tagged.h
deleted file mode 100644
index 5e7b1827c5..0000000000
--- a/core/fpdfdoc/fpdf_tagged.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef CORE_FPDFDOC_FPDF_TAGGED_H_
-#define CORE_FPDFDOC_FPDF_TAGGED_H_
-
-#include <memory>
-
-#include "core/fxge/fx_dib.h"
-
-class CPDF_Dictionary;
-class CPDF_Document;
-class IPDF_StructElement;
-
-class IPDF_StructTree {
- public:
- static std::unique_ptr<IPDF_StructTree> LoadPage(
- const CPDF_Document* pDoc,
- const CPDF_Dictionary* pPageDict);
-
-
- virtual int CountTopElements() const = 0;
- virtual IPDF_StructElement* GetTopElement(int i) const = 0;
-
- protected:
- friend std::default_delete<IPDF_StructTree>;
- virtual ~IPDF_StructTree() {}
-};
-
-class IPDF_StructElement {
- public:
- virtual IPDF_StructTree* GetTree() const = 0;
- virtual const CFX_ByteString& GetType() const = 0;
- virtual IPDF_StructElement* GetParent() const = 0;
- virtual CPDF_Dictionary* GetDict() const = 0;
- virtual int CountKids() const = 0;
- virtual IPDF_StructElement* GetKidIfElement(int index) const = 0;
-
- virtual CPDF_Object* GetAttr(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- bool bInheritable = false,
- float fLevel = 0.0F) = 0;
-
- virtual CFX_ByteString GetName(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- const CFX_ByteStringC& default_value,
- bool bInheritable = false,
- int subindex = -1) = 0;
-
- virtual FX_ARGB GetColor(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- FX_ARGB default_value,
- bool bInheritable = false,
- int subindex = -1) = 0;
-
- virtual float GetNumber(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- float default_value,
- bool bInheritable = false,
- int subindex = -1) = 0;
-
- virtual int GetInteger(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- int default_value,
- bool bInheritable = false,
- int subindex = -1) = 0;
-
- protected:
- virtual ~IPDF_StructElement() {}
-};
-
-#endif // CORE_FPDFDOC_FPDF_TAGGED_H_