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

Side by Side Diff: core/src/fpdfdoc/doc_basic.cpp

Issue 1780503002: Split off CPDF_Document into its own .cpp/.h files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fpdfapi/cpdf_document.h"
7 #include "core/include/fpdfdoc/fpdf_doc.h" 8 #include "core/include/fpdfdoc/fpdf_doc.h"
8 9
9 const int nMaxRecursion = 32; 10 const int nMaxRecursion = 32;
10 int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { 11 int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) {
11 CPDF_Array* pArray = ToArray(m_pObj); 12 CPDF_Array* pArray = ToArray(m_pObj);
12 if (!pArray) 13 if (!pArray)
13 return 0; 14 return 0;
14 15
15 CPDF_Object* pPage = pArray->GetElementValue(0); 16 CPDF_Object* pPage = pArray->GetElementValue(0);
16 if (!pPage) 17 if (!pPage)
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 int nPage = FXSYS_atoi(bsLbl); 499 int nPage = FXSYS_atoi(bsLbl);
499 if (nPage > 0 && nPage <= nPages) { 500 if (nPage > 0 && nPage <= nPages) {
500 return nPage; 501 return nPage;
501 } 502 }
502 return -1; 503 return -1;
503 } 504 }
504 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { 505 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const {
505 CFX_ByteString bsLabel = PDF_EncodeText(wsLabel.GetPtr()); 506 CFX_ByteString bsLabel = PDF_EncodeText(wsLabel.GetPtr());
506 return GetPageByLabel(bsLabel); 507 return GetPageByLabel(bsLabel);
507 } 508 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698