summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp1
-rw-r--r--core/fpdfapi/edit/cpdf_flateencoder.cpp1
-rw-r--r--core/fpdfapi/edit/cpdf_flateencoder.h2
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp1
-rw-r--r--core/fpdfapi/font/cfx_stockfontarray.cpp3
-rw-r--r--core/fpdfapi/font/cpdf_cmapmanager.cpp1
-rw-r--r--core/fpdfapi/page/cpdf_meshstream.cpp1
-rw-r--r--core/fpdfapi/page/cpdf_sampledfunc.cpp1
-rw-r--r--core/fpdfapi/page/cpdf_streamparser.h3
-rw-r--r--core/fpdfapi/parser/cpdf_object_walker.h6
-rw-r--r--core/fpdfapi/parser/cpdf_stream.h1
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.cpp1
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.h3
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp2
-rw-r--r--core/fpdfdoc/cpdf_aaction.cpp4
-rw-r--r--core/fpdfdoc/cpdf_action.cpp13
-rw-r--r--core/fpdfdoc/cpdf_action.h8
-rw-r--r--core/fpdfdoc/cpdf_annot.cpp1
-rw-r--r--core/fpdfdoc/cpdf_annotlist.cpp1
-rw-r--r--core/fpdfdoc/cpdf_bookmark.cpp1
-rw-r--r--core/fpdfdoc/cpdf_bookmarktree.cpp3
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.cpp1
-rw-r--r--core/fpdfdoc/cpdf_formcontrol.cpp7
-rw-r--r--core/fpdfdoc/cpdf_formcontrol.h2
-rw-r--r--core/fpdfdoc/cpdf_formfield.cpp5
-rw-r--r--core/fpdfdoc/cpdf_formfield.h17
-rw-r--r--core/fpdfdoc/cpdf_interform.cpp1
-rw-r--r--core/fpdfdoc/cpdf_link.cpp5
-rw-r--r--core/fpdfdoc/cpdf_linklist.cpp5
-rw-r--r--core/fpdfdoc/cpdf_occontext.cpp1
-rw-r--r--core/fpdfdoc/cpdf_structtree.cpp6
-rw-r--r--core/fpdfdoc/cpdf_viewerpreferences.cpp3
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp1
-rw-r--r--fpdfsdk/cpdfsdk_annotiterator.cpp3
-rw-r--r--fpdfsdk/cpdfsdk_baannot.cpp1
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp1
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp1
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp1
-rw-r--r--fpdfsdk/cpdfsdk_pageview.cpp1
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp1
-rw-r--r--fpdfsdk/fpdf_attachment.cpp1
-rw-r--r--fpdfsdk/fpdf_catalog.cpp1
-rw-r--r--fpdfsdk/fpdf_catalog_unittest.cpp1
-rw-r--r--fpdfsdk/fpdf_doc.cpp1
-rw-r--r--fpdfsdk/fpdf_doc_unittest.cpp1
-rw-r--r--fpdfsdk/fpdf_editimg.cpp1
-rw-r--r--fpdfsdk/fpdf_editpage.cpp1
-rw-r--r--fpdfsdk/fpdf_ext.cpp1
-rw-r--r--fpdfsdk/fpdf_flatten.cpp1
-rw-r--r--fpdfsdk/fpdf_formfill.cpp1
-rw-r--r--fpdfsdk/fpdf_ppo.cpp1
-rw-r--r--fpdfsdk/fpdf_save.cpp1
-rw-r--r--fpdfsdk/fpdf_transformpage.cpp1
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp1
-rw-r--r--fpdfsdk/pwl/cpwl_icon.cpp1
-rw-r--r--fxjs/cjs_document.cpp1
-rw-r--r--fxjs/xfa/cjx_layoutpseudomodel.cpp1
-rw-r--r--xfa/fgas/font/cfgas_pdffontmgr.cpp1
-rw-r--r--xfa/fgas/font/cfgas_pdffontmgr.h1
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp1
-rw-r--r--xfa/fxfa/parser/cxfa_treelist.cpp1
61 files changed, 107 insertions, 35 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index 0823146b15..a42cfaa852 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/edit/cpdf_flateencoder.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_crypto_handler.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_parser.h"
diff --git a/core/fpdfapi/edit/cpdf_flateencoder.cpp b/core/fpdfapi/edit/cpdf_flateencoder.cpp
index a42b256ed2..ba04d7d938 100644
--- a/core/fpdfapi/edit/cpdf_flateencoder.cpp
+++ b/core/fpdfapi/edit/cpdf_flateencoder.cpp
@@ -9,6 +9,7 @@
#include <memory>
#include "constants/stream_dict_common.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
diff --git a/core/fpdfapi/edit/cpdf_flateencoder.h b/core/fpdfapi/edit/cpdf_flateencoder.h
index 14ca7cec16..5fc5fe947f 100644
--- a/core/fpdfapi/edit/cpdf_flateencoder.h
+++ b/core/fpdfapi/edit/cpdf_flateencoder.h
@@ -9,13 +9,13 @@
#include <memory>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/maybe_owned.h"
#include "core/fxcrt/retain_ptr.h"
#include "third_party/base/span.h"
+class CPDF_Dictionary;
class CPDF_Stream;
class CPDF_FlateEncoder {
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
index 99bb42e3b4..249dd8ef0d 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
@@ -13,6 +13,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/page/cpdf_pathobject.h"
#include "core/fpdfapi/page/cpdf_textobject.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_parser.h"
diff --git a/core/fpdfapi/font/cfx_stockfontarray.cpp b/core/fpdfapi/font/cfx_stockfontarray.cpp
index 3b61e11f36..0aa984dec9 100644
--- a/core/fpdfapi/font/cfx_stockfontarray.cpp
+++ b/core/fpdfapi/font/cfx_stockfontarray.cpp
@@ -9,9 +9,10 @@
#include <memory>
#include <utility>
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fxcrt/fx_memory.h"
-CFX_StockFontArray::CFX_StockFontArray() {}
+CFX_StockFontArray::CFX_StockFontArray() = default;
CFX_StockFontArray::~CFX_StockFontArray() {
for (size_t i = 0; i < FX_ArraySize(m_StockFonts); ++i) {
diff --git a/core/fpdfapi/font/cpdf_cmapmanager.cpp b/core/fpdfapi/font/cpdf_cmapmanager.cpp
index c33759cd11..8eebd89b30 100644
--- a/core/fpdfapi/font/cpdf_cmapmanager.cpp
+++ b/core/fpdfapi/font/cpdf_cmapmanager.cpp
@@ -10,6 +10,7 @@
#include "core/fpdfapi/font/cpdf_cid2unicodemap.h"
#include "core/fpdfapi/font/cpdf_cmap.h"
+#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
CPDF_CMapManager::CPDF_CMapManager() {}
diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp
index 57a5dd1da1..7503ccb625 100644
--- a/core/fpdfapi/page/cpdf_meshstream.cpp
+++ b/core/fpdfapi/page/cpdf_meshstream.cpp
@@ -9,6 +9,7 @@
#include "core/fpdfapi/page/cpdf_colorspace.h"
#include "core/fpdfapi/page/cpdf_function.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "third_party/base/span.h"
namespace {
diff --git a/core/fpdfapi/page/cpdf_sampledfunc.cpp b/core/fpdfapi/page/cpdf_sampledfunc.cpp
index 143aeb4f8a..d898daadc5 100644
--- a/core/fpdfapi/page/cpdf_sampledfunc.cpp
+++ b/core/fpdfapi/page/cpdf_sampledfunc.cpp
@@ -7,6 +7,7 @@
#include "core/fpdfapi/page/cpdf_sampledfunc.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fxcrt/cfx_bitstream.h"
#include "core/fxcrt/cfx_fixedbufgrow.h"
#include "core/fxcrt/fx_safe_types.h"
diff --git a/core/fpdfapi/page/cpdf_streamparser.h b/core/fpdfapi/page/cpdf_streamparser.h
index 062527813c..af181ffbd1 100644
--- a/core/fpdfapi/page/cpdf_streamparser.h
+++ b/core/fpdfapi/page/cpdf_streamparser.h
@@ -10,7 +10,6 @@
#include <memory>
#include <utility>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_object.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
@@ -18,6 +17,8 @@
#include "core/fxcrt/weak_ptr.h"
#include "third_party/base/span.h"
+class CPDF_Dictionary;
+
class CPDF_StreamParser {
public:
enum SyntaxType { EndOfData, Number, Keyword, Name, Others };
diff --git a/core/fpdfapi/parser/cpdf_object_walker.h b/core/fpdfapi/parser/cpdf_object_walker.h
index e0fd35de29..0af683c01c 100644
--- a/core/fpdfapi/parser/cpdf_object_walker.h
+++ b/core/fpdfapi/parser/cpdf_object_walker.h
@@ -8,9 +8,11 @@
#include <memory>
#include <stack>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
+#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr.h"
+class CPDF_Object;
+
// Walk on all non-null sub-objects in an object in depth, include itself,
// like in flat list.
class CPDF_ObjectWalker {
@@ -42,7 +44,7 @@ class CPDF_ObjectWalker {
size_t current_depth() const { return current_depth_; }
const CPDF_Object* GetParent() const { return parent_object_.Get(); }
- ByteString dictionary_key() const { return dict_key_; }
+ const ByteString& dictionary_key() const { return dict_key_; }
private:
static std::unique_ptr<SubobjectIterator> MakeIterator(
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index aada80e35c..4f1eb05478 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -11,7 +11,6 @@
#include <set>
#include <sstream>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_object.h"
#include "core/fxcrt/fx_stream.h"
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.cpp b/core/fpdfapi/parser/cpdf_stream_acc.cpp
index 7956124c62..c87e404186 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc.cpp
@@ -8,6 +8,7 @@
#include <utility>
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
CPDF_StreamAcc::CPDF_StreamAcc(const CPDF_Stream* pStream)
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h
index e725041e80..37e21d26d8 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.h
+++ b/core/fpdfapi/parser/cpdf_stream_acc.h
@@ -9,7 +9,6 @@
#include <memory>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -17,6 +16,8 @@
#include "core/fxcrt/retain_ptr.h"
#include "third_party/base/span.h"
+class CPDF_Dictionary;
+
class CPDF_StreamAcc final : public Retainable {
public:
template <typename T, typename... Args>
diff --git a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
index 1fbb342548..146bd4b77b 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
@@ -4,8 +4,8 @@
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
-
#include "core/fxcrt/cfx_memorystream.h"
#include "core/fxcrt/fx_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/core/fpdfdoc/cpdf_aaction.cpp b/core/fpdfdoc/cpdf_aaction.cpp
index 8d954697b4..109e82b406 100644
--- a/core/fpdfdoc/cpdf_aaction.cpp
+++ b/core/fpdfdoc/cpdf_aaction.cpp
@@ -6,6 +6,8 @@
#include "core/fpdfdoc/cpdf_aaction.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
+
namespace {
constexpr const char* g_sAATypes[] = {
@@ -43,7 +45,7 @@ CPDF_AAction::CPDF_AAction(const CPDF_Dictionary* pDict) : m_pDict(pDict) {}
CPDF_AAction::CPDF_AAction(const CPDF_AAction& that) = default;
-CPDF_AAction::~CPDF_AAction() {}
+CPDF_AAction::~CPDF_AAction() = default;
bool CPDF_AAction::ActionExist(AActionType eType) const {
return m_pDict && m_pDict->KeyExist(g_sAATypes[eType]);
diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp
index 49d143a1bd..6238b05299 100644
--- a/core/fpdfdoc/cpdf_action.cpp
+++ b/core/fpdfdoc/cpdf_action.cpp
@@ -8,6 +8,7 @@
#include "constants/stream_dict_common.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfdoc/cpdf_filespec.h"
#include "core/fpdfdoc/cpdf_nametree.h"
@@ -103,6 +104,18 @@ ByteString CPDF_Action::GetURI(const CPDF_Document* pDoc) const {
return csURI;
}
+bool CPDF_Action::GetHideStatus() const {
+ return m_pDict->GetBooleanFor("H", true);
+}
+
+ByteString CPDF_Action::GetNamedAction() const {
+ return m_pDict->GetStringFor("N");
+}
+
+uint32_t CPDF_Action::GetFlags() const {
+ return m_pDict->GetIntegerFor("Flags");
+}
+
WideString CPDF_Action::GetJavaScript() const {
WideString csJS;
if (!m_pDict)
diff --git a/core/fpdfdoc/cpdf_action.h b/core/fpdfdoc/cpdf_action.h
index 43bf123b71..f0f86796eb 100644
--- a/core/fpdfdoc/cpdf_action.h
+++ b/core/fpdfdoc/cpdf_action.h
@@ -7,10 +7,10 @@
#ifndef CORE_FPDFDOC_CPDF_ACTION_H_
#define CORE_FPDFDOC_CPDF_ACTION_H_
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfdoc/cpdf_dest.h"
#include "core/fxcrt/fx_string.h"
+class CPDF_Dictionary;
class CPDF_Document;
class CPDF_Action {
@@ -46,9 +46,9 @@ class CPDF_Action {
CPDF_Dest GetDest(CPDF_Document* pDoc) const;
WideString GetFilePath() const;
ByteString GetURI(const CPDF_Document* pDoc) const;
- bool GetHideStatus() const { return m_pDict->GetBooleanFor("H", true); }
- ByteString GetNamedAction() const { return m_pDict->GetStringFor("N"); }
- uint32_t GetFlags() const { return m_pDict->GetIntegerFor("Flags"); }
+ bool GetHideStatus() const;
+ ByteString GetNamedAction() const;
+ uint32_t GetFlags() const;
WideString GetJavaScript() const;
size_t GetSubActionsCount() const;
CPDF_Action GetSubAction(size_t iIndex) const;
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index 89bcdee108..432cf8c528 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -13,6 +13,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_boolean.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp
index 496fcc6db3..c6e0f63c4b 100644
--- a/core/fpdfdoc/cpdf_annotlist.cpp
+++ b/core/fpdfdoc/cpdf_annotlist.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
diff --git a/core/fpdfdoc/cpdf_bookmark.cpp b/core/fpdfdoc/cpdf_bookmark.cpp
index 34398439c5..7f7958b52a 100644
--- a/core/fpdfdoc/cpdf_bookmark.cpp
+++ b/core/fpdfdoc/cpdf_bookmark.cpp
@@ -10,6 +10,7 @@
#include <vector>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfdoc/cpdf_nametree.h"
#include "core/fxge/fx_dib.h"
diff --git a/core/fpdfdoc/cpdf_bookmarktree.cpp b/core/fpdfdoc/cpdf_bookmarktree.cpp
index 3b178f01b1..fc72db9c4a 100644
--- a/core/fpdfdoc/cpdf_bookmarktree.cpp
+++ b/core/fpdfdoc/cpdf_bookmarktree.cpp
@@ -6,11 +6,12 @@
#include "core/fpdfdoc/cpdf_bookmarktree.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
CPDF_BookmarkTree::CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
-CPDF_BookmarkTree::~CPDF_BookmarkTree() {}
+CPDF_BookmarkTree::~CPDF_BookmarkTree() = default;
CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild(
const CPDF_Bookmark& parent) const {
diff --git a/core/fpdfdoc/cpdf_docjsactions.cpp b/core/fpdfdoc/cpdf_docjsactions.cpp
index 2f6c5b2f1d..2e6560b949 100644
--- a/core/fpdfdoc/cpdf_docjsactions.cpp
+++ b/core/fpdfdoc/cpdf_docjsactions.cpp
@@ -6,6 +6,7 @@
#include "core/fpdfdoc/cpdf_docjsactions.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfdoc/cpdf_nametree.h"
CPDF_DocJSActions::CPDF_DocJSActions(CPDF_Document* pDoc) : m_pDocument(pDoc) {
diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp
index 64c3dcaf46..fcf2175f9d 100644
--- a/core/fpdfdoc/cpdf_formcontrol.cpp
+++ b/core/fpdfdoc/cpdf_formcontrol.cpp
@@ -10,6 +10,7 @@
#include "core/fpdfapi/page/cpdf_form.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
@@ -32,7 +33,11 @@ CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField,
m_pWidgetDict(pWidgetDict),
m_pForm(m_pField->GetForm()) {}
-CPDF_FormControl::~CPDF_FormControl() {}
+CPDF_FormControl::~CPDF_FormControl() = default;
+
+CFX_FloatRect CPDF_FormControl::GetRect() const {
+ return m_pWidgetDict->GetRectFor("Rect");
+}
ByteString CPDF_FormControl::GetOnStateName() const {
ASSERT(GetType() == CPDF_FormField::CheckBox ||
diff --git a/core/fpdfdoc/cpdf_formcontrol.h b/core/fpdfdoc/cpdf_formcontrol.h
index e3a84e3b55..d29be14ed6 100644
--- a/core/fpdfdoc/cpdf_formcontrol.h
+++ b/core/fpdfdoc/cpdf_formcontrol.h
@@ -48,7 +48,7 @@ class CPDF_FormControl {
const CPDF_InterForm* GetInterForm() const { return m_pForm.Get(); }
CPDF_FormField* GetField() const { return m_pField; }
CPDF_Dictionary* GetWidget() const { return m_pWidgetDict.Get(); }
- CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectFor("Rect"); }
+ CFX_FloatRect GetRect() const;
void DrawControl(CFX_RenderDevice* pDevice,
CFX_Matrix* pMatrix,
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index 7694aea898..4ff853dc9a 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -13,6 +13,7 @@
#include "constants/form_flags.h"
#include "core/fpdfapi/parser/cfdf_document.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
@@ -303,6 +304,10 @@ ByteString CPDF_FormField::GetDefaultStyle() const {
return pObj ? pObj->GetString() : "";
}
+void CPDF_FormField::SetOpt(std::unique_ptr<CPDF_Object> pOpt) {
+ m_pDict->SetFor("Opt", std::move(pOpt));
+}
+
WideString CPDF_FormField::GetValue(bool bDefault) const {
if (GetType() == CheckBox || GetType() == RadioButton)
return GetCheckValue(bDefault);
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index 1f070848c7..13771fc983 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -17,6 +17,13 @@
#include "core/fxcrt/unowned_ptr.h"
#include "third_party/base/stl_util.h"
+class CPDF_Dictionary;
+class CPDF_Font;
+class CPDF_FormControl;
+class CPDF_InterForm;
+class CPDF_Object;
+class CPDF_String;
+
enum class NotificationOption { kDoNotNotify = 0, kNotify };
enum class FormFieldType : uint8_t {
@@ -70,12 +77,6 @@ constexpr FormFieldType kFormFieldTypes[kFormFieldTypeCount] = {
#endif // PDF_ENABLE_XFA
};
-class CPDF_Dictionary;
-class CPDF_Font;
-class CPDF_FormControl;
-class CPDF_InterForm;
-class CPDF_String;
-
const CPDF_Object* FPDF_GetFieldAttr(const CPDF_Dictionary* pFieldDict,
const char* name);
CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, const char* name);
@@ -178,9 +179,7 @@ class CPDF_FormField {
m_ControlList.emplace_back(pFormControl);
}
- void SetOpt(std::unique_ptr<CPDF_Object> pOpt) {
- m_pDict->SetFor("Opt", std::move(pOpt));
- }
+ void SetOpt(std::unique_ptr<CPDF_Object> pOpt);
private:
WideString GetValue(bool bDefault) const;
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index 8a88791ee9..207dc73d77 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -15,6 +15,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cfdf_document.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
diff --git a/core/fpdfdoc/cpdf_link.cpp b/core/fpdfdoc/cpdf_link.cpp
index f7aec4087e..d5f24b1c46 100644
--- a/core/fpdfdoc/cpdf_link.cpp
+++ b/core/fpdfdoc/cpdf_link.cpp
@@ -7,15 +7,16 @@
#include "core/fpdfdoc/cpdf_link.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfdoc/cpdf_nametree.h"
-CPDF_Link::CPDF_Link() {}
+CPDF_Link::CPDF_Link() = default;
CPDF_Link::CPDF_Link(CPDF_Dictionary* pDict) : m_pDict(pDict) {}
CPDF_Link::CPDF_Link(const CPDF_Link& that) = default;
-CPDF_Link::~CPDF_Link() {}
+CPDF_Link::~CPDF_Link() = default;
CFX_FloatRect CPDF_Link::GetRect() {
return m_pDict->GetRectFor("Rect");
diff --git a/core/fpdfdoc/cpdf_linklist.cpp b/core/fpdfdoc/cpdf_linklist.cpp
index 0f56612e66..43b4d45510 100644
--- a/core/fpdfdoc/cpdf_linklist.cpp
+++ b/core/fpdfdoc/cpdf_linklist.cpp
@@ -8,10 +8,11 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
-CPDF_LinkList::CPDF_LinkList() {}
+CPDF_LinkList::CPDF_LinkList() = default;
-CPDF_LinkList::~CPDF_LinkList() {}
+CPDF_LinkList::~CPDF_LinkList() = default;
const std::vector<CPDF_Dictionary*>* CPDF_LinkList::GetPageLinks(
CPDF_Page* pPage) {
diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp
index 727696bdae..f1a83b0450 100644
--- a/core/fpdfdoc/cpdf_occontext.cpp
+++ b/core/fpdfdoc/cpdf_occontext.cpp
@@ -8,6 +8,7 @@
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
namespace {
diff --git a/core/fpdfdoc/cpdf_structtree.cpp b/core/fpdfdoc/cpdf_structtree.cpp
index d0a67876b9..4f8ce0eea6 100644
--- a/core/fpdfdoc/cpdf_structtree.cpp
+++ b/core/fpdfdoc/cpdf_structtree.cpp
@@ -7,6 +7,7 @@
#include "core/fpdfdoc/cpdf_structtree.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
@@ -37,10 +38,9 @@ std::unique_ptr<CPDF_StructTree> CPDF_StructTree::LoadPage(
CPDF_StructTree::CPDF_StructTree(const CPDF_Document* pDoc)
: m_pTreeRoot(pDoc->GetRoot()->GetDictFor("StructTreeRoot")),
- m_pRoleMap(m_pTreeRoot ? m_pTreeRoot->GetDictFor("RoleMap") : nullptr),
- m_pPage(nullptr) {}
+ m_pRoleMap(m_pTreeRoot ? m_pTreeRoot->GetDictFor("RoleMap") : nullptr) {}
-CPDF_StructTree::~CPDF_StructTree() {}
+CPDF_StructTree::~CPDF_StructTree() = default;
void CPDF_StructTree::LoadPageTree(const CPDF_Dictionary* pPageDict) {
m_pPage = pPageDict;
diff --git a/core/fpdfdoc/cpdf_viewerpreferences.cpp b/core/fpdfdoc/cpdf_viewerpreferences.cpp
index 3359d6344f..0481d5c9c3 100644
--- a/core/fpdfdoc/cpdf_viewerpreferences.cpp
+++ b/core/fpdfdoc/cpdf_viewerpreferences.cpp
@@ -6,13 +6,14 @@
#include "core/fpdfdoc/cpdf_viewerpreferences.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
CPDF_ViewerPreferences::CPDF_ViewerPreferences(const CPDF_Document* pDoc)
: m_pDoc(pDoc) {}
-CPDF_ViewerPreferences::~CPDF_ViewerPreferences() {}
+CPDF_ViewerPreferences::~CPDF_ViewerPreferences() = default;
bool CPDF_ViewerPreferences::IsDirectionR2L() const {
const CPDF_Dictionary* pDict = GetViewerPreferences();
diff --git a/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp b/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
index b66d8b0651..37e8536def 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/base/ptr_util.h"
diff --git a/fpdfsdk/cpdfsdk_annotiterator.cpp b/fpdfsdk/cpdfsdk_annotiterator.cpp
index d85dbe46eb..f1919ab77c 100644
--- a/fpdfsdk/cpdfsdk_annotiterator.cpp
+++ b/fpdfsdk/cpdfsdk_annotiterator.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include "core/fpdfapi/page/cpdf_page.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "fpdfsdk/cpdfsdk_annot.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
@@ -46,7 +47,7 @@ CPDFSDK_AnnotIterator::CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView,
GenerateResults();
}
-CPDFSDK_AnnotIterator::~CPDFSDK_AnnotIterator() {}
+CPDFSDK_AnnotIterator::~CPDFSDK_AnnotIterator() = default;
CPDFSDK_Annot* CPDFSDK_AnnotIterator::GetFirstAnnot() {
return m_Annots.empty() ? nullptr : m_Annots.front();
diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp
index e49a200480..5fe3411d78 100644
--- a/fpdfsdk/cpdfsdk_baannot.cpp
+++ b/fpdfsdk/cpdfsdk_baannot.cpp
@@ -10,6 +10,7 @@
#include <utility>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index c9bb7c94fd..155fcc0455 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -10,6 +10,7 @@
#include <utility>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfdoc/cpdf_docjsactions.h"
#include "fpdfsdk/cpdfsdk_actionhandler.h"
#include "fpdfsdk/cpdfsdk_annothandlermgr.h"
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index 2d2d78aded..dc8dc80cdc 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -10,6 +10,7 @@
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfdoc/cpdf_annot.h"
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index d8f999ec72..b7b7109402 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -16,6 +16,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cfdf_document.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfdoc/cpdf_actionfields.h"
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index ff87ea8465..408dba4b2e 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -9,6 +9,7 @@
#include <memory>
#include <vector>
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
#include "core/fpdfdoc/cpdf_annotlist.h"
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 2c549d8c90..748f5d2989 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -11,6 +11,7 @@
#include "core/fpdfapi/font/cpdf_font.h"
#include "core/fpdfapi/page/cpdf_page.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
diff --git a/fpdfsdk/fpdf_attachment.cpp b/fpdfsdk/fpdf_attachment.cpp
index 7bc168025a..692e5ddb76 100644
--- a/fpdfsdk/fpdf_attachment.cpp
+++ b/fpdfsdk/fpdf_attachment.cpp
@@ -10,6 +10,7 @@
#include "constants/stream_dict_common.h"
#include "core/fdrm/crypto/fx_crypt.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
diff --git a/fpdfsdk/fpdf_catalog.cpp b/fpdfsdk/fpdf_catalog.cpp
index af6e40a0ad..97bddde05d 100644
--- a/fpdfsdk/fpdf_catalog.cpp
+++ b/fpdfsdk/fpdf_catalog.cpp
@@ -4,6 +4,7 @@
#include "public/fpdf_catalog.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
diff --git a/fpdfsdk/fpdf_catalog_unittest.cpp b/fpdfsdk/fpdf_catalog_unittest.cpp
index 425a1ae6a7..b6b65cba29 100644
--- a/fpdfsdk/fpdf_catalog_unittest.cpp
+++ b/fpdfsdk/fpdf_catalog_unittest.cpp
@@ -7,6 +7,7 @@
#include <memory>
#include "core/fpdfapi/cpdf_modulemgr.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_parser.h"
diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp
index e79c36e3e0..b8f50c7ccb 100644
--- a/fpdfsdk/fpdf_doc.cpp
+++ b/fpdfsdk/fpdf_doc.cpp
@@ -11,6 +11,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfdoc/cpdf_bookmark.h"
diff --git a/fpdfsdk/fpdf_doc_unittest.cpp b/fpdfsdk/fpdf_doc_unittest.cpp
index db9bcdc97c..929c2a5143 100644
--- a/fpdfsdk/fpdf_doc_unittest.cpp
+++ b/fpdfsdk/fpdf_doc_unittest.cpp
@@ -9,6 +9,7 @@
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_null.h"
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index 04d7af0f41..231ec6d714 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/render/cpdf_dibbase.h"
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 193dd76091..13ec33b490 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -21,6 +21,7 @@
#include "core/fpdfapi/page/cpdf_pathobject.h"
#include "core/fpdfapi/page/cpdf_shadingobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_string.h"
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 23c3d468c1..ce9ae28e95 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -7,6 +7,7 @@
#include "public/fpdf_ext.h"
#include "core/fpdfapi/cpdf_modulemgr.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfdoc/cpdf_interform.h"
#include "core/fpdfdoc/cpdf_metadata.h"
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 6f9adf136d..bc0344feeb 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -15,6 +15,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 056559abe8..0bd0f5e008 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -10,6 +10,7 @@
#include <vector>
#include "core/fpdfapi/page/cpdf_page.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
#include "core/fpdfdoc/cpdf_formcontrol.h"
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index 4e47a00694..1d093a1f3d 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -16,6 +16,7 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_number.h"
diff --git a/fpdfsdk/fpdf_save.cpp b/fpdfsdk/fpdf_save.cpp
index 7d3fee9e4d..4c171caed9 100644
--- a/fpdfsdk/fpdf_save.cpp
+++ b/fpdfsdk/fpdf_save.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/edit/cpdf_creator.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 87f39ed072..33f49b8e1b 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -16,6 +16,7 @@
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/page/cpdf_path.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_reference.h"
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 5e00bff78e..db58c8724a 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -10,6 +10,7 @@
#include <utility>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fxcrt/retain_ptr.h"
diff --git a/fpdfsdk/pwl/cpwl_icon.cpp b/fpdfsdk/pwl/cpwl_icon.cpp
index 567a5786e6..f0232c4ae4 100644
--- a/fpdfsdk/pwl/cpwl_icon.cpp
+++ b/fpdfsdk/pwl/cpwl_icon.cpp
@@ -10,6 +10,7 @@
#include <sstream>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "fpdfsdk/pwl/cpwl_wnd.h"
diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp
index ddaa33e38a..497bc08e4e 100644
--- a/fxjs/cjs_document.cpp
+++ b/fxjs/cjs_document.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/page/cpdf_pageobject.h"
#include "core/fpdfapi/page/cpdf_textobject.h"
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_name.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfdoc/cpdf_interform.h"
diff --git a/fxjs/xfa/cjx_layoutpseudomodel.cpp b/fxjs/xfa/cjx_layoutpseudomodel.cpp
index 6985c5061f..62087e8684 100644
--- a/fxjs/xfa/cjx_layoutpseudomodel.cpp
+++ b/fxjs/xfa/cjx_layoutpseudomodel.cpp
@@ -13,6 +13,7 @@
#include "fxjs/cfxjse_engine.h"
#include "fxjs/cfxjse_value.h"
#include "fxjs/js_resources.h"
+#include "third_party/base/ptr_util.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/parser/cscript_layoutpseudomodel.h"
#include "xfa/fxfa/parser/cxfa_arraynodelist.h"
diff --git a/xfa/fgas/font/cfgas_pdffontmgr.cpp b/xfa/fgas/font/cfgas_pdffontmgr.cpp
index 4220d4d6c5..fe4b83ce4c 100644
--- a/xfa/fgas/font/cfgas_pdffontmgr.cpp
+++ b/xfa/fgas/font/cfgas_pdffontmgr.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include "core/fpdfapi/font/cpdf_font.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "xfa/fgas/font/cfgas_fontmgr.h"
#include "xfa/fgas/font/cfgas_gefont.h"
diff --git a/xfa/fgas/font/cfgas_pdffontmgr.h b/xfa/fgas/font/cfgas_pdffontmgr.h
index 6c4242288a..b6ce472fca 100644
--- a/xfa/fgas/font/cfgas_pdffontmgr.h
+++ b/xfa/fgas/font/cfgas_pdffontmgr.h
@@ -9,7 +9,6 @@
#include <map>
-#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/observable.h"
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index 6f4a9814c9..47c82151fe 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -11,6 +11,7 @@
#include <vector>
#include "core/fpdfapi/parser/cpdf_array.h"
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfdoc/cpdf_nametree.h"
#include "core/fxcrt/cfx_readonlymemorystream.h"
diff --git a/xfa/fxfa/parser/cxfa_treelist.cpp b/xfa/fxfa/parser/cxfa_treelist.cpp
index 5db9ecbdf9..38181f25e5 100644
--- a/xfa/fxfa/parser/cxfa_treelist.cpp
+++ b/xfa/fxfa/parser/cxfa_treelist.cpp
@@ -12,6 +12,7 @@
#include "fxjs/cfxjse_engine.h"
#include "fxjs/xfa/cjx_treelist.h"
#include "third_party/base/numerics/safe_conversions.h"
+#include "third_party/base/ptr_util.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_list.h"
#include "xfa/fxfa/parser/cxfa_node.h"