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

Unified Diff: fpdfsdk/fpdfeditpage.cpp

Issue 2354933002: Rename CPDFXFA_Document::GetPageCount (Closed)
Patch Set: Created 4 years, 3 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/fpdfeditpage.cpp
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index e3777d4f8411570cf00b7367da374a5c5597f3a1..f124db8f9ed1a6cfc33deb567ba8962698107d7e 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -105,6 +105,7 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
if (!pDoc)
return nullptr;
+ // TODO(dsinclair): Verify if this is correct for XFA page counts.
page_index = std::min(std::max(page_index, 0), pDoc->GetPageCount());
CPDF_Dictionary* pPageDict = pDoc->CreateNewPage(page_index);
if (!pPageDict)

Powered by Google App Engine
This is Rietveld 408576698