Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: fpdfsdk/src/fpdfeditpage.cpp

Issue 1415803002: XFA: add CPDFDocumentToFPDFDocument() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Address comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfeditimg.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfeditpage.cpp
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index 42ab3eb69431f649323d74ce3da2daf930adcb29..8b4168fbf4d3a7aeabbbfba36134935d21e06e67 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -43,8 +43,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
pInfoDict->SetAt("Creator", new CPDF_String(L"PDFium"));
}
- CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
- return new CPDFXFA_Document(pDoc, pApp);
+ return FPDFDocumentFromCPDFDocument(pDoc);
}
DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
@@ -177,7 +176,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,
}
DLLEXPORT int STDCALL FPDFPage_CountObject(FPDF_PAGE page) {
- CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") ||
!pPage->m_pFormDict->GetElement("Type")->GetDirect() ||
pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare(
« no previous file with comments | « fpdfsdk/src/fpdfeditimg.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698