From 55dd8546ebc365b3778b40ba9d82879f581503e1 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 24 Nov 2015 13:31:52 -0800 Subject: Add "Underlying types" to master. Change some master code to line up better with XFA, so that the XFA changes are additive when possible, rather than replacements. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1468253005 . --- fpdfsdk/include/fsdk_define.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fpdfsdk/include/fsdk_define.h') diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index bca7805226..980411c27b 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -52,6 +52,18 @@ class CPDF_CustomAccess final : public IFX_FileRead { FPDF_FILEACCESS m_FileAccess; }; +// Object types for public FPDF_ types; these correspond to next layer down +// from fpdfsdk. For master, these are CPDF_ types, but for XFA, these are +// CPDFXFA_ types. +using UnderlyingDocumentType = CPDF_Document; +using UnderlyingPageType = CPDF_Page; + +// Conversions to/from underlying types. +UnderlyingDocumentType* UnderlyingFromFPDFDocument(FPDF_DOCUMENT doc); +FPDF_DOCUMENT FPDFDocumentFromUnderlying(UnderlyingDocumentType* doc); + +UnderlyingPageType* UnderlyingFromFPDFPage(FPDF_PAGE page); + // Conversions to/from FPDF_ types. CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc); FPDF_DOCUMENT FPDFDocumentFromCPDFDocument(CPDF_Document* doc); -- cgit v1.2.3