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

Unified Diff: fpdfsdk/src/fpdf_dataavail.cpp

Issue 1395353004: Merge to XFA: Introduce CPDFDocumentFromFPDFDocument(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix build. 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
Index: fpdfsdk/src/fpdf_dataavail.cpp
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index d3b44160a8104898b88eb1545a0107371ffd9925..1b8162a403a2b98e3d4ef0f43e60b8eff077f10c 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -119,9 +119,9 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
}
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
- if (doc == NULL)
+ CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc);
+ if (!doc)
return 0;
- CPDF_Document* pDoc = ((CPDFXFA_Document*)doc)->GetPDFDoc();
return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo();
Lei Zhang 2015/10/15 22:44:26 BTW, this cast is pointless. I need some shades so
Tom Sepez 2015/10/15 23:18:09 Done. Also a subtle error where the !pDoc not !do
}
« no previous file with comments | « fpdfsdk/include/fsdk_define.h ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | fpdfsdk/src/fpdfdoc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698