• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FPDFDOC_CPDF_PAGELABEL_H_
8 #define CORE_FPDFDOC_CPDF_PAGELABEL_H_
9 
10 #include "core/fxcrt/fx_string.h"
11 #include "third_party/base/optional.h"
12 
13 class CPDF_Document;
14 
15 class CPDF_PageLabel {
16  public:
17   explicit CPDF_PageLabel(CPDF_Document* pDocument);
18   ~CPDF_PageLabel();
19 
20   Optional<WideString> GetLabel(int nPage) const;
21   int32_t GetPageByLabel(const ByteStringView& bsLabel) const;
22   int32_t GetPageByLabel(const WideStringView& wsLabel) const;
23 
24  private:
25   UnownedPtr<CPDF_Document> const m_pDocument;
26 };
27 
28 #endif  // CORE_FPDFDOC_CPDF_PAGELABEL_H_
29