diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-11-10 18:29:18 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-11-10 18:29:18 +0800 |
commit | df7f3663364fd4d6148d658c5bdb98ab2532fb8d (patch) | |
tree | 2f803bc57c5bcad8c1aa5e12122962e38e3adbe5 /core/include/fpdfapi/fpdf_parser.h | |
parent | 956168fc8abf4046e94eef9ee76b0705a6248ac0 (diff) | |
download | pdfium-df7f3663364fd4d6148d658c5bdb98ab2532fb8d.tar.xz |
Merge to XFA: Support linearized loading
BUG=446715
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1353093003 .
Conflicts:
core/include/fpdfapi/fpdf_parser.h
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp
samples/pdfium_test.cc
testing/embedder_test.cpp
testing/embedder_test.h
Review URL: https://codereview.chromium.org/1412083010 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_parser.h')
-rw-r--r-- | core/include/fpdfapi/fpdf_parser.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index 2ea9e03685..d6f0506fc4 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -9,32 +9,35 @@ #include "../fxcrt/fx_system.h" #include "fpdf_objects.h" +#include "public/fpdf_dataavail.h" #include "third_party/base/nonstd_unique_ptr.h" -class CPDF_Document; -class CPDF_Parser; -class CPDF_SecurityHandler; -class CPDF_StandardSecurityHandler; -class CPDF_CryptoHandler; -class CPDF_Object; -class IFX_FileRead; class CFDF_Document; class CFDF_Parser; -class CFX_Font; class CFX_AffineMatrix; +class CFX_DIBSource; class CFX_FloatRect; -class CPDF_Point; +class CFX_Font; +class CFX_PrivateData; +class CPDF_ColorSpace; +class CPDF_CryptoHandler; class CPDF_DocPageData; class CPDF_DocRenderData; -class CPDF_ModuleMgr; -class CFX_DIBSource; +class CPDF_Document; class CPDF_Font; -class CPDF_Image; -class CPDF_ColorSpace; -class CPDF_Pattern; class CPDF_FontEncoding; +class CPDF_HintTables; class CPDF_IccProfile; -class CFX_PrivateData; +class CPDF_Image; +class CPDF_ModuleMgr; +class CPDF_Object; +class CPDF_Parser; +class CPDF_Pattern; +class CPDF_Point; +class CPDF_SecurityHandler; +class CPDF_StandardSecurityHandler; +class IFX_FileRead; + #define FPDFPERM_PRINT 0x0004 #define FPDFPERM_MODIFY 0x0008 #define FPDFPERM_EXTRACT 0x0010 @@ -865,12 +868,7 @@ class IFX_DownloadHints { virtual ~IFX_DownloadHints() {} virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; }; -#define PDF_IS_LINEARIZED 1 -#define PDF_NOT_LINEARIZED 0 -#define PDF_UNKNOW_LINEARIZED -1 -#define PDFFORM_NOTAVAIL 0 -#define PDFFORM_AVAIL 1 -#define PDFFORM_NOTEXIST 2 + class IPDF_DataAvail { public: static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, @@ -880,12 +878,12 @@ class IPDF_DataAvail { IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } IFX_FileRead* GetFileRead() const { return m_pFileRead; } - virtual FX_BOOL IsDocAvail(IFX_DownloadHints* pHints) = 0; + virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; virtual void SetDocument(CPDF_Document* pDoc) = 0; - virtual FX_BOOL IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; + virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; virtual FX_BOOL IsLinearized() = 0; - virtual int32_t IsFormAvail(IFX_DownloadHints* pHints) = 0; - virtual int32_t IsLinearizedPDF() = 0; + virtual int IsFormAvail(IFX_DownloadHints* pHints) = 0; + virtual int IsLinearizedPDF() = 0; virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, FX_DWORD* pSize) = 0; @@ -927,6 +925,7 @@ enum PDF_DATAAVAIL_STATUS { PDF_DATAAVAIL_HEADER = 0, PDF_DATAAVAIL_FIRSTPAGE, PDF_DATAAVAIL_FIRSTPAGE_PREPARE, + PDF_DATAAVAIL_HINTTABLE, PDF_DATAAVAIL_END, PDF_DATAAVAIL_CROSSREF, PDF_DATAAVAIL_CROSSREF_ITEM, |