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

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

Issue 1282653002: Remove dead code from CPDF_Metadata. Add missing nullptr check. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
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') | core/src/fpdfdoc/doc_metadata.cpp » ('J')
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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_metadata.cpp » ('j') | core/src/fpdfdoc/doc_metadata.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698