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 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 | 11 |
| 12 #include "../../../third_party/base/nonstd_unique_ptr.h" |
12 #include "../fpdfapi/fpdf_parser.h" | 13 #include "../fpdfapi/fpdf_parser.h" |
13 #include "../fpdfapi/fpdf_render.h" | 14 #include "../fpdfapi/fpdf_render.h" |
14 | 15 |
15 class CFieldTree; | 16 class CFieldTree; |
16 class CPDF_AAction; | 17 class CPDF_AAction; |
17 class CPDF_Action; | 18 class CPDF_Action; |
18 class CPDF_ActionFields; | 19 class CPDF_ActionFields; |
19 class CPDF_Annot; | 20 class CPDF_Annot; |
20 class CPDF_AnnotList; | 21 class CPDF_AnnotList; |
21 class CPDF_ApSettings; | 22 class CPDF_ApSettings; |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 | 1145 |
1145 CFX_WideString GetLabel(int nPage) const; | 1146 CFX_WideString GetLabel(int nPage) const; |
1146 | 1147 |
1147 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const; | 1148 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const; |
1148 | 1149 |
1149 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const; | 1150 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const; |
1150 | 1151 |
1151 protected: | 1152 protected: |
1152 CPDF_Document* m_pDocument; | 1153 CPDF_Document* m_pDocument; |
1153 }; | 1154 }; |
| 1155 |
1154 class CPDF_Metadata { | 1156 class CPDF_Metadata { |
1155 public: | 1157 public: |
1156 CPDF_Metadata(); | 1158 explicit CPDF_Metadata(CPDF_Document* pDoc); |
1157 | |
1158 ~CPDF_Metadata(); | 1159 ~CPDF_Metadata(); |
1159 | 1160 |
1160 void LoadDoc(CPDF_Document* pDoc); | 1161 const CXML_Element* GetRoot() const; |
1161 | 1162 |
1162 int32_t GetString(const CFX_ByteStringC& bsItem, CFX_WideString& wsStr); | 1163 private: |
| 1164 CPDF_Document* const m_pDoc; // Not owned. |
| 1165 nonstd::unique_ptr<CXML_Element> m_pXmlElement; |
| 1166 }; |
1163 | 1167 |
1164 CXML_Element* GetRoot() const; | |
1165 | |
1166 CXML_Element* GetRDF() const; | |
1167 | |
1168 protected: | |
1169 void* m_pData; | |
1170 }; | |
1171 class CPDF_ViewerPreferences { | 1168 class CPDF_ViewerPreferences { |
1172 public: | 1169 public: |
1173 CPDF_ViewerPreferences(CPDF_Document* pDoc); | 1170 CPDF_ViewerPreferences(CPDF_Document* pDoc); |
1174 | 1171 |
1175 ~CPDF_ViewerPreferences(); | 1172 ~CPDF_ViewerPreferences(); |
1176 | 1173 |
1177 FX_BOOL IsDirectionR2L() const; | 1174 FX_BOOL IsDirectionR2L() const; |
1178 | 1175 |
1179 FX_BOOL PrintScaling() const; | 1176 FX_BOOL PrintScaling() const; |
1180 | 1177 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 FX_FLOAT fc[4], | 1249 FX_FLOAT fc[4], |
1253 const CFX_ByteStringC& csEntry); | 1250 const CFX_ByteStringC& csEntry); |
1254 | 1251 |
1255 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry); | 1252 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry); |
1256 | 1253 |
1257 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); | 1254 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); |
1258 friend class CPDF_FormControl; | 1255 friend class CPDF_FormControl; |
1259 }; | 1256 }; |
1260 | 1257 |
1261 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1258 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
OLD | NEW |