diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-21 15:55:42 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-21 15:55:42 -0700 |
commit | 69ceb6a9761b3ccb228a2405e9a493a3666e0601 (patch) | |
tree | aeda419b1fc75d5c2d2147b172edd47ae12298ac /fpdfsdk/include | |
parent | 3b2ab45f0a883046a7c457e8435b5a9b2c1c4156 (diff) | |
download | pdfium-69ceb6a9761b3ccb228a2405e9a493a3666e0601.tar.xz |
More master side changes for convergence with XFA.
- Add new CPDFSDK_Document::GetPDFDocument()
- FPDFDocumentFromCPDFDocument() to match XFA
- rename some JS variables to be consistent with XFA
- remove unused param from CJS_GlobalData().
- kill dead code used XFA only.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1413883005 .
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/fsdk_define.h | 4 | ||||
-rw-r--r-- | fpdfsdk/include/fsdk_mgr.h | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 37788c3ff7..6e3c718948 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -52,8 +52,10 @@ class CPDF_CustomAccess final : public IFX_FileRead { FPDF_FILEACCESS m_FileAccess; }; -// Conversions from FPDF_ types. +// Conversions to/from FPDF_ types. CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc); +FPDF_DOCUMENT FPDFDocumentFromCPDFDocument(CPDF_Document* doc); + CPDF_Page* CPDFPageFromFPDFPage(FPDF_PAGE page); void DropContext(void* data); diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index 5ddc8e6c57..068731ee8f 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -229,7 +229,14 @@ class CPDFSDK_Document { ~CPDFSDK_Document(); CPDFSDK_InterForm* GetInterForm(); - CPDF_Document* GetDocument() { return m_pDoc; } + + // Gets the document object for the next layer down; for master this is + // a CPDF_Document, but for XFA it is a CPDFXFA_Document. + CPDF_Document* GetDocument() const { return m_pDoc; } + + // Gets the CPDF_Document, either directly in master, or from the + // CPDFXFA_Document for XFA. + CPDF_Document* GetPDFDocument() const { return m_pDoc; } CPDFSDK_PageView* GetPageView(CPDF_Page* pPDFPage, FX_BOOL ReNew = TRUE); CPDFSDK_PageView* GetPageView(int nIndex); |