summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-04 18:07:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 18:07:47 +0000
commit168c763539e70bea450701470c47a8991f578336 (patch)
tree61e053e549e5477919bcef5a39f79d74a666fcca /fpdfsdk/cpdfsdk_helpers.h
parent2491990f50f8ea48a509eb0ccc0193b4c1a3f776 (diff)
downloadpdfium-168c763539e70bea450701470c47a8991f578336.tar.xz
Revert "Make common page base class for XFA and non-XFA."
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.h')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.h b/fpdfsdk/cpdfsdk_helpers.h
index 98d7e45e5f..fae7ef0782 100644
--- a/fpdfsdk/cpdfsdk_helpers.h
+++ b/fpdfsdk/cpdfsdk_helpers.h
@@ -7,7 +7,6 @@
#ifndef FPDFSDK_CPDFSDK_HELPERS_H_
#define FPDFSDK_CPDFSDK_HELPERS_H_
-#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_parser.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/fx_dib.h"
@@ -30,6 +29,7 @@ class CPDF_ContentMarkItem;
class CPDF_Object;
class CPDF_Font;
class CPDF_LinkExtract;
+class CPDF_Page;
class CPDF_PageObject;
class CPDF_PageRenderContext;
class CPDF_PathObject;
@@ -47,9 +47,18 @@ class CPDFXFA_Page;
class CXFA_FFWidget;
#endif // PDF_ENABLE_XFA
+// 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.
+#ifdef PDF_ENABLE_XFA
+using UnderlyingPageType = CPDFXFA_Page;
+#else // PDF_ENABLE_XFA
+using UnderlyingPageType = CPDF_Page;
+#endif // PDF_ENABLE_XFA
+
// Conversions to/from underlying types.
-IPDF_Page* IPDFPageFromFPDFPage(FPDF_PAGE page);
-FPDF_PAGE FPDFPageFromIPDFPage(IPDF_Page* page);
+UnderlyingPageType* UnderlyingFromFPDFPage(FPDF_PAGE page);
+FPDF_PAGE FPDFPageFromUnderlying(UnderlyingPageType* page);
CPDF_Page* CPDFPageFromFPDFPage(FPDF_PAGE page);
FPDF_DOCUMENT FPDFDocumentFromCPDFDocument(CPDF_Document* doc);
CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc);