OLD | NEW |
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/fpdfapi/fpdf_parser/include/cpdf_array.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
8 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 8 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 9 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" |
9 #include "core/fpdfdoc/doc_utils.h" | 10 #include "core/fpdfdoc/doc_utils.h" |
10 #include "core/fpdfdoc/include/fpdf_doc.h" | 11 #include "core/fpdfdoc/cpdf_pagelabel.h" |
| 12 #include "core/fpdfdoc/include/cpdf_filespec.h" |
| 13 #include "core/fpdfdoc/include/cpdf_nametree.h" |
| 14 #include "core/fpdfdoc/include/ipdf_formnotify.h" |
11 | 15 |
12 namespace { | 16 namespace { |
13 | 17 |
14 const int nMaxRecursion = 32; | 18 const int nMaxRecursion = 32; |
15 const FX_CHAR* const g_sZoomModes[] = {"XYZ", "Fit", "FitH", "FitV", "FitR", | 19 const FX_CHAR* const g_sZoomModes[] = {"XYZ", "Fit", "FitH", "FitV", "FitR", |
16 "FitB", "FitBH", "FitBV", nullptr}; | 20 "FitB", "FitBH", "FitBV", nullptr}; |
17 | 21 |
18 } // namespace | 22 } // namespace |
19 | 23 |
20 int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { | 24 int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 return i; | 559 return i; |
556 } | 560 } |
557 | 561 |
558 int nPage = FXSYS_atoi(CFX_ByteString(bsLabel).c_str()); // NUL terminate. | 562 int nPage = FXSYS_atoi(CFX_ByteString(bsLabel).c_str()); // NUL terminate. |
559 return nPage > 0 && nPage <= nPages ? nPage : -1; | 563 return nPage > 0 && nPage <= nPages ? nPage : -1; |
560 } | 564 } |
561 | 565 |
562 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { | 566 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { |
563 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC()); | 567 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC()); |
564 } | 568 } |
OLD | NEW |