summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/include
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-29 13:12:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-29 13:12:56 -0700
commit1727aee85f22d9403e6cd8a0f786b9b7c0a2740a (patch)
treef443fc8ec5e24a054169d1c566e6d1ad55236c77 /core/fpdfdoc/include
parent39c62fd528854eb4606b8f1917a777532b04db03 (diff)
downloadpdfium-1727aee85f22d9403e6cd8a0f786b9b7c0a2740a.tar.xz
Move core/fpdfdoc/include to core/fpdfdoc
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2374383003
Diffstat (limited to 'core/fpdfdoc/include')
-rw-r--r--core/fpdfdoc/include/cpdf_aaction.h51
-rw-r--r--core/fpdfdoc/include/cpdf_action.h59
-rw-r--r--core/fpdfdoc/include/cpdf_actionfields.h29
-rw-r--r--core/fpdfdoc/include/cpdf_annot.h131
-rw-r--r--core/fpdfdoc/include/cpdf_annotlist.h64
-rw-r--r--core/fpdfdoc/include/cpdf_bookmark.h33
-rw-r--r--core/fpdfdoc/include/cpdf_bookmarktree.h26
-rw-r--r--core/fpdfdoc/include/cpdf_defaultappearance.h52
-rw-r--r--core/fpdfdoc/include/cpdf_dest.h32
-rw-r--r--core/fpdfdoc/include/cpdf_docjsactions.h29
-rw-r--r--core/fpdfdoc/include/cpdf_filespec.h37
-rw-r--r--core/fpdfdoc/include/cpdf_formcontrol.h134
-rw-r--r--core/fpdfdoc/include/cpdf_formfield.h168
-rw-r--r--core/fpdfdoc/include/cpdf_iconfit.h30
-rw-r--r--core/fpdfdoc/include/cpdf_interform.h119
-rw-r--r--core/fpdfdoc/include/cpdf_link.h31
-rw-r--r--core/fpdfdoc/include/cpdf_linklist.h36
-rw-r--r--core/fpdfdoc/include/cpdf_metadata.h26
-rw-r--r--core/fpdfdoc/include/cpdf_nametree.h34
-rw-r--r--core/fpdfdoc/include/cpdf_occontext.h42
-rw-r--r--core/fpdfdoc/include/cpdf_variabletext.h245
-rw-r--r--core/fpdfdoc/include/cpdf_viewerpreferences.h34
-rw-r--r--core/fpdfdoc/include/cpvt_line.h25
-rw-r--r--core/fpdfdoc/include/cpvt_secprops.h30
-rw-r--r--core/fpdfdoc/include/cpvt_section.h22
-rw-r--r--core/fpdfdoc/include/cpvt_word.h38
-rw-r--r--core/fpdfdoc/include/cpvt_wordplace.h73
-rw-r--r--core/fpdfdoc/include/cpvt_wordprops.h58
-rw-r--r--core/fpdfdoc/include/cpvt_wordrange.h59
-rw-r--r--core/fpdfdoc/include/fpdf_tagged.h93
-rw-r--r--core/fpdfdoc/include/ipdf_formnotify.h32
-rw-r--r--core/fpdfdoc/include/ipvt_fontmap.h29
32 files changed, 0 insertions, 1901 deletions
diff --git a/core/fpdfdoc/include/cpdf_aaction.h b/core/fpdfdoc/include/cpdf_aaction.h
deleted file mode 100644
index b3a55da23e..0000000000
--- a/core/fpdfdoc/include/cpdf_aaction.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_AACTION_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_AACTION_H_
-
-#include "core/fpdfdoc/include/cpdf_action.h"
-
-class CPDF_Dictionary;
-
-class CPDF_AAction {
- public:
- enum AActionType {
- CursorEnter = 0,
- CursorExit,
- ButtonDown,
- ButtonUp,
- GetFocus,
- LoseFocus,
- PageOpen,
- PageClose,
- PageVisible,
- PageInvisible,
- OpenPage,
- ClosePage,
- KeyStroke,
- Format,
- Validate,
- Calculate,
- CloseDocument,
- SaveDocument,
- DocumentSaved,
- PrintDocument,
- DocumentPrinted
- };
-
- CPDF_AAction() : m_pDict(nullptr) {}
- explicit CPDF_AAction(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
-
- FX_BOOL ActionExist(AActionType eType) const;
- CPDF_Action GetAction(AActionType eType) const;
- CPDF_Dictionary* GetDict() const { return m_pDict; }
-
- private:
- CPDF_Dictionary* const m_pDict;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_AACTION_H_
diff --git a/core/fpdfdoc/include/cpdf_action.h b/core/fpdfdoc/include/cpdf_action.h
deleted file mode 100644
index 209f1f9f09..0000000000
--- a/core/fpdfdoc/include/cpdf_action.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_ACTION_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_ACTION_H_
-
-#include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h"
-#include "core/fpdfdoc/include/cpdf_dest.h"
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Document;
-
-class CPDF_Action {
- public:
- enum ActionType {
- Unknown = 0,
- GoTo,
- GoToR,
- GoToE,
- Launch,
- Thread,
- URI,
- Sound,
- Movie,
- Hide,
- Named,
- SubmitForm,
- ResetForm,
- ImportData,
- JavaScript,
- SetOCGState,
- Rendition,
- Trans,
- GoTo3DView
- };
-
- CPDF_Action() : m_pDict(nullptr) {}
- explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
-
- CPDF_Dictionary* GetDict() const { return m_pDict; }
- ActionType GetType() const;
- CPDF_Dest GetDest(CPDF_Document* pDoc) const;
- CFX_WideString GetFilePath() const;
- CFX_ByteString GetURI(CPDF_Document* pDoc) const;
- bool GetHideStatus() const { return m_pDict->GetBooleanFor("H", true); }
- CFX_ByteString GetNamedAction() const { return m_pDict->GetStringFor("N"); }
- uint32_t GetFlags() const { return m_pDict->GetIntegerFor("Flags"); }
- CFX_WideString GetJavaScript() const;
- size_t GetSubActionsCount() const;
- CPDF_Action GetSubAction(size_t iIndex) const;
-
- private:
- CPDF_Dictionary* const m_pDict;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_ACTION_H_
diff --git a/core/fpdfdoc/include/cpdf_actionfields.h b/core/fpdfdoc/include/cpdf_actionfields.h
deleted file mode 100644
index 0f38e1d469..0000000000
--- a/core/fpdfdoc/include/cpdf_actionfields.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_ACTIONFIELDS_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_ACTIONFIELDS_H_
-
-#include <stddef.h>
-
-#include <vector>
-
-class CPDF_Action;
-class CPDF_Object;
-
-class CPDF_ActionFields {
- public:
- explicit CPDF_ActionFields(const CPDF_Action* pAction) : m_pAction(pAction) {}
-
- size_t GetFieldsCount() const;
- std::vector<CPDF_Object*> GetAllFields() const;
- CPDF_Object* GetField(size_t iIndex) const;
-
- private:
- const CPDF_Action* const m_pAction;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_ACTIONFIELDS_H_
diff --git a/core/fpdfdoc/include/cpdf_annot.h b/core/fpdfdoc/include/cpdf_annot.h
deleted file mode 100644
index e88375a903..0000000000
--- a/core/fpdfdoc/include/cpdf_annot.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_ANNOT_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_
-
-#include <map>
-#include <memory>
-
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CFX_RenderDevice;
-class CPDF_Dictionary;
-class CPDF_Document;
-class CPDF_Form;
-class CPDF_Page;
-class CPDF_RenderContext;
-class CPDF_RenderOptions;
-class CPDF_Stream;
-
-#define ANNOTFLAG_INVISIBLE 0x0001
-#define ANNOTFLAG_HIDDEN 0x0002
-#define ANNOTFLAG_PRINT 0x0004
-#define ANNOTFLAG_NOZOOM 0x0008
-#define ANNOTFLAG_NOROTATE 0x0010
-#define ANNOTFLAG_NOVIEW 0x0020
-#define ANNOTFLAG_READONLY 0x0040
-#define ANNOTFLAG_LOCKED 0x0080
-#define ANNOTFLAG_TOGGLENOVIEW 0x0100
-
-class CPDF_Annot {
- public:
- enum AppearanceMode { Normal, Rollover, Down };
- enum class Subtype {
- UNKNOWN = 0,
- TEXT,
- LINK,
- FREETEXT,
- LINE,
- SQUARE,
- CIRCLE,
- POLYGON,
- POLYLINE,
- HIGHLIGHT,
- UNDERLINE,
- SQUIGGLY,
- STRIKEOUT,
- STAMP,
- CARET,
- INK,
- POPUP,
- FILEATTACHMENT,
- SOUND,
- MOVIE,
- WIDGET,
- SCREEN,
- PRINTERMARK,
- TRAPNET,
- WATERMARK,
- THREED,
- RICHMEDIA,
- XFAWIDGET
- };
-
- static bool IsAnnotationHidden(CPDF_Dictionary* pAnnotDict);
- static CPDF_Annot::Subtype StringToAnnotSubtype(
- const CFX_ByteString& sSubtype);
- static CFX_ByteString AnnotSubtypeToString(CPDF_Annot::Subtype nSubtype);
- static CFX_FloatRect RectFromQuadPoints(CPDF_Dictionary* pAnnotDict);
-
- CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument, bool bToOwnDict);
- ~CPDF_Annot();
-
- CPDF_Annot::Subtype GetSubtype() const;
- uint32_t GetFlags() const;
- CFX_FloatRect GetRect() const;
- const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; }
- CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; }
- CPDF_Document* GetDocument() const { return m_pDocument; }
-
- FX_BOOL DrawAppearance(CPDF_Page* pPage,
- CFX_RenderDevice* pDevice,
- const CFX_Matrix* pUser2Device,
- AppearanceMode mode,
- const CPDF_RenderOptions* pOptions);
- FX_BOOL DrawInContext(const CPDF_Page* pPage,
- CPDF_RenderContext* pContext,
- const CFX_Matrix* pUser2Device,
- AppearanceMode mode);
-
- void ClearCachedAP();
- void DrawBorder(CFX_RenderDevice* pDevice,
- const CFX_Matrix* pUser2Device,
- const CPDF_RenderOptions* pOptions);
- CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode);
- void SetOpenState(bool bOpenState) { m_bOpenState = bOpenState; }
- CPDF_Annot* GetPopupAnnot() const { return m_pPopupAnnot; }
- void SetPopupAnnot(CPDF_Annot* pAnnot) { m_pPopupAnnot = pAnnot; }
-
- private:
- void GenerateAPIfNeeded();
- bool ShouldDrawAnnotation();
-
- CFX_FloatRect RectForDrawing() const;
-
- // For regular annotations, |m_pAnnotDict| is not owned. For
- // our artificially created popup annotations, |m_pAnnotDict|
- // is owned by this class.
- bool m_bOwnedAnnotDict;
- CPDF_Dictionary* m_pAnnotDict;
- CPDF_Document* const m_pDocument;
- CPDF_Annot::Subtype m_nSubtype;
- std::map<CPDF_Stream*, std::unique_ptr<CPDF_Form>> m_APMap;
- // |m_bOpenState| is only set for popup annotations.
- bool m_bOpenState;
- bool m_bHasGeneratedAP;
- bool m_bIsTextMarkupAnnotation;
- // Not owned. If there is a valid pointer in |m_pPopupAnnot|,
- // then this annot is never a popup.
- CPDF_Annot* m_pPopupAnnot;
-};
-
-CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict,
- CPDF_Annot::AppearanceMode mode);
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_ANNOT_H_
diff --git a/core/fpdfdoc/include/cpdf_annotlist.h b/core/fpdfdoc/include/cpdf_annotlist.h
deleted file mode 100644
index f76ec64cd9..0000000000
--- a/core/fpdfdoc/include/cpdf_annotlist.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_ANNOTLIST_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_ANNOTLIST_H_
-
-#include <memory>
-#include <vector>
-
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CFX_RenderDevice;
-class CPDF_Annot;
-class CPDF_Document;
-class CPDF_Page;
-class CPDF_RenderContext;
-class CPDF_RenderOptions;
-
-class CPDF_AnnotList {
- public:
- explicit CPDF_AnnotList(CPDF_Page* pPage);
- ~CPDF_AnnotList();
-
- void DisplayAnnots(CPDF_Page* pPage,
- CPDF_RenderContext* pContext,
- FX_BOOL bPrinting,
- CFX_Matrix* pMatrix,
- FX_BOOL bShowWidget,
- CPDF_RenderOptions* pOptions);
-
- void DisplayAnnots(CPDF_Page* pPage,
- CFX_RenderDevice* pDevice,
- CPDF_RenderContext* pContext,
- FX_BOOL bPrinting,
- CFX_Matrix* pMatrix,
- uint32_t dwAnnotFlags,
- CPDF_RenderOptions* pOptions,
- FX_RECT* pClipRect);
-
- size_t Count() const { return m_AnnotList.size(); }
- CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index].get(); }
- const std::vector<std::unique_ptr<CPDF_Annot>>& All() const {
- return m_AnnotList;
- }
-
- private:
- void DisplayPass(CPDF_Page* pPage,
- CFX_RenderDevice* pDevice,
- CPDF_RenderContext* pContext,
- FX_BOOL bPrinting,
- CFX_Matrix* pMatrix,
- FX_BOOL bWidget,
- CPDF_RenderOptions* pOptions,
- FX_RECT* clip_rect);
-
- CPDF_Document* const m_pDocument;
- std::vector<std::unique_ptr<CPDF_Annot>> m_AnnotList;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_ANNOTLIST_H_
diff --git a/core/fpdfdoc/include/cpdf_bookmark.h b/core/fpdfdoc/include/cpdf_bookmark.h
deleted file mode 100644
index ba0b059572..0000000000
--- a/core/fpdfdoc/include/cpdf_bookmark.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_BOOKMARK_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_BOOKMARK_H_
-
-#include "core/fpdfdoc/include/cpdf_action.h"
-#include "core/fpdfdoc/include/cpdf_dest.h"
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Dictionary;
-class CPDF_Document;
-
-class CPDF_Bookmark {
- public:
- CPDF_Bookmark() : m_pDict(nullptr) {}
- explicit CPDF_Bookmark(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
-
- CPDF_Dictionary* GetDict() const { return m_pDict; }
- uint32_t GetColorRef() const;
- uint32_t GetFontStyle() const;
- CFX_WideString GetTitle() const;
- CPDF_Dest GetDest(CPDF_Document* pDocument) const;
- CPDF_Action GetAction() const;
-
- private:
- CPDF_Dictionary* m_pDict;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_BOOKMARK_H_
diff --git a/core/fpdfdoc/include/cpdf_bookmarktree.h b/core/fpdfdoc/include/cpdf_bookmarktree.h
deleted file mode 100644
index f496053383..0000000000
--- a/core/fpdfdoc/include/cpdf_bookmarktree.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_BOOKMARKTREE_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_BOOKMARKTREE_H_
-
-#include "core/fpdfdoc/include/cpdf_bookmark.h"
-
-class CPDF_Document;
-
-class CPDF_BookmarkTree {
- public:
- explicit CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
-
- CPDF_Bookmark GetFirstChild(const CPDF_Bookmark& parent) const;
- CPDF_Bookmark GetNextSibling(const CPDF_Bookmark& bookmark) const;
- CPDF_Document* GetDocument() const { return m_pDocument; }
-
- private:
- CPDF_Document* const m_pDocument;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_BOOKMARKTREE_H_
diff --git a/core/fpdfdoc/include/cpdf_defaultappearance.h b/core/fpdfdoc/include/cpdf_defaultappearance.h
deleted file mode 100644
index c0fd3de709..0000000000
--- a/core/fpdfdoc/include/cpdf_defaultappearance.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_DEFAULTAPPEARANCE_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_DEFAULTAPPEARANCE_H_
-
-#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-#include "core/fxge/include/fx_dib.h"
-
-enum class BorderStyle { SOLID, DASH, BEVELED, INSET, UNDERLINE };
-enum class PaintOperation { STROKE, FILL };
-
-class CPDF_DefaultAppearance {
- public:
- CPDF_DefaultAppearance() {}
- explicit CPDF_DefaultAppearance(const CFX_ByteString& csDA) : m_csDA(csDA) {}
-
- CPDF_DefaultAppearance(const CPDF_DefaultAppearance& cDA) {
- m_csDA = cDA.GetStr();
- }
-
- CFX_ByteString GetStr() const { return m_csDA; }
-
- FX_BOOL HasFont();
- CFX_ByteString GetFontString();
- void GetFont(CFX_ByteString& csFontNameTag, FX_FLOAT& fFontSize);
-
- FX_BOOL HasColor(PaintOperation nOperation = PaintOperation::FILL);
- CFX_ByteString GetColorString(
- PaintOperation nOperation = PaintOperation::FILL);
- void GetColor(int& iColorType,
- FX_FLOAT fc[4],
- PaintOperation nOperation = PaintOperation::FILL);
- void GetColor(FX_ARGB& color,
- int& iColorType,
- PaintOperation nOperation = PaintOperation::FILL);
-
- FX_BOOL HasTextMatrix();
- CFX_ByteString GetTextMatrixString();
- CFX_Matrix GetTextMatrix();
-
- private:
- CFX_ByteString m_csDA;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_DEFAULTAPPEARANCE_H_
diff --git a/core/fpdfdoc/include/cpdf_dest.h b/core/fpdfdoc/include/cpdf_dest.h
deleted file mode 100644
index 82d8a2b5cf..0000000000
--- a/core/fpdfdoc/include/cpdf_dest.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_DEST_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_DEST_H_
-
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CPDF_Document;
-class CPDF_Object;
-
-class CPDF_Dest {
- public:
- CPDF_Dest() : m_pObj(nullptr) {}
- explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) {}
-
- CPDF_Object* GetObject() const { return m_pObj; }
- CFX_ByteString GetRemoteName();
- int GetPageIndex(CPDF_Document* pDoc);
- uint32_t GetPageObjNum();
- int GetZoomMode();
- FX_FLOAT GetParam(int index);
-
- private:
- CPDF_Object* m_pObj;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_DEST_H_
diff --git a/core/fpdfdoc/include/cpdf_docjsactions.h b/core/fpdfdoc/include/cpdf_docjsactions.h
deleted file mode 100644
index 137b6afd53..0000000000
--- a/core/fpdfdoc/include/cpdf_docjsactions.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_DOCJSACTIONS_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_DOCJSACTIONS_H_
-
-#include "core/fpdfdoc/include/cpdf_action.h"
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Document;
-
-class CPDF_DocJSActions {
- public:
- explicit CPDF_DocJSActions(CPDF_Document* pDoc);
-
- int CountJSActions() const;
- CPDF_Action GetJSAction(int index, CFX_ByteString& csName) const;
- CPDF_Action GetJSAction(const CFX_ByteString& csName) const;
- int FindJSAction(const CFX_ByteString& csName) const;
- CPDF_Document* GetDocument() const { return m_pDocument; }
-
- private:
- CPDF_Document* const m_pDocument;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_DOCJSACTIONS_H_
diff --git a/core/fpdfdoc/include/cpdf_filespec.h b/core/fpdfdoc/include/cpdf_filespec.h
deleted file mode 100644
index 66f35fc202..0000000000
--- a/core/fpdfdoc/include/cpdf_filespec.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_FILESPEC_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_FILESPEC_H_
-
-#include "core/fxcrt/include/cfx_string_pool_template.h"
-#include "core/fxcrt/include/cfx_weak_ptr.h"
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Object;
-
-class CPDF_FileSpec {
- public:
- explicit CPDF_FileSpec(const CFX_WeakPtr<CFX_ByteStringPool>& pPool);
- explicit CPDF_FileSpec(CPDF_Object* pObj) : m_pObj(pObj) {}
-
- // Convert a platform dependent file name into pdf format.
- static CFX_WideString EncodeFileName(const CFX_WideStringC& filepath);
-
- // Convert a pdf file name into platform dependent format.
- static CFX_WideString DecodeFileName(const CFX_WideStringC& filepath);
-
- CPDF_Object* GetObj() const { return m_pObj; }
- bool GetFileName(CFX_WideString* wsFileName) const;
-
- // Set this file spec to refer to a file name (not a url).
- void SetFileName(const CFX_WideStringC& wsFileName);
-
- private:
- CPDF_Object* m_pObj;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_FILESPEC_H_
diff --git a/core/fpdfdoc/include/cpdf_formcontrol.h b/core/fpdfdoc/include/cpdf_formcontrol.h
deleted file mode 100644
index c73318f49e..0000000000
--- a/core/fpdfdoc/include/cpdf_formcontrol.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_FORMCONTROL_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_FORMCONTROL_H_
-
-#include "core/fpdfdoc/cpdf_apsettings.h"
-#include "core/fpdfdoc/include/cpdf_aaction.h"
-#include "core/fpdfdoc/include/cpdf_action.h"
-#include "core/fpdfdoc/include/cpdf_annot.h"
-#include "core/fpdfdoc/include/cpdf_annotlist.h"
-#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
-#include "core/fpdfdoc/include/cpdf_formfield.h"
-#include "core/fpdfdoc/include/cpdf_iconfit.h"
-#include "core/fpdfdoc/include/ipdf_formnotify.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxge/include/fx_dib.h"
-
-#define TEXTPOS_CAPTION 0
-#define TEXTPOS_ICON 1
-#define TEXTPOS_BELOW 2
-#define TEXTPOS_ABOVE 3
-#define TEXTPOS_RIGHT 4
-#define TEXTPOS_LEFT 5
-#define TEXTPOS_OVERLAID 6
-
-#define COLORTYPE_TRANSPARENT 0
-#define COLORTYPE_GRAY 1
-#define COLORTYPE_RGB 2
-#define COLORTYPE_CMYK 3
-
-class CFX_RenderDevice;
-class CPDF_Dictionary;
-class CPDF_Font;
-class CPDF_FormField;
-class CPDF_InterForm;
-class CPDF_OCContext;
-class CPDF_RenderOptions;
-class CPDF_Stream;
-
-class CPDF_FormControl {
- public:
- enum HighlightingMode { None = 0, Invert, Outline, Push, Toggle };
-
- CPDF_FormField::Type GetType() const { return m_pField->GetType(); }
- CPDF_InterForm* GetInterForm() const { return m_pForm; }
- CPDF_FormField* GetField() const { return m_pField; }
- CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; }
- CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectFor("Rect"); }
-
- void DrawControl(CFX_RenderDevice* pDevice,
- CFX_Matrix* pMatrix,
- CPDF_Page* pPage,
- CPDF_Annot::AppearanceMode mode,
- const CPDF_RenderOptions* pOptions = nullptr);
-
- CFX_ByteString GetCheckedAPState();
- CFX_WideString GetExportValue() const;
-
- bool IsChecked() const;
- bool IsDefaultChecked() const;
-
- HighlightingMode GetHighlightingMode();
- bool HasMKEntry(const CFX_ByteString& csEntry) const;
- int GetRotation();
-
- FX_ARGB GetBorderColor(int& iColorType) { return GetColor(iColorType, "BC"); }
-
- FX_FLOAT GetOriginalBorderColor(int index) {
- return GetOriginalColor(index, "BC");
- }
-
- void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) {
- GetOriginalColor(iColorType, fc, "BC");
- }
-
- FX_ARGB GetBackgroundColor(int& iColorType) {
- return GetColor(iColorType, "BG");
- }
-
- FX_FLOAT GetOriginalBackgroundColor(int index) {
- return GetOriginalColor(index, "BG");
- }
-
- void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) {
- GetOriginalColor(iColorType, fc, "BG");
- }
-
- CFX_WideString GetNormalCaption() { return GetCaption("CA"); }
- CFX_WideString GetRolloverCaption() { return GetCaption("RC"); }
- CFX_WideString GetDownCaption() { return GetCaption("AC"); }
-
- CPDF_Stream* GetNormalIcon() { return GetIcon("I"); }
- CPDF_Stream* GetRolloverIcon() { return GetIcon("RI"); }
- CPDF_Stream* GetDownIcon() { return GetIcon("IX"); }
- CPDF_IconFit GetIconFit();
-
- int GetTextPosition();
- CPDF_Action GetAction();
- CPDF_AAction GetAdditionalAction();
- CPDF_DefaultAppearance GetDefaultAppearance();
-
- CPDF_Font* GetDefaultControlFont();
- int GetControlAlignment();
-
- private:
- friend class CPDF_InterForm;
- friend class CPDF_FormField;
-
- CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict);
-
- CFX_ByteString GetOnStateName() const;
- void SetOnStateName(const CFX_ByteString& csOn);
- void CheckControl(FX_BOOL bChecked);
- FX_ARGB GetColor(int& iColorType, const CFX_ByteString& csEntry);
- FX_FLOAT GetOriginalColor(int index, const CFX_ByteString& csEntry);
- void GetOriginalColor(int& iColorType,
- FX_FLOAT fc[4],
- const CFX_ByteString& csEntry);
-
- CFX_WideString GetCaption(const CFX_ByteString& csEntry);
- CPDF_Stream* GetIcon(const CFX_ByteString& csEntry);
- CPDF_ApSettings GetMK() const;
-
- CPDF_FormField* const m_pField;
- CPDF_Dictionary* const m_pWidgetDict;
- CPDF_InterForm* const m_pForm;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_FORMCONTROL_H_
diff --git a/core/fpdfdoc/include/cpdf_formfield.h b/core/fpdfdoc/include/cpdf_formfield.h
deleted file mode 100644
index d39c6da4d4..0000000000
--- a/core/fpdfdoc/include/cpdf_formfield.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_FORMFIELD_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_FORMFIELD_H_
-
-#include "core/fpdfdoc/include/cpdf_aaction.h"
-#include "core/fpdfdoc/include/cpdf_formfield.h"
-#include "core/fxcrt/include/fx_basic.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-
-#define FIELDTYPE_UNKNOWN 0
-#define FIELDTYPE_PUSHBUTTON 1
-#define FIELDTYPE_CHECKBOX 2
-#define FIELDTYPE_RADIOBUTTON 3
-#define FIELDTYPE_COMBOBOX 4
-#define FIELDTYPE_LISTBOX 5
-#define FIELDTYPE_TEXTFIELD 6
-#define FIELDTYPE_SIGNATURE 7
-
-class CPDF_Dictionary;
-class CPDF_Font;
-class CPDF_FormControl;
-class CPDF_InterForm;
-class CPDF_String;
-
-CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict,
- const FX_CHAR* name,
- int nLevel = 0);
-CFX_WideString FPDF_GetFullName(CPDF_Dictionary* pFieldDict);
-
-class CPDF_FormField {
- public:
- enum Type {
- Unknown,
- PushButton,
- RadioButton,
- CheckBox,
- Text,
- RichText,
- File,
- ListBox,
- ComboBox,
- Sign
- };
-
- CFX_WideString GetFullName() const;
-
- Type GetType() const { return m_Type; }
- uint32_t GetFlags() const { return m_Flags; }
-
- CPDF_Dictionary* GetFieldDict() const { return m_pDict; }
- void SetFieldDict(CPDF_Dictionary* pDict) { m_pDict = pDict; }
-
- FX_BOOL ResetField(FX_BOOL bNotify = FALSE);
-
- int CountControls() const { return m_ControlList.GetSize(); }
-
- CPDF_FormControl* GetControl(int index) const {
- return m_ControlList.GetAt(index);
- }
-
- int GetControlIndex(const CPDF_FormControl* pControl) const;
- int GetFieldType() const;
-
- CPDF_AAction GetAdditionalAction() const;
- CFX_WideString GetAlternateName() const;
- CFX_WideString GetMappingName() const;
-
- uint32_t GetFieldFlags() const;
- CFX_ByteString GetDefaultStyle() const;
- CFX_WideString GetRichTextString() const;
-
- CFX_WideString GetValue() const;
- CFX_WideString GetDefaultValue() const;
- FX_BOOL SetValue(const CFX_WideString& value, FX_BOOL bNotify = FALSE);
-
- int GetMaxLen() const;
- int CountSelectedItems() const;
- int GetSelectedIndex(int index) const;
-
- FX_BOOL ClearSelection(FX_BOOL bNotify = FALSE);
- FX_BOOL IsItemSelected(int index) const;
- FX_BOOL SetItemSelection(int index,
- FX_BOOL bSelected,
- FX_BOOL bNotify = FALSE);
-
- FX_BOOL IsItemDefaultSelected(int index) const;
-
- int GetDefaultSelectedItem() const;
- int CountOptions() const;
-
- CFX_WideString GetOptionLabel(int index) const;
- CFX_WideString GetOptionValue(int index) const;
-
- int FindOption(CFX_WideString csOptLabel) const;
- int FindOptionValue(const CFX_WideString& csOptValue) const;
-
- FX_BOOL CheckControl(int iControlIndex, bool bChecked, bool bNotify = false);
-
- int GetTopVisibleIndex() const;
- int CountSelectedOptions() const;
-
- int GetSelectedOptionIndex(int index) const;
- FX_BOOL IsOptionSelected(int iOptIndex) const;
-
- FX_BOOL SelectOption(int iOptIndex,
- FX_BOOL bSelected,
- FX_BOOL bNotify = FALSE);
-
- FX_BOOL ClearSelectedOptions(FX_BOOL bNotify = FALSE);
-
-#ifdef PDF_ENABLE_XFA
- FX_BOOL ClearOptions(FX_BOOL bNotify = FALSE);
-
- int InsertOption(CFX_WideString csOptLabel,
- int index = -1,
- FX_BOOL bNotify = FALSE);
-#endif // PDF_ENABLE_XFA
-
- FX_FLOAT GetFontSize() const { return m_FontSize; }
- CPDF_Font* GetFont() const { return m_pFont; }
-
- private:
- friend class CPDF_InterForm;
- friend class CPDF_FormControl;
-
- CPDF_FormField(CPDF_InterForm* pForm, CPDF_Dictionary* pDict);
- ~CPDF_FormField();
-
- CFX_WideString GetValue(FX_BOOL bDefault) const;
- FX_BOOL SetValue(const CFX_WideString& value,
- FX_BOOL bDefault,
- FX_BOOL bNotify);
-
- void SyncFieldFlags();
- int FindListSel(CPDF_String* str);
- CFX_WideString GetOptionText(int index, int sub_index) const;
-
- void LoadDA();
- CFX_WideString GetCheckValue(FX_BOOL bDefault) const;
- FX_BOOL SetCheckValue(const CFX_WideString& value,
- FX_BOOL bDefault,
- FX_BOOL bNotify);
-
- bool NotifyBeforeSelectionChange(const CFX_WideString& value);
- void NotifyAfterSelectionChange();
-
- bool NotifyBeforeValueChange(const CFX_WideString& value);
- void NotifyAfterValueChange();
-
- bool NotifyListOrComboBoxBeforeChange(const CFX_WideString& value);
- void NotifyListOrComboBoxAfterChange();
-
- CPDF_FormField::Type m_Type;
- uint32_t m_Flags;
- CPDF_InterForm* m_pForm;
- CPDF_Dictionary* m_pDict;
- CFX_ArrayTemplate<CPDF_FormControl*> m_ControlList;
- FX_FLOAT m_FontSize;
- CPDF_Font* m_pFont;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_FORMFIELD_H_
diff --git a/core/fpdfdoc/include/cpdf_iconfit.h b/core/fpdfdoc/include/cpdf_iconfit.h
deleted file mode 100644
index a13730d8ce..0000000000
--- a/core/fpdfdoc/include/cpdf_iconfit.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_ICONFIT_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_ICONFIT_H_
-
-#include "core/fxcrt/include/fx_system.h"
-
-class CPDF_Dictionary;
-
-class CPDF_IconFit {
- public:
- enum ScaleMethod { Always = 0, Bigger, Smaller, Never };
-
- explicit CPDF_IconFit(const CPDF_Dictionary* pDict) : m_pDict(pDict) {}
-
- ScaleMethod GetScaleMethod();
- FX_BOOL IsProportionalScale();
- void GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom);
- bool GetFittingBounds();
- const CPDF_Dictionary* GetDict() const { return m_pDict; }
-
- private:
- const CPDF_Dictionary* const m_pDict;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_ICONFIT_H_
diff --git a/core/fpdfdoc/include/cpdf_interform.h b/core/fpdfdoc/include/cpdf_interform.h
deleted file mode 100644
index c5512d4699..0000000000
--- a/core/fpdfdoc/include/cpdf_interform.h
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_INTERFORM_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_INTERFORM_H_
-
-#include <map>
-#include <memory>
-#include <vector>
-
-#include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h"
-#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CFieldTree;
-class CFDF_Document;
-class CPDF_Document;
-class CPDF_Dictionary;
-class CPDF_Font;
-class CPDF_FormControl;
-class CPDF_FormField;
-class CPDF_Object;
-class CPDF_Page;
-class IPDF_FormNotify;
-
-CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict,
- CPDF_Document* pDocument,
- CFX_ByteString& csNameTag);
-
-class CPDF_InterForm {
- public:
- explicit CPDF_InterForm(CPDF_Document* pDocument);
- ~CPDF_InterForm();
-
- static void SetUpdateAP(bool bUpdateAP);
- static bool IsUpdateAPEnabled();
- static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* pResDict,
- const FX_CHAR* csType,
- int iMinLen,
- const FX_CHAR* csPrefix);
- static CPDF_Font* AddStandardFont(CPDF_Document* pDocument,
- CFX_ByteString csFontName);
- static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont);
- static uint8_t GetNativeCharSet();
- static CPDF_Font* AddNativeFont(uint8_t iCharSet, CPDF_Document* pDocument);
- static CPDF_Font* AddNativeFont(CPDF_Document* pDocument);
-
- size_t CountFields(const CFX_WideString& csFieldName) const;
- CPDF_FormField* GetField(uint32_t index,
- const CFX_WideString& csFieldName) const;
- CPDF_FormField* GetFieldByDict(CPDF_Dictionary* pFieldDict) const;
-
- CPDF_FormControl* GetControlAtPoint(CPDF_Page* pPage,
- FX_FLOAT pdf_x,
- FX_FLOAT pdf_y,
- int* z_order) const;
- CPDF_FormControl* GetControlByDict(const CPDF_Dictionary* pWidgetDict) const;
-
- FX_BOOL NeedConstructAP() const;
- int CountFieldsInCalculationOrder();
- CPDF_FormField* GetFieldInCalculationOrder(int index);
- int FindFieldInCalculationOrder(const CPDF_FormField* pField);
-
- CPDF_Font* GetFormFont(CFX_ByteString csNameTag);
- CPDF_DefaultAppearance GetDefaultAppearance() const;
- int GetFormAlignment() const;
-
- CPDF_FormField* CheckRequiredFields(
- const std::vector<CPDF_FormField*>* fields,
- bool bIncludeOrExclude) const;
-
- CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path,
- bool bSimpleFileSpec) const;
- CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path,
- const std::vector<CPDF_FormField*>& fields,
- bool bIncludeOrExclude,
- bool bSimpleFileSpec) const;
-
- bool ResetForm(const std::vector<CPDF_FormField*>& fields,
- bool bIncludeOrExclude,
- bool bNotify);
- bool ResetForm(bool bNotify);
-
- void SetFormNotify(IPDF_FormNotify* pNotify);
- FX_BOOL HasXFAForm() const;
- void FixPageFields(const CPDF_Page* pPage);
-
- private:
- friend class CPDF_FormControl;
- friend class CPDF_FormField;
-
- void LoadField(CPDF_Dictionary* pFieldDict, int nLevel);
- CPDF_FormField* AddTerminalField(CPDF_Dictionary* pFieldDict);
- CPDF_FormControl* AddControl(CPDF_FormField* pField,
- CPDF_Dictionary* pWidgetDict);
- void FDF_ImportField(CPDF_Dictionary* pField,
- const CFX_WideString& parent_name,
- FX_BOOL bNotify = FALSE,
- int nLevel = 0);
- bool ValidateFieldName(CFX_WideString& csNewFieldName,
- int iType,
- const CPDF_FormField* pExcludedField,
- const CPDF_FormControl* pExcludedControl) const;
-
- static bool s_bUpdateAP;
-
- CPDF_Document* const m_pDocument;
- CPDF_Dictionary* m_pFormDict;
- std::map<const CPDF_Dictionary*, CPDF_FormControl*> m_ControlMap;
- std::unique_ptr<CFieldTree> m_pFieldTree;
- CFX_ByteString m_bsEncoding;
- IPDF_FormNotify* m_pFormNotify;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_INTERFORM_H_
diff --git a/core/fpdfdoc/include/cpdf_link.h b/core/fpdfdoc/include/cpdf_link.h
deleted file mode 100644
index a3be3ccc90..0000000000
--- a/core/fpdfdoc/include/cpdf_link.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_LINK_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_LINK_H_
-
-#include "core/fpdfdoc/include/cpdf_action.h"
-#include "core/fpdfdoc/include/cpdf_dest.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-
-class CPDF_Dictionary;
-
-class CPDF_Link {
- public:
- CPDF_Link() : m_pDict(nullptr) {}
- explicit CPDF_Link(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
-
- CPDF_Dictionary* GetDict() const { return m_pDict; }
-
- CFX_FloatRect GetRect();
- CPDF_Dest GetDest(CPDF_Document* pDoc);
- CPDF_Action GetAction();
-
- private:
- CPDF_Dictionary* m_pDict;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_LINK_H_
diff --git a/core/fpdfdoc/include/cpdf_linklist.h b/core/fpdfdoc/include/cpdf_linklist.h
deleted file mode 100644
index dd9f5517d4..0000000000
--- a/core/fpdfdoc/include/cpdf_linklist.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_LINKLIST_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_LINKLIST_H_
-
-#include <map>
-#include <vector>
-
-#include "core/fpdfdoc/include/cpdf_link.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CPDF_Page;
-class CPDF_Dictionary;
-
-class CPDF_LinkList {
- public:
- CPDF_LinkList();
- ~CPDF_LinkList();
-
- CPDF_Link GetLinkAtPoint(CPDF_Page* pPage,
- FX_FLOAT pdf_x,
- FX_FLOAT pdf_y,
- int* z_order);
-
- private:
- const std::vector<CPDF_Dictionary*>* GetPageLinks(CPDF_Page* pPage);
- void LoadPageLinks(CPDF_Page* pPage, std::vector<CPDF_Dictionary*>* pList);
-
- std::map<uint32_t, std::vector<CPDF_Dictionary*>> m_PageMap;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_LINKLIST_H_
diff --git a/core/fpdfdoc/include/cpdf_metadata.h b/core/fpdfdoc/include/cpdf_metadata.h
deleted file mode 100644
index 31497dd33c..0000000000
--- a/core/fpdfdoc/include/cpdf_metadata.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_METADATA_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_METADATA_H_
-
-#include <memory>
-
-class CPDF_Document;
-class CXML_Element;
-
-class CPDF_Metadata {
- public:
- explicit CPDF_Metadata(CPDF_Document* pDoc);
- ~CPDF_Metadata();
-
- const CXML_Element* GetRoot() const;
-
- private:
- std::unique_ptr<CXML_Element> m_pXmlElement;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_METADATA_H_
diff --git a/core/fpdfdoc/include/cpdf_nametree.h b/core/fpdfdoc/include/cpdf_nametree.h
deleted file mode 100644
index 39a520ddfa..0000000000
--- a/core/fpdfdoc/include/cpdf_nametree.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_NAMETREE_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_NAMETREE_H_
-
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Array;
-class CPDF_Dictionary;
-class CPDF_Document;
-class CPDF_Object;
-
-class CPDF_NameTree {
- public:
- explicit CPDF_NameTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {}
- CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteString& category);
-
- CPDF_Object* LookupValue(int nIndex, CFX_ByteString& csName) const;
- CPDF_Object* LookupValue(const CFX_ByteString& csName) const;
- CPDF_Array* LookupNamedDest(CPDF_Document* pDoc, const CFX_ByteString& sName);
-
- int GetIndex(const CFX_ByteString& csName) const;
- size_t GetCount() const;
- CPDF_Dictionary* GetRoot() const { return m_pRoot; }
-
- private:
- CPDF_Dictionary* m_pRoot;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_NAMETREE_H_
diff --git a/core/fpdfdoc/include/cpdf_occontext.h b/core/fpdfdoc/include/cpdf_occontext.h
deleted file mode 100644
index 38e81705e5..0000000000
--- a/core/fpdfdoc/include/cpdf_occontext.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_OCCONTEXT_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_OCCONTEXT_H_
-
-#include <unordered_map>
-
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Array;
-class CPDF_Dictionary;
-class CPDF_Document;
-class CPDF_PageObject;
-
-class CPDF_OCContext {
- public:
- enum UsageType { View = 0, Design, Print, Export };
-
- CPDF_OCContext(CPDF_Document* pDoc, UsageType eUsageType);
- ~CPDF_OCContext();
-
- bool CheckOCGVisible(const CPDF_Dictionary* pOCGDict);
- bool CheckObjectVisible(const CPDF_PageObject* pObj);
-
- private:
- bool LoadOCGStateFromConfig(const CFX_ByteString& csConfig,
- const CPDF_Dictionary* pOCGDict) const;
- bool LoadOCGState(const CPDF_Dictionary* pOCGDict) const;
- bool GetOCGVisible(const CPDF_Dictionary* pOCGDict);
- bool GetOCGVE(CPDF_Array* pExpression, int nLevel);
- bool LoadOCMDState(const CPDF_Dictionary* pOCMDDict);
-
- CPDF_Document* const m_pDocument;
- const UsageType m_eUsageType;
- std::unordered_map<const CPDF_Dictionary*, bool> m_OCGStates;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_OCCONTEXT_H_
diff --git a/core/fpdfdoc/include/cpdf_variabletext.h b/core/fpdfdoc/include/cpdf_variabletext.h
deleted file mode 100644
index 31cf75ff0b..0000000000
--- a/core/fpdfdoc/include/cpdf_variabletext.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_VARIABLETEXT_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_
-
-#include <memory>
-
-#include "core/fpdfdoc/cpvt_arraytemplate.h"
-#include "core/fpdfdoc/cpvt_floatrect.h"
-#include "core/fpdfdoc/cpvt_lineinfo.h"
-#include "core/fpdfdoc/include/cpvt_line.h"
-#include "core/fpdfdoc/include/cpvt_wordplace.h"
-#include "core/fpdfdoc/include/cpvt_wordrange.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-#include "core/fxge/include/fx_font.h"
-
-class CSection;
-class IPVT_FontMap;
-
-struct CPVT_SecProps;
-struct CPVT_Section;
-struct CPVT_SectionInfo;
-struct CPVT_Word;
-struct CPVT_WordInfo;
-struct CPVT_WordProps;
-
-#define VARIABLETEXT_HALF 0.5f
-
-class CPDF_VariableText {
- public:
- enum class ScriptType { Normal, Super, Sub };
-
- class Iterator {
- public:
- explicit Iterator(CPDF_VariableText* pVT);
- ~Iterator();
-
- FX_BOOL NextWord();
- FX_BOOL PrevWord();
- FX_BOOL NextLine();
- FX_BOOL PrevLine();
- FX_BOOL NextSection();
- FX_BOOL PrevSection();
- FX_BOOL SetWord(const CPVT_Word& word);
- FX_BOOL GetWord(CPVT_Word& word) const;
- FX_BOOL GetLine(CPVT_Line& line) const;
- FX_BOOL GetSection(CPVT_Section& section) const;
- FX_BOOL SetSection(const CPVT_Section& section);
- void SetAt(int32_t nWordIndex);
- void SetAt(const CPVT_WordPlace& place);
- const CPVT_WordPlace& GetAt() const { return m_CurPos; }
-
- private:
- CPVT_WordPlace m_CurPos;
- CPDF_VariableText* const m_pVT;
- };
-
- class Provider {
- public:
- explicit Provider(IPVT_FontMap* pFontMap);
- virtual ~Provider();
-
- virtual int32_t GetCharWidth(int32_t nFontIndex, uint16_t word);
- virtual int32_t GetTypeAscent(int32_t nFontIndex);
- virtual int32_t GetTypeDescent(int32_t nFontIndex);
- virtual int32_t GetWordFontIndex(uint16_t word,
- int32_t charset,
- int32_t nFontIndex);
- virtual FX_BOOL IsLatinWord(uint16_t word);
- virtual int32_t GetDefaultFontIndex();
-
- private:
- IPVT_FontMap* const m_pFontMap;
- };
-
- CPDF_VariableText();
- ~CPDF_VariableText();
-
- void SetProvider(CPDF_VariableText::Provider* pProvider);
- CPDF_VariableText::Iterator* GetIterator();
-
- void SetContentRect(const CPVT_FloatRect& rect);
- CFX_FloatRect GetContentRect() const;
- void SetPlateRect(const CFX_FloatRect& rect);
- const CFX_FloatRect& GetPlateRect() const;
-
- void SetAlignment(int32_t nFormat) { m_nAlignment = nFormat; }
- void SetPasswordChar(uint16_t wSubWord) { m_wSubWord = wSubWord; }
- void SetLimitChar(int32_t nLimitChar) { m_nLimitChar = nLimitChar; }
- void SetCharSpace(FX_FLOAT fCharSpace) { m_fCharSpace = fCharSpace; }
- void SetMultiLine(FX_BOOL bMultiLine) { m_bMultiLine = bMultiLine; }
- void SetAutoReturn(FX_BOOL bAuto) { m_bLimitWidth = bAuto; }
- void SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; }
- void SetCharArray(int32_t nCharArray) { m_nCharArray = nCharArray; }
- void SetAutoFontSize(FX_BOOL bAuto) { m_bAutoFontSize = bAuto; }
- void Initialize();
-
- FX_BOOL IsValid() const { return m_bInitial; }
-
- void RearrangeAll();
- void RearrangePart(const CPVT_WordRange& PlaceRange);
- void ResetAll();
- void SetText(const CFX_WideString& text);
- CPVT_WordPlace InsertWord(const CPVT_WordPlace& place,
- uint16_t word,
- int32_t charset,
- const CPVT_WordProps* pWordProps);
- CPVT_WordPlace InsertSection(const CPVT_WordPlace& place,
- const CPVT_SecProps* pSecProps,
- const CPVT_WordProps* pWordProps);
- CPVT_WordPlace InsertText(const CPVT_WordPlace& place, const FX_WCHAR* text);
- CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange);
- CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place);
- CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place);
-
- int32_t GetTotalWords() const;
- FX_FLOAT GetFontSize() const { return m_fFontSize; }
- int32_t GetAlignment() const { return m_nAlignment; }
- uint16_t GetPasswordChar() const { return GetSubWord(); }
- int32_t GetCharArray() const { return m_nCharArray; }
- int32_t GetLimitChar() const { return m_nLimitChar; }
- FX_BOOL IsMultiLine() const { return m_bMultiLine; }
- int32_t GetHorzScale() const { return m_nHorzScale; }
- FX_FLOAT GetCharSpace() const { return m_fCharSpace; }
- CPVT_WordPlace GetBeginWordPlace() const;
- CPVT_WordPlace GetEndWordPlace() const;
- CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const;
- CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const;
- CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const;
- CPVT_WordPlace GetUpWordPlace(const CPVT_WordPlace& place,
- const CFX_FloatPoint& point) const;
- CPVT_WordPlace GetDownWordPlace(const CPVT_WordPlace& place,
- const CFX_FloatPoint& point) const;
- CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const;
- CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const;
- CPVT_WordPlace GetSectionBeginPlace(const CPVT_WordPlace& place) const;
- CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const;
- void UpdateWordPlace(CPVT_WordPlace& place) const;
- CPVT_WordPlace AdjustLineHeader(const CPVT_WordPlace& place,
- FX_BOOL bPrevOrNext) const;
- int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const;
- CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
-
- uint16_t GetSubWord() const { return m_wSubWord; }
-
- FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; }
- FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; }
- CFX_SizeF GetPlateSize() const;
- CFX_FloatPoint GetBTPoint() const;
- CFX_FloatPoint GetETPoint() const;
-
- CFX_FloatPoint InToOut(const CFX_FloatPoint& point) const;
- CFX_FloatPoint OutToIn(const CFX_FloatPoint& point) const;
- CFX_FloatRect InToOut(const CPVT_FloatRect& rect) const;
- CPVT_FloatRect OutToIn(const CFX_FloatRect& rect) const;
-
- private:
- friend class CTypeset;
- friend class CSection;
-
- int32_t GetCharWidth(int32_t nFontIndex, uint16_t Word, uint16_t SubWord);
- int32_t GetTypeAscent(int32_t nFontIndex);
- int32_t GetTypeDescent(int32_t nFontIndex);
- int32_t GetWordFontIndex(uint16_t word, int32_t charset, int32_t nFontIndex);
- int32_t GetDefaultFontIndex();
- FX_BOOL IsLatinWord(uint16_t word);
-
- CPVT_WordPlace AddSection(const CPVT_WordPlace& place,
- const CPVT_SectionInfo& secinfo);
- CPVT_WordPlace AddLine(const CPVT_WordPlace& place,
- const CPVT_LineInfo& lineinfo);
- CPVT_WordPlace AddWord(const CPVT_WordPlace& place,
- const CPVT_WordInfo& wordinfo);
- FX_BOOL GetWordInfo(const CPVT_WordPlace& place, CPVT_WordInfo& wordinfo);
- FX_BOOL SetWordInfo(const CPVT_WordPlace& place,
- const CPVT_WordInfo& wordinfo);
- FX_BOOL GetLineInfo(const CPVT_WordPlace& place, CPVT_LineInfo& lineinfo);
- FX_BOOL GetSectionInfo(const CPVT_WordPlace& place,
- CPVT_SectionInfo& secinfo);
- FX_FLOAT GetWordFontSize(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetWordWidth(int32_t nFontIndex,
- uint16_t Word,
- uint16_t SubWord,
- FX_FLOAT fCharSpace,
- int32_t nHorzScale,
- FX_FLOAT fFontSize,
- FX_FLOAT fWordTail);
- FX_FLOAT GetWordWidth(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetWordAscent(const CPVT_WordInfo& WordInfo, FX_FLOAT fFontSize);
- FX_FLOAT GetWordDescent(const CPVT_WordInfo& WordInfo, FX_FLOAT fFontSize);
- FX_FLOAT GetWordAscent(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetWordDescent(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetLineAscent(const CPVT_SectionInfo& SecInfo);
- FX_FLOAT GetLineDescent(const CPVT_SectionInfo& SecInfo);
- FX_FLOAT GetFontAscent(int32_t nFontIndex, FX_FLOAT fFontSize);
- FX_FLOAT GetFontDescent(int32_t nFontIndex, FX_FLOAT fFontSize);
- int32_t GetWordFontIndex(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetCharSpace(const CPVT_WordInfo& WordInfo);
- int32_t GetHorzScale(const CPVT_WordInfo& WordInfo);
- FX_FLOAT GetLineLeading(const CPVT_SectionInfo& SecInfo);
- FX_FLOAT GetLineIndent(const CPVT_SectionInfo& SecInfo);
- int32_t GetAlignment(const CPVT_SectionInfo& SecInfo);
-
- void ClearSectionRightWords(const CPVT_WordPlace& place);
-
- FX_BOOL ClearEmptySection(const CPVT_WordPlace& place);
- void ClearEmptySections(const CPVT_WordRange& PlaceRange);
- void LinkLatterSection(const CPVT_WordPlace& place);
- void ClearWords(const CPVT_WordRange& PlaceRange);
- CPVT_WordPlace ClearLeftWord(const CPVT_WordPlace& place);
- CPVT_WordPlace ClearRightWord(const CPVT_WordPlace& place);
-
- CPVT_FloatRect Rearrange(const CPVT_WordRange& PlaceRange);
- FX_FLOAT GetAutoFontSize();
- bool IsBigger(FX_FLOAT fFontSize) const;
- CPVT_FloatRect RearrangeSections(const CPVT_WordRange& PlaceRange);
-
- void ResetSectionArray();
-
- CPVT_ArrayTemplate<CSection*> m_SectionArray;
- int32_t m_nLimitChar;
- int32_t m_nCharArray;
- FX_BOOL m_bMultiLine;
- FX_BOOL m_bLimitWidth;
- FX_BOOL m_bAutoFontSize;
- int32_t m_nAlignment;
- FX_FLOAT m_fLineLeading;
- FX_FLOAT m_fCharSpace;
- int32_t m_nHorzScale;
- uint16_t m_wSubWord;
- FX_FLOAT m_fFontSize;
- FX_BOOL m_bInitial;
- CPDF_VariableText::Provider* m_pVTProvider;
- std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator;
- CFX_FloatRect m_rcPlate;
- CPVT_FloatRect m_rcContent;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_
diff --git a/core/fpdfdoc/include/cpdf_viewerpreferences.h b/core/fpdfdoc/include/cpdf_viewerpreferences.h
deleted file mode 100644
index d93c261183..0000000000
--- a/core/fpdfdoc/include/cpdf_viewerpreferences.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPDF_VIEWERPREFERENCES_H_
-#define CORE_FPDFDOC_INCLUDE_CPDF_VIEWERPREFERENCES_H_
-
-#include "core/fxcrt/include/fx_string.h"
-#include "core/fxcrt/include/fx_system.h"
-
-class CPDF_Array;
-class CPDF_Dictionary;
-class CPDF_Document;
-
-class CPDF_ViewerPreferences {
- public:
- explicit CPDF_ViewerPreferences(CPDF_Document* pDoc);
- ~CPDF_ViewerPreferences();
-
- FX_BOOL IsDirectionR2L() const;
- FX_BOOL PrintScaling() const;
- int32_t NumCopies() const;
- CPDF_Array* PrintPageRange() const;
- CFX_ByteString Duplex() const;
-
- private:
- CPDF_Dictionary* GetViewerPreferences() const;
-
- CPDF_Document* const m_pDoc;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPDF_VIEWERPREFERENCES_H_
diff --git a/core/fpdfdoc/include/cpvt_line.h b/core/fpdfdoc/include/cpvt_line.h
deleted file mode 100644
index d6c74edb4e..0000000000
--- a/core/fpdfdoc/include/cpvt_line.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_LINE_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_LINE_H_
-
-#include "core/fpdfdoc/include/cpvt_wordplace.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-#include "core/fxcrt/include/fx_system.h"
-
-struct CPVT_Line {
- CPVT_Line() : fLineWidth(0.0f), fLineAscent(0.0f), fLineDescent(0.0f) {}
-
- CPVT_WordPlace lineplace;
- CPVT_WordPlace lineEnd;
- CFX_FloatPoint ptLine;
- FX_FLOAT fLineWidth;
- FX_FLOAT fLineAscent;
- FX_FLOAT fLineDescent;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_LINE_H_
diff --git a/core/fpdfdoc/include/cpvt_secprops.h b/core/fpdfdoc/include/cpvt_secprops.h
deleted file mode 100644
index 67878f8625..0000000000
--- a/core/fpdfdoc/include/cpvt_secprops.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_SECPROPS_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_SECPROPS_H_
-
-#include "core/fxcrt/include/fx_system.h"
-
-struct CPVT_SecProps {
- CPVT_SecProps() : fLineLeading(0.0f), fLineIndent(0.0f), nAlignment(0) {}
-
- CPVT_SecProps(FX_FLOAT lineLeading, FX_FLOAT lineIndent, int32_t alignment)
- : fLineLeading(lineLeading),
- fLineIndent(lineIndent),
- nAlignment(alignment) {}
-
- CPVT_SecProps(const CPVT_SecProps& other)
- : fLineLeading(other.fLineLeading),
- fLineIndent(other.fLineIndent),
- nAlignment(other.nAlignment) {}
-
- FX_FLOAT fLineLeading;
- FX_FLOAT fLineIndent;
- int32_t nAlignment;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_SECPROPS_H_
diff --git a/core/fpdfdoc/include/cpvt_section.h b/core/fpdfdoc/include/cpvt_section.h
deleted file mode 100644
index a9820bd5f9..0000000000
--- a/core/fpdfdoc/include/cpvt_section.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_SECTION_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_SECTION_H_
-
-#include "core/fpdfdoc/include/cpvt_secprops.h"
-#include "core/fpdfdoc/include/cpvt_wordplace.h"
-#include "core/fpdfdoc/include/cpvt_wordprops.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-
-struct CPVT_Section {
- CPVT_WordPlace secplace;
- CFX_FloatRect rcSection;
- CPVT_SecProps SecProps;
- CPVT_WordProps WordProps;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_SECTION_H_
diff --git a/core/fpdfdoc/include/cpvt_word.h b/core/fpdfdoc/include/cpvt_word.h
deleted file mode 100644
index b2af4ec6fa..0000000000
--- a/core/fpdfdoc/include/cpvt_word.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_WORD_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_WORD_H_
-
-#include "core/fpdfdoc/include/cpvt_wordplace.h"
-#include "core/fpdfdoc/include/cpvt_wordprops.h"
-#include "core/fxcrt/include/fx_system.h"
-
-struct CPVT_Word {
- CPVT_Word();
-
- uint16_t Word;
- int32_t nCharset;
- CPVT_WordPlace WordPlace;
- CFX_FloatPoint ptWord;
- FX_FLOAT fAscent;
- FX_FLOAT fDescent;
- FX_FLOAT fWidth;
- int32_t nFontIndex;
- FX_FLOAT fFontSize;
- CPVT_WordProps WordProps;
-};
-
-inline CPVT_Word::CPVT_Word()
- : Word(0),
- nCharset(0),
- fAscent(0.0f),
- fDescent(0.0f),
- fWidth(0.0f),
- nFontIndex(-1),
- fFontSize(0.0f) {}
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_WORD_H_
diff --git a/core/fpdfdoc/include/cpvt_wordplace.h b/core/fpdfdoc/include/cpvt_wordplace.h
deleted file mode 100644
index ef7907797e..0000000000
--- a/core/fpdfdoc/include/cpvt_wordplace.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_WORDPLACE_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_WORDPLACE_H_
-
-#include "core/fxcrt/include/fx_system.h"
-
-struct CPVT_WordPlace {
- CPVT_WordPlace() : nSecIndex(-1), nLineIndex(-1), nWordIndex(-1) {}
-
- CPVT_WordPlace(int32_t other_nSecIndex,
- int32_t other_nLineIndex,
- int32_t other_nWordIndex) {
- nSecIndex = other_nSecIndex;
- nLineIndex = other_nLineIndex;
- nWordIndex = other_nWordIndex;
- }
-
- void Default() { nSecIndex = nLineIndex = nWordIndex = -1; }
-
- bool operator==(const CPVT_WordPlace& wp) const {
- return wp.nSecIndex == nSecIndex && wp.nLineIndex == nLineIndex &&
- wp.nWordIndex == nWordIndex;
- }
-
- FX_BOOL operator!=(const CPVT_WordPlace& wp) const { return !(*this == wp); }
-
- inline int32_t WordCmp(const CPVT_WordPlace& wp) const {
- if (nSecIndex > wp.nSecIndex)
- return 1;
- if (nSecIndex < wp.nSecIndex)
- return -1;
- if (nLineIndex > wp.nLineIndex)
- return 1;
- if (nLineIndex < wp.nLineIndex)
- return -1;
- if (nWordIndex > wp.nWordIndex)
- return 1;
- if (nWordIndex < wp.nWordIndex)
- return -1;
- return 0;
- }
-
- inline int32_t LineCmp(const CPVT_WordPlace& wp) const {
- if (nSecIndex > wp.nSecIndex)
- return 1;
- if (nSecIndex < wp.nSecIndex)
- return -1;
- if (nLineIndex > wp.nLineIndex)
- return 1;
- if (nLineIndex < wp.nLineIndex)
- return -1;
- return 0;
- }
-
- inline int32_t SecCmp(const CPVT_WordPlace& wp) const {
- if (nSecIndex > wp.nSecIndex)
- return 1;
- if (nSecIndex < wp.nSecIndex)
- return -1;
- return 0;
- }
-
- int32_t nSecIndex;
- int32_t nLineIndex;
- int32_t nWordIndex;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_WORDPLACE_H_
diff --git a/core/fpdfdoc/include/cpvt_wordprops.h b/core/fpdfdoc/include/cpvt_wordprops.h
deleted file mode 100644
index 690a5e1950..0000000000
--- a/core/fpdfdoc/include/cpvt_wordprops.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_WORDPROPS_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_WORDPROPS_H_
-
-#include "core/fpdfdoc/include/cpdf_variabletext.h"
-#include "core/fxcrt/include/fx_system.h"
-#include "core/fxge/include/fx_dib.h"
-
-struct CPVT_WordProps {
- CPVT_WordProps()
- : nFontIndex(-1),
- fFontSize(0.0f),
- dwWordColor(0),
- nScriptType(CPDF_VariableText::ScriptType::Normal),
- nWordStyle(0),
- fCharSpace(0.0f),
- nHorzScale(0) {}
-
- CPVT_WordProps(int32_t fontIndex,
- FX_FLOAT fontSize,
- FX_COLORREF wordColor = 0,
- CPDF_VariableText::ScriptType scriptType =
- CPDF_VariableText::ScriptType::Normal,
- int32_t wordStyle = 0,
- FX_FLOAT charSpace = 0,
- int32_t horzScale = 100)
- : nFontIndex(fontIndex),
- fFontSize(fontSize),
- dwWordColor(wordColor),
- nScriptType(scriptType),
- nWordStyle(wordStyle),
- fCharSpace(charSpace),
- nHorzScale(horzScale) {}
-
- CPVT_WordProps(const CPVT_WordProps& other)
- : nFontIndex(other.nFontIndex),
- fFontSize(other.fFontSize),
- dwWordColor(other.dwWordColor),
- nScriptType(other.nScriptType),
- nWordStyle(other.nWordStyle),
- fCharSpace(other.fCharSpace),
- nHorzScale(other.nHorzScale) {}
-
- int32_t nFontIndex;
- FX_FLOAT fFontSize;
- FX_COLORREF dwWordColor;
- CPDF_VariableText::ScriptType nScriptType;
- int32_t nWordStyle;
- FX_FLOAT fCharSpace;
- int32_t nHorzScale;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_WORDPROPS_H_
diff --git a/core/fpdfdoc/include/cpvt_wordrange.h b/core/fpdfdoc/include/cpvt_wordrange.h
deleted file mode 100644
index 3c6f05b159..0000000000
--- a/core/fpdfdoc/include/cpvt_wordrange.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 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_INCLUDE_CPVT_WORDRANGE_H_
-#define CORE_FPDFDOC_INCLUDE_CPVT_WORDRANGE_H_
-
-#include "core/fpdfdoc/include/cpvt_wordplace.h"
-#include "core/fxcrt/include/fx_system.h"
-
-struct CPVT_WordRange {
- CPVT_WordRange() {}
-
- CPVT_WordRange(const CPVT_WordPlace& begin, const CPVT_WordPlace& end) {
- Set(begin, end);
- }
-
- void Default() {
- BeginPos.Default();
- EndPos.Default();
- }
-
- void Set(const CPVT_WordPlace& begin, const CPVT_WordPlace& end) {
- BeginPos = begin;
- EndPos = end;
- SwapWordPlace();
- }
-
- void SetBeginPos(const CPVT_WordPlace& begin) {
- BeginPos = begin;
- SwapWordPlace();
- }
-
- void SetEndPos(const CPVT_WordPlace& end) {
- EndPos = end;
- SwapWordPlace();
- }
-
- FX_BOOL IsExist() const { return BeginPos != EndPos; }
-
- FX_BOOL operator!=(const CPVT_WordRange& wr) const {
- return wr.BeginPos != BeginPos || wr.EndPos != EndPos;
- }
-
- void SwapWordPlace() {
- if (BeginPos.WordCmp(EndPos) > 0) {
- CPVT_WordPlace place = EndPos;
- EndPos = BeginPos;
- BeginPos = place;
- }
- }
-
- CPVT_WordPlace BeginPos;
- CPVT_WordPlace EndPos;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_CPVT_WORDRANGE_H_
diff --git a/core/fpdfdoc/include/fpdf_tagged.h b/core/fpdfdoc/include/fpdf_tagged.h
deleted file mode 100644
index 43d69e8db9..0000000000
--- a/core/fpdfdoc/include/fpdf_tagged.h
+++ /dev/null
@@ -1,93 +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_INCLUDE_FPDF_TAGGED_H_
-#define CORE_FPDFDOC_INCLUDE_FPDF_TAGGED_H_
-
-#include "core/fxge/include/fx_dib.h"
-
-class CPDF_Dictionary;
-class CPDF_Document;
-class IPDF_StructElement;
-
-class IPDF_StructTree {
- public:
- static IPDF_StructTree* LoadDoc(const CPDF_Document* pDoc);
- static IPDF_StructTree* LoadPage(const CPDF_Document* pDoc,
- const CPDF_Dictionary* pPageDict);
-
- virtual ~IPDF_StructTree() {}
-
- virtual int CountTopElements() const = 0;
- 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() {}
-
- 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 const CPDF_StructKid& GetKid(int index) 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 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_ARGB GetColor(const CFX_ByteStringC& owner,
- const CFX_ByteStringC& name,
- FX_ARGB 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_FPDFDOC_INCLUDE_FPDF_TAGGED_H_
diff --git a/core/fpdfdoc/include/ipdf_formnotify.h b/core/fpdfdoc/include/ipdf_formnotify.h
deleted file mode 100644
index 49bb84d81e..0000000000
--- a/core/fpdfdoc/include/ipdf_formnotify.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 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_INCLUDE_IPDF_FORMNOTIFY_H_
-#define CORE_FPDFDOC_INCLUDE_IPDF_FORMNOTIFY_H_
-
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_FormField;
-class CPDF_InterForm;
-
-class IPDF_FormNotify {
- public:
- virtual ~IPDF_FormNotify() {}
-
- virtual int BeforeValueChange(CPDF_FormField* pField,
- const CFX_WideString& csValue) = 0;
- virtual void AfterValueChange(CPDF_FormField* pField) = 0;
- virtual int BeforeSelectionChange(CPDF_FormField* pField,
- const CFX_WideString& csValue) = 0;
- virtual void AfterSelectionChange(CPDF_FormField* pField) = 0;
- virtual void AfterCheckedStatusChange(CPDF_FormField* pField) = 0;
- virtual int BeforeFormReset(CPDF_InterForm* pForm) = 0;
- virtual void AfterFormReset(CPDF_InterForm* pForm) = 0;
- virtual int BeforeFormImportData(CPDF_InterForm* pForm) = 0;
- virtual void AfterFormImportData(CPDF_InterForm* pForm) = 0;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_IPDF_FORMNOTIFY_H_
diff --git a/core/fpdfdoc/include/ipvt_fontmap.h b/core/fpdfdoc/include/ipvt_fontmap.h
deleted file mode 100644
index 9835d5ec12..0000000000
--- a/core/fpdfdoc/include/ipvt_fontmap.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 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_INCLUDE_IPVT_FONTMAP_H_
-#define CORE_FPDFDOC_INCLUDE_IPVT_FONTMAP_H_
-
-#include <stdint.h>
-
-#include "core/fxcrt/include/fx_string.h"
-
-class CPDF_Font;
-
-class IPVT_FontMap {
- public:
- virtual ~IPVT_FontMap() {}
-
- virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0;
- virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
- virtual int32_t GetWordFontIndex(uint16_t word,
- int32_t charset,
- int32_t nFontIndex) = 0;
- virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) = 0;
- virtual int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) = 0;
-};
-
-#endif // CORE_FPDFDOC_INCLUDE_IPVT_FONTMAP_H_