summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_dataavail.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-21 14:07:23 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-21 14:07:23 -0700
commitbf59a070593d079256161f6ff47148df309668c7 (patch)
tree0c105507a20881f8f025127183510fefb851c3ce /fpdfsdk/src/fpdf_dataavail.cpp
parent63dfaab17af7121653749bc86d11fc77b5353dca (diff)
downloadpdfium-bf59a070593d079256161f6ff47148df309668c7.tar.xz
XFA: add CPDFDocumentToFPDFDocument()
Abstracts away that master returns CPDF_Documents directly, but XFA wraps them with a CPDFXFA_Document. Tidy dead code along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415803002 .
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index f09b173208..0a90f49d8b 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -113,9 +113,7 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
}
((CFPDF_DataAvail*)avail)->m_pDataAvail->SetDocument(pParser->GetDocument());
CheckUnSupportError(pParser->GetDocument(), FPDF_ERR_SUCCESS);
- CPDF_Document* pPDFDoc = pParser->GetDocument();
- CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
- return new CPDFXFA_Document(pPDFDoc, pApp);
+ return FPDFDocumentFromCPDFDocument(pParser->GetDocument());
}
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {