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

Unified Diff: fpdfsdk/src/fpdf_ext.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/fpdf_dataavail.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_ext.cpp
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 2d84ff2a507231af0e0432d69333157dc57cd919..1cc182991462d6636d240cc5ba428b1c68139f15 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -183,10 +183,11 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) {
}
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
- if (!document)
+ CPDF_Document* pDoc = CPDF_Document::FromFPDFDocument(document);
+ if (!pDoc)
return PAGEMODE_UNKNOWN;
- CPDF_Dictionary* pRoot = ((CPDF_Document*)document)->GetRoot();
+ CPDF_Dictionary* pRoot = pDoc->GetRoot();
if (!pRoot)
return PAGEMODE_UNKNOWN;
« no previous file with comments | « fpdfsdk/src/fpdf_dataavail.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698