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

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 1274803004: Merge to XFA: Remove dead code from CPDF_Metadata. Add missing nullptr check. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@xfa
Patch Set: Created 5 years, 4 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 | « no previous file | core/src/fpdfdoc/doc_metadata.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 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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 1151
1151 CFX_WideString GetLabel(int nPage) const; 1152 CFX_WideString GetLabel(int nPage) const;
1152 1153
1153 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const; 1154 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const;
1154 1155
1155 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const; 1156 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const;
1156 1157
1157 protected: 1158 protected:
1158 CPDF_Document* m_pDocument; 1159 CPDF_Document* m_pDocument;
1159 }; 1160 };
1161
1160 class CPDF_Metadata { 1162 class CPDF_Metadata {
1161 public: 1163 public:
1162 CPDF_Metadata(); 1164 explicit CPDF_Metadata(CPDF_Document* pDoc);
1163
1164 ~CPDF_Metadata(); 1165 ~CPDF_Metadata();
1165 1166
1166 void LoadDoc(CPDF_Document* pDoc); 1167 const CXML_Element* GetRoot() const;
1167 1168
1168 int32_t GetString(const CFX_ByteStringC& bsItem, CFX_WideString& wsStr); 1169 private:
1170 CPDF_Document* const m_pDoc; // Not owned.
1171 nonstd::unique_ptr<CXML_Element> m_pXmlElement;
1172 };
1169 1173
1170 CXML_Element* GetRoot() const;
1171
1172 CXML_Element* GetRDF() const;
1173
1174 protected:
1175 void* m_pData;
1176 };
1177 class CPDF_ViewerPreferences { 1174 class CPDF_ViewerPreferences {
1178 public: 1175 public:
1179 CPDF_ViewerPreferences(CPDF_Document* pDoc); 1176 CPDF_ViewerPreferences(CPDF_Document* pDoc);
1180 1177
1181 ~CPDF_ViewerPreferences(); 1178 ~CPDF_ViewerPreferences();
1182 1179
1183 FX_BOOL IsDirectionR2L() const; 1180 FX_BOOL IsDirectionR2L() const;
1184 1181
1185 FX_BOOL PrintScaling() const; 1182 FX_BOOL PrintScaling() const;
1186 1183
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 FX_FLOAT fc[4], 1255 FX_FLOAT fc[4],
1259 const CFX_ByteStringC& csEntry); 1256 const CFX_ByteStringC& csEntry);
1260 1257
1261 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry); 1258 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry);
1262 1259
1263 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); 1260 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry);
1264 friend class CPDF_FormControl; 1261 friend class CPDF_FormControl;
1265 }; 1262 };
1266 1263
1267 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 1264 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698