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

Unified Diff: fpdfsdk/src/fpdfeditimg.cpp

Issue 1395493007: Introduce CPDF_Document::FromFPDFDocument(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 bb710789ccdc5c1c8fa391def31581365f93ad77..ef0576b6027cbc657ff92b5c6acf6f77c46850ca 100644
--- a/fpdfsdk/src/fpdfeditimg.cpp
+++ b/fpdfsdk/src/fpdfeditimg.cpp
@@ -9,10 +9,11 @@
DLLEXPORT FPDF_PAGEOBJECT STDCALL
FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) {
- if (!document)
- return NULL;
+ CPDF_Document* pDoc = CPDF_Document::FromFPDFDocument(document);
+ if (!pDoc)
+ return nullptr;
CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
- CPDF_Image* pImg = new CPDF_Image((CPDF_Document*)document);
+ 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