diff options
60 files changed, 199 insertions, 139 deletions
@@ -237,6 +237,7 @@ static_library("fpdfdoc") { static_library("fpdfapi") { sources = [ + "core/include/fpdfapi/cpdf_document.h", "core/include/fpdfapi/fpdf_module.h", "core/include/fpdfapi/fpdf_objects.h", "core/include/fpdfapi/fpdf_page.h", @@ -331,10 +332,10 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp", "core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp", "core/src/fpdfapi/fpdf_page/pageint.h", + "core/src/fpdfapi/fpdf_parser/cpdf_document.cpp", "core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp", "core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.h", "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp", - "core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp", "core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp", "core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp", "core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp", diff --git a/core/include/fpdfapi/cpdf_document.h b/core/include/fpdfapi/cpdf_document.h new file mode 100644 index 0000000000..bba89c822c --- /dev/null +++ b/core/include/fpdfapi/cpdf_document.h @@ -0,0 +1,124 @@ +// 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_INCLUDE_FPDFAPI_CPDF_DOCUMENT_H_ +#define CORE_INCLUDE_FPDFAPI_CPDF_DOCUMENT_H_ + +#include "core/include/fpdfapi/fpdf_objects.h" +#include "core/include/fxcrt/fx_basic.h" + +class CFX_Font; +class CPDF_ColorSpace; +class CPDF_DocPageData; +class CPDF_DocRenderData; +class CPDF_Font; +class CPDF_FontEncoding; +class CPDF_IccProfile; +class CPDF_Image; +class CPDF_Pattern; + +class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder { + public: + CPDF_Document(); + explicit CPDF_Document(CPDF_Parser* pParser); + ~CPDF_Document(); + + CPDF_Parser* GetParser() const { return m_pParser; } + CPDF_Dictionary* GetRoot() const { return m_pRootDict; } + CPDF_Dictionary* GetInfo() const { return m_pInfoDict; } + + void GetID(CFX_ByteString& id1, CFX_ByteString& id2) const { + id1 = m_ID1; + id2 = m_ID2; + } + + int GetPageCount() const; + CPDF_Dictionary* GetPage(int iPage); + int GetPageIndex(FX_DWORD objnum); + FX_DWORD GetUserPermissions(FX_BOOL bCheckRevision = FALSE) const; + CPDF_DocPageData* GetPageData() { return GetValidatePageData(); } + void ClearPageData(); + void RemoveColorSpaceFromPageData(CPDF_Object* pObject); + + CPDF_DocRenderData* GetRenderData() { return GetValidateRenderData(); } + void ClearRenderData(); + void ClearRenderFont(); + + FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const; + + // |pFontDict| must not be null. + CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict); + CPDF_ColorSpace* LoadColorSpace(CPDF_Object* pCSObj, + CPDF_Dictionary* pResources = NULL); + + CPDF_Pattern* LoadPattern(CPDF_Object* pObj, + FX_BOOL bShading, + const CFX_Matrix* matrix = NULL); + + CPDF_Image* LoadImageF(CPDF_Object* pObj); + CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream); + CPDF_IccProfile* LoadIccProfile(CPDF_Stream* pStream); + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + + CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont, + FX_BOOL bVert, + FX_BOOL bTranslateName = FALSE); + CPDF_Font* AddWindowsFont(LOGFONTW* pLogFont, + FX_BOOL bVert, + FX_BOOL bTranslateName = FALSE); +#endif +#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ + CPDF_Font* AddMacFont(CTFontRef pFont, + FX_BOOL bVert, + FX_BOOL bTranslateName = FALSE); +#endif + + CPDF_Font* AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding); + CPDF_Font* AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert); + void CreateNewDoc(); + + CPDF_Dictionary* CreateNewPage(int iPage); + void DeletePage(int iPage); + + void LoadDoc(); + void LoadAsynDoc(CPDF_Dictionary* pLinearized); + void LoadPages(); + + protected: + // Retrieve page count information by getting count value from the tree nodes + // or walking through the tree nodes to calculate it. + int RetrievePageCount() const; + CPDF_Dictionary* _FindPDFPage(CPDF_Dictionary* pPages, + int iPage, + int nPagesToGo, + int level); + int _FindPageIndex(CPDF_Dictionary* pNode, + FX_DWORD& skip_count, + FX_DWORD objnum, + int& index, + int level = 0); + FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting); + CPDF_DocPageData* GetValidatePageData(); + CPDF_DocRenderData* GetValidateRenderData(); + friend class CPDF_Creator; + friend class CPDF_Parser; + friend class CPDF_DataAvail; + friend class CPDF_OCContext; + + CPDF_Dictionary* m_pRootDict; + CPDF_Dictionary* m_pInfoDict; + CFX_ByteString m_ID1; + CFX_ByteString m_ID2; + FX_BOOL m_bLinearized; + FX_DWORD m_dwFirstPageNo; + FX_DWORD m_dwFirstPageObjNum; + CFX_DWordArray m_PageList; + CPDF_DocPageData* m_pDocPage; + CPDF_DocRenderData* m_pDocRender; +}; + +#endif // CORE_INCLUDE_FPDFAPI_CPDF_DOCUMENT_H_ diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index 1b09aa0148..ec7a98cb91 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -18,6 +18,7 @@ class CFX_Font; class CFX_Matrix; class CPDF_ColorSpace; class CPDF_CryptoHandler; +class CPDF_Document; class CPDF_DocPageData; class CPDF_DocRenderData; class CPDF_Font; @@ -83,132 +84,6 @@ class ScopedSetInsertion { // Indexed by 8-bit char code, contains unicode code points. extern const FX_WORD PDFDocEncoding[256]; -class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjectHolder { - public: - CPDF_Document(); - explicit CPDF_Document(CPDF_Parser* pParser); - - ~CPDF_Document(); - - CPDF_Parser* GetParser() const { return m_pParser; } - - CPDF_Dictionary* GetRoot() const { return m_pRootDict; } - - CPDF_Dictionary* GetInfo() const { return m_pInfoDict; } - - void GetID(CFX_ByteString& id1, CFX_ByteString& id2) const { - id1 = m_ID1; - id2 = m_ID2; - } - - int GetPageCount() const; - - CPDF_Dictionary* GetPage(int iPage); - - int GetPageIndex(FX_DWORD objnum); - - FX_DWORD GetUserPermissions(FX_BOOL bCheckRevision = FALSE) const; - - CPDF_DocPageData* GetPageData() { return GetValidatePageData(); } - - void ClearPageData(); - - void RemoveColorSpaceFromPageData(CPDF_Object* pObject); - - CPDF_DocRenderData* GetRenderData() { return GetValidateRenderData(); } - - void ClearRenderData(); - - void ClearRenderFont(); - - FX_BOOL IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const; - - // |pFontDict| must not be null. - CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict); - - CPDF_ColorSpace* LoadColorSpace(CPDF_Object* pCSObj, - CPDF_Dictionary* pResources = NULL); - - CPDF_Pattern* LoadPattern(CPDF_Object* pObj, - FX_BOOL bShading, - const CFX_Matrix* matrix = NULL); - - CPDF_Image* LoadImageF(CPDF_Object* pObj); - - CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream); - - CPDF_IccProfile* LoadIccProfile(CPDF_Stream* pStream); - -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - - CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont, - FX_BOOL bVert, - FX_BOOL bTranslateName = FALSE); - CPDF_Font* AddWindowsFont(LOGFONTW* pLogFont, - FX_BOOL bVert, - FX_BOOL bTranslateName = FALSE); -#endif -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ - CPDF_Font* AddMacFont(CTFontRef pFont, - FX_BOOL bVert, - FX_BOOL bTranslateName = FALSE); -#endif - - CPDF_Font* AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding); - - CPDF_Font* AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert); - - void CreateNewDoc(); - - CPDF_Dictionary* CreateNewPage(int iPage); - - void DeletePage(int iPage); - - void LoadDoc(); - void LoadAsynDoc(CPDF_Dictionary* pLinearized); - void LoadPages(); - - protected: - CPDF_Dictionary* m_pRootDict; - - CPDF_Dictionary* m_pInfoDict; - - CFX_ByteString m_ID1; - - CFX_ByteString m_ID2; - - FX_BOOL m_bLinearized; - - FX_DWORD m_dwFirstPageNo; - - FX_DWORD m_dwFirstPageObjNum; - - CFX_DWordArray m_PageList; - - // Retrieve page count information by getting count value from the tree nodes - // or walking through the tree nodes to calculate it. - int RetrievePageCount() const; - CPDF_Dictionary* _FindPDFPage(CPDF_Dictionary* pPages, - int iPage, - int nPagesToGo, - int level); - int _FindPageIndex(CPDF_Dictionary* pNode, - FX_DWORD& skip_count, - FX_DWORD objnum, - int& index, - int level = 0); - FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting); - CPDF_DocPageData* GetValidatePageData(); - CPDF_DocRenderData* GetValidateRenderData(); - friend class CPDF_Creator; - friend class CPDF_Parser; - friend class CPDF_DataAvail; - friend class CPDF_OCContext; - - CPDF_DocPageData* m_pDocPage; - - CPDF_DocRenderData* m_pDocRender; -}; class CPDF_SimpleParser { public: diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index 77c58f0925..ad19b5d685 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_serial.h" diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 878dc2ab2a..ac01bf901c 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -8,6 +8,7 @@ #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_parser.h" #include "core/include/fpdfapi/fpdf_serial.h" #include "core/include/fxcrt/fx_ext.h" diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index bc3de20857..8b1571a496 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -6,6 +6,7 @@ #include <limits.h> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/src/fpdfapi/fpdf_page/pageint.h" diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp index 2b68a0403f..0d2f83682e 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_render.h" diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index ecdb2d7deb..d9bc148326 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_font/font_int.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_pageobj.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp index 77707624d2..1868d263d3 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp @@ -8,6 +8,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "third_party/base/stl_util.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp index 49fb331a94..a43aff18cb 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -10,6 +10,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fxcodec/fx_codec.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp index 85b026f8e8..fbf236d472 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp @@ -7,6 +7,7 @@ #include "core/src/fpdfapi/fpdf_page/pageint.h" #include "core/include/fdrm/fx_crypt.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/src/fpdfapi/fpdf_font/font_int.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp index a294d3bce7..eff2ff4009 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp @@ -8,6 +8,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_pageobj.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp index c5e29a4b77..64d3264128 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_page/pageint.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_pageobj.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp index 1df4f3db37..7114f764ac 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_page/pageint.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_serial.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index b49607e743..a808c2948b 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -8,6 +8,7 @@ #include <limits.h> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fxcodec/fx_codec.h" diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp index d56e65c084..0287b4fed3 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_page/pageint.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_page.h" namespace { diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/cpdf_document.cpp index a63b0ed336..f837c00509 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp +++ b/core/src/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -4,11 +4,14 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/include/fpdfapi/fpdf_parser.h" +#include "core/include/fpdfapi/cpdf_document.h" #include <set> #include "core/include/fpdfapi/fpdf_module.h" +#include "core/include/fpdfapi/fpdf_parser.h" +#include "core/include/fxge/fx_font.h" +#include "core/src/fpdfapi/fpdf_render/render_int.h" #include "third_party/base/stl_util.h" namespace { @@ -336,3 +339,12 @@ void CPDF_Document::ClearRenderData() { if (m_pDocRender) CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); } + +void CPDF_Document::ClearRenderFont() { + if (!m_pDocRender) + return; + + CFX_FontCache* pCache = m_pDocRender->GetFontCache(); + if (pCache) + pCache->FreeCache(FALSE); +} diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index a00d1bc98d..2b61cdc2a2 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -12,6 +12,7 @@ #include <utility> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fxcrt/fx_ext.h" diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index 4c7abea30c..c054f95abd 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_render/render_int.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_render.h" #include "core/include/fxge/fx_ge.h" diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp index d95885f434..9636d1b23a 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_render/render_int.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_pageobj.h" #include "core/include/fpdfapi/fpdf_render.h" #include "core/include/fxge/fx_ge.h" @@ -331,11 +332,3 @@ void CPDF_ImageCacheEntry::CalcSize() { m_dwCacheSize = FPDF_ImageCache_EstimateImageSize(m_pCachedBitmap) + FPDF_ImageCache_EstimateImageSize(m_pCachedMask); } -void CPDF_Document::ClearRenderFont() { - if (m_pDocRender) { - CFX_FontCache* pCache = m_pDocRender->GetFontCache(); - if (pCache) { - pCache->FreeCache(FALSE); - } - } -} diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp index b91f258371..0f9b88e638 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -9,6 +9,7 @@ #include <utility> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_pageobj.h" #include "core/include/fpdfapi/fpdf_render.h" diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 2aa1b0e6df..709733c56f 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -10,6 +10,7 @@ #include <memory> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfapi/fpdf_pageobj.h" #include "core/include/fpdfapi/fpdf_render.h" diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index aa10809496..7051537ef3 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -6,6 +6,7 @@ #include "core/src/fpdfapi/fpdf_render/render_int.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_pageobj.h" #include "core/include/fpdfapi/fpdf_render.h" #include "core/include/fxge/fx_ge.h" diff --git a/core/src/fpdfdoc/doc_action.cpp b/core/src/fpdfdoc/doc_action.cpp index 94235d2aee..9a0ba57951 100644 --- a/core/src/fpdfdoc/doc_action.cpp +++ b/core/src/fpdfdoc/doc_action.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const { diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp index 09b6e8d673..07fca72cab 100644 --- a/core/src/fpdfdoc/doc_annot.cpp +++ b/core/src/fpdfdoc/doc_annot.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_pageobj.h" #include "core/include/fpdfdoc/fpdf_doc.h" diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp index 7fe06e2b5d..3028169cd9 100644 --- a/core/src/fpdfdoc/doc_ap.cpp +++ b/core/src/fpdfdoc/doc_ap.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_ap.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/include/fpdfdoc/fpdf_vt.h" diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp index bc88ddc828..09d74f546a 100644 --- a/core/src/fpdfdoc/doc_basic.cpp +++ b/core/src/fpdfdoc/doc_basic.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" const int nMaxRecursion = 32; diff --git a/core/src/fpdfdoc/doc_bookmark.cpp b/core/src/fpdfdoc/doc_bookmark.cpp index d7e2e2fcab..71c8f039f0 100644 --- a/core/src/fpdfdoc/doc_bookmark.cpp +++ b/core/src/fpdfdoc/doc_bookmark.cpp @@ -7,6 +7,7 @@ #include <memory> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild( diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index 7a6db90f32..8080dc7597 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/src/fpdfdoc/doc_utils.h" #include "third_party/base/stl_util.h" diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp index 4cfd4527e2..665da0acef 100644 --- a/core/src/fpdfdoc/doc_formcontrol.cpp +++ b/core/src/fpdfdoc/doc_formcontrol.cpp @@ -6,6 +6,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp index a7cc484361..915af33c29 100644 --- a/core/src/fpdfdoc/doc_formfield.cpp +++ b/core/src/fpdfdoc/doc_formfield.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/src/fpdfdoc/doc_utils.h" diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp index 593cffbebb..78364c4cbf 100644 --- a/core/src/fpdfdoc/doc_metadata.cpp +++ b/core/src/fpdfdoc/doc_metadata.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/include/fxcrt/fx_xml.h" diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp index a18924c1dc..6f6e54675b 100644 --- a/core/src/fpdfdoc/doc_ocg.cpp +++ b/core/src/fpdfdoc/doc_ocg.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object* pObject, diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp index a7eea11b02..d4ce4a4b31 100644 --- a/core/src/fpdfdoc/doc_tagged.cpp +++ b/core/src/fpdfdoc/doc_tagged.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_page.h" #include "core/include/fpdfapi/fpdf_parser.h" #include "core/include/fpdfdoc/fpdf_tagged.h" diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp index 67a9324251..bc09c9a2c4 100644 --- a/core/src/fpdfdoc/doc_utils.cpp +++ b/core/src/fpdfdoc/doc_utils.cpp @@ -6,6 +6,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/src/fpdfdoc/doc_utils.h" diff --git a/core/src/fpdfdoc/doc_viewerPreferences.cpp b/core/src/fpdfdoc/doc_viewerPreferences.cpp index 6ef09255c6..582f3a5a93 100644 --- a/core/src/fpdfdoc/doc_viewerPreferences.cpp +++ b/core/src/fpdfdoc/doc_viewerPreferences.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" CPDF_ViewerPreferences::CPDF_ViewerPreferences(CPDF_Document* pDoc) diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index b28cdf7749..fecc2c6581 100644 --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp @@ -6,6 +6,7 @@ #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_page.h" #include "fpdfsdk/include/fsdk_baseannot.h" diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp index 2cad12b4e8..75f18e7c73 100644 --- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp @@ -6,6 +6,7 @@ #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/formfiller/FFL_CheckBox.h" #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp index 866e41edfc..1a6c29ae86 100644 --- a/fpdfsdk/src/fpdf_dataavail.cpp +++ b/fpdfsdk/src/fpdf_dataavail.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_dataavail.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" #include "public/fpdf_formfill.h" diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index aa6725b288..55ebe09694 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_ext.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fxcrt/fx_xml.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp index 759f758e5e..fd7ef67643 100644 --- a/fpdfsdk/src/fpdf_flatten.cpp +++ b/fpdfsdk/src/fpdf_flatten.cpp @@ -8,6 +8,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" typedef CFX_ArrayTemplate<CPDF_Dictionary*> CPDF_ObjectArray; diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index 3d2f6511cd..d37074a1a9 100644 --- a/fpdfsdk/src/fpdf_transformpage.cpp +++ b/fpdfsdk/src/fpdf_transformpage.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_transformpage.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" namespace { diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp index 4b5da2ffc3..2794045901 100644 --- a/fpdfsdk/src/fpdfdoc.cpp +++ b/fpdfsdk/src/fpdfdoc.cpp @@ -8,6 +8,7 @@ #include <set> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" #include "third_party/base/stl_util.h" diff --git a/fpdfsdk/src/fpdfdoc_unittest.cpp b/fpdfsdk/src/fpdfdoc_unittest.cpp index ec4684de4d..0dd03ce0b5 100644 --- a/fpdfsdk/src/fpdfdoc_unittest.cpp +++ b/fpdfsdk/src/fpdfdoc_unittest.cpp @@ -7,6 +7,7 @@ #include <memory> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp index 46026b593d..2661acec1b 100644 --- a/fpdfsdk/src/fpdfeditpage.cpp +++ b/fpdfsdk/src/fpdfeditpage.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_edit.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" #include "public/fpdf_formfill.h" #include "third_party/base/stl_util.h" diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp index 874082e277..31f5732ce5 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -9,6 +9,7 @@ #include <memory> #include <vector> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/include/fsdk_mgr.h" #include "public/fpdfview.h" diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp index 84ac41d60e..3b3d340a93 100644 --- a/fpdfsdk/src/fpdfppo.cpp +++ b/fpdfsdk/src/fpdfppo.cpp @@ -8,6 +8,7 @@ #include <memory> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_define.h" #include "third_party/base/stl_util.h" diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index ca0fa5364d..f93b52d6b7 100644 --- a/fpdfsdk/src/fpdfsave.cpp +++ b/fpdfsdk/src/fpdfsave.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_save.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_parser.h" #include "core/include/fpdfapi/fpdf_serial.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 05c69acb99..a35952c339 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -8,6 +8,7 @@ #include <memory> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fxcodec/fx_codec.h" #include "core/include/fxcrt/fx_safe_types.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp index aaeb4d6c3f..e896441263 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_app.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h" diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp index 1f6aa12126..0210ac1c08 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h" #include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h" diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index 5c77b3998b..ee0a4d8d73 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -6,6 +6,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" #include "fpdfsdk/include/fsdk_annothandler.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp index bd73ee3211..0c7cfac0de 100644 --- a/fpdfsdk/src/fsdk_baseannot.cpp +++ b/fpdfsdk/src/fsdk_baseannot.cpp @@ -6,6 +6,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fxcrt/fx_ext.h" #include "fpdfsdk/include/fsdk_baseannot.h" #include "fpdfsdk/include/fsdk_define.h" diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 8d8b95f38e..e18959f5fd 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <memory> +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" #include "fpdfsdk/include/fsdk_actionhandler.h" #include "fpdfsdk/include/fsdk_baseannot.h" diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 933f451538..1177ddfabc 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -4,11 +4,12 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "fpdfsdk/include/fsdk_mgr.h" + #include <algorithm> #include <memory> -#include "fpdfsdk/include/fsdk_mgr.h" - +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" #include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/include/javascript/IJavaScript.h" diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 4d774426f0..f688982da5 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -6,6 +6,7 @@ #include "fpdfsdk/src/javascript/Document.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. #include "fpdfsdk/include/javascript/IJavaScript.h" #include "fpdfsdk/src/javascript/Field.h" diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp index 89a75b2854..0a70357efd 100644 --- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp @@ -6,6 +6,7 @@ #include "fpdfsdk/include/pdfwindow/PWL_FontMap.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_module.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" diff --git a/pdfium.gyp b/pdfium.gyp index f2161ae8de..63fa2fa630 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -251,6 +251,7 @@ 'target_name': 'fpdfapi', 'type': 'static_library', 'sources': [ + 'core/include/fpdfapi/cpdf_document.h', 'core/include/fpdfapi/fpdf_module.h', 'core/include/fpdfapi/fpdf_objects.h', 'core/include/fpdfapi/fpdf_page.h', @@ -345,10 +346,10 @@ 'core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp', 'core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp', 'core/src/fpdfapi/fpdf_page/pageint.h', + 'core/src/fpdfapi/fpdf_parser/cpdf_document.cpp', 'core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp', 'core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.h', 'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp', - 'core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp', 'core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp', 'core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp', 'core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp', diff --git a/xfa/src/fxfa/app/xfa_ffdoc.cpp b/xfa/src/fxfa/app/xfa_ffdoc.cpp index f088a79fb6..1c277aad9d 100644 --- a/xfa/src/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/src/fxfa/app/xfa_ffdoc.cpp @@ -6,6 +6,7 @@ #include "xfa/src/fxfa/app/xfa_ffdoc.h" +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/include/fxcrt/fx_ext.h" #include "xfa/include/fwl/core/fwl_note.h" diff --git a/xfa/src/fxfa/app/xfa_fontmgr.cpp b/xfa/src/fxfa/app/xfa_fontmgr.cpp index cc5de78d63..1b9fb5f01c 100644 --- a/xfa/src/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/src/fxfa/app/xfa_fontmgr.cpp @@ -8,6 +8,7 @@ #include <algorithm> +#include "core/include/fpdfapi/cpdf_document.h" #include "core/include/fpdfapi/fpdf_resource.h" #include "xfa/src/fxfa/app/xfa_ffapp.h" #include "xfa/src/fxfa/app/xfa_ffdoc.h" |