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

Unified Diff: fpdfsdk/src/fpdfeditimg.cpp

Issue 1395353004: Merge to XFA: Introduce CPDFDocumentFromFPDFDocument(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove another pointless local var. 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/fpdfdoc.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfeditimg.cpp
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp
index 269b382d8932c129f5c023348459a2585e810021..09295aa3c45293646cb55116a32559b197069cfd 100644
--- a/fpdfsdk/src/fpdfeditimg.cpp
+++ b/fpdfsdk/src/fpdfeditimg.cpp
@@ -11,10 +11,11 @@
DLLEXPORT FPDF_PAGEOBJECT STDCALL
FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) {
- if (!document)
- return NULL;
+ CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
+ if (!pDoc)
+ return nullptr;
CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
- CPDF_Image* pImg = new CPDF_Image(((CPDFXFA_Document*)document)->GetPDFDoc());
+ CPDF_Image* pImg = new CPDF_Image(pDoc);
pImageObj->m_pImage = pImg;
return pImageObj;
}
« no previous file with comments | « fpdfsdk/src/fpdfdoc.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698