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

Side by Side Diff: core/fpdfdoc/cpdf_pagelabel.cpp

Issue 2392603004: Move core/fpdfapi/fpdf_parser to core/fpdfapi/parser (Closed)
Patch Set: Rebase to master Created 4 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 unified diff | Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_occontext.cpp ('k') | core/fpdfdoc/cpdf_viewerpreferences.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fpdfdoc/cpdf_pagelabel.h" 7 #include "core/fpdfdoc/cpdf_pagelabel.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" 9 #include "core/fpdfapi/parser/cpdf_dictionary.h"
10 #include "core/fpdfapi/fpdf_parser/cpdf_document.h" 10 #include "core/fpdfapi/parser/cpdf_document.h"
11 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" 11 #include "core/fpdfapi/parser/fpdf_parser_decode.h"
12 #include "core/fpdfdoc/cpdf_numbertree.h" 12 #include "core/fpdfdoc/cpdf_numbertree.h"
13 13
14 namespace { 14 namespace {
15 15
16 CFX_WideString MakeRoman(int num) { 16 CFX_WideString MakeRoman(int num) {
17 const int kArabic[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; 17 const int kArabic[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
18 const CFX_WideString kRoman[] = {L"m", L"cm", L"d", L"cd", L"c", 18 const CFX_WideString kRoman[] = {L"m", L"cm", L"d", L"cd", L"c",
19 L"xc", L"l", L"xl", L"x", L"ix", 19 L"xc", L"l", L"xl", L"x", L"ix",
20 L"v", L"iv", L"i"}; 20 L"v", L"iv", L"i"};
21 const int kMaxNum = 1000000; 21 const int kMaxNum = 1000000;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return i; 127 return i;
128 } 128 }
129 129
130 int nPage = FXSYS_atoi(CFX_ByteString(bsLabel).c_str()); // NUL terminate. 130 int nPage = FXSYS_atoi(CFX_ByteString(bsLabel).c_str()); // NUL terminate.
131 return nPage > 0 && nPage <= nPages ? nPage : -1; 131 return nPage > 0 && nPage <= nPages ? nPage : -1;
132 } 132 }
133 133
134 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { 134 int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const {
135 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC()); 135 return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsStringC());
136 } 136 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_occontext.cpp ('k') | core/fpdfdoc/cpdf_viewerpreferences.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698