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

Unified Diff: fpdfsdk/src/fpdf_dataavail.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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_dataavail.cpp
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index 53437234760f31b9fd9b0721a3565cf11bdf825f..3944f67b03aa1ba54060576f398cc9cba9098710 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -115,9 +115,9 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
}
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
- if (doc == NULL)
+ CPDF_Document* pDoc = CPDF_Document::FromFPDFDocument(doc);
+ if (!doc)
return 0;
- CPDF_Document* pDoc = (CPDF_Document*)doc;
return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo();
}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698