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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_data_avail.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
« no previous file with comments | « no previous file | core/fpdfdoc/cpdf_pagelabel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index a8cbeaf5d4e3544473b089f614e28ce6099ee4ce..c451d9c06088f110b1f6e121a2e4c78bf7e7d00a 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
@@ -1423,6 +1423,8 @@ FX_BOOL CPDF_DataAvail::CheckPageNode(CPDF_DataAvail::PageNode& pageNodes,
FX_BOOL CPDF_DataAvail::LoadDocPage(uint32_t dwPage, DownloadHints* pHints) {
FX_SAFE_INT32 safePage = pdfium::base::checked_cast<int32_t>(dwPage);
int32_t iPage = safePage.ValueOrDie();
+ // TODO(dsinclair): This won't work correctly for XFA as the pageList in
+ // the document does not contain XFA pages.
npm 2016/09/21 21:59:22 I think I don't understand. You are not changing t
dsinclair 2016/09/22 14:06:02 The problem I see here is that, the page count for
if (m_pDocument->GetPageCount() <= iPage ||
m_pDocument->IsPageLoaded(iPage)) {
m_docStatus = PDF_DATAAVAIL_DONE;
@@ -1764,6 +1766,7 @@ int CPDF_DataAvail::GetPageCount() const {
CPDF_Object* pObj = pDict ? pDict->GetDirectObjectFor("N") : nullptr;
return pObj ? pObj->GetInteger() : 0;
}
+ // TODO(dsinclair): This will be wrong for XFA documents.
return m_pDocument ? m_pDocument->GetPageCount() : 0;
}
« no previous file with comments | « no previous file | core/fpdfdoc/cpdf_pagelabel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698