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

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

Issue 1194933003: Make CPDF_Object::GetString() a virtual method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 5 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
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>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 m_pDict = pDict; 194 m_pDict = pDict;
195 } 195 }
196 196
197 operator CPDF_Dictionary* () const 197 operator CPDF_Dictionary* () const
198 { 198 {
199 return m_pDict; 199 return m_pDict;
200 } 200 }
201 201
202 inline CFX_ByteString GetFileName() 202 inline CFX_ByteString GetFileName()
203 { 203 {
204 return m_pDict->GetString("F"); 204 return m_pDict->GetStringAt("F");
205 } 205 }
206 206
207 207
208 inline CFX_ByteString GetDefaultDirectory() 208 inline CFX_ByteString GetDefaultDirectory()
209 { 209 {
210 return m_pDict->GetString("D"); 210 return m_pDict->GetStringAt("D");
211 } 211 }
212 212
213 213
214 inline CFX_ByteString GetOperation() 214 inline CFX_ByteString GetOperation()
215 { 215 {
216 return m_pDict->GetString("O"); 216 return m_pDict->GetStringAt("O");
217 } 217 }
218 218
219 219
220 inline CFX_ByteString GetParameter() 220 inline CFX_ByteString GetParameter()
221 { 221 {
222 return m_pDict->GetString("P"); 222 return m_pDict->GetStringAt("P");
223 } 223 }
224 224
225 CPDF_Dictionary* m_pDict; 225 CPDF_Dictionary* m_pDict;
226 }; 226 };
227 class CPDF_ActionFields 227 class CPDF_ActionFields
228 { 228 {
229 public: 229 public:
230 230
231 CPDF_ActionFields(const CPDF_Action* pAction) 231 CPDF_ActionFields(const CPDF_Action* pAction)
232 { 232 {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 CPDF_Action() : m_pDict(nullptr) { } 280 CPDF_Action() : m_pDict(nullptr) { }
281 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) { } 281 explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) { }
282 282
283 operator bool () const { return m_pDict != NULL; } 283 operator bool () const { return m_pDict != NULL; }
284 284
285 CPDF_Dictionary* GetDict() const { return m_pDict; } 285 CPDF_Dictionary* GetDict() const { return m_pDict; }
286 286
287 CFX_ByteString GetTypeName() const 287 CFX_ByteString GetTypeName() const
288 { 288 {
289 return m_pDict->GetString("S"); 289 return m_pDict->GetStringAt("S");
290 } 290 }
291 291
292 ActionType GetType() const; 292 ActionType GetType() const;
293 293
294 CPDF_Dest GetDest(CPDF_Document* pDoc) const; 294 CPDF_Dest GetDest(CPDF_Document* pDoc) const;
295 295
296 CFX_WideString GetFilePath() const; 296 CFX_WideString GetFilePath() const;
297 297
298 FX_BOOL GetNewWindow() const 298 FX_BOOL GetNewWindow() const
299 { 299 {
(...skipping 14 matching lines...) Expand all
314 return this; 314 return this;
315 } 315 }
316 316
317 FX_BOOL GetHideStatus() const 317 FX_BOOL GetHideStatus() const
318 { 318 {
319 return m_pDict->GetBoolean("H", TRUE); 319 return m_pDict->GetBoolean("H", TRUE);
320 } 320 }
321 321
322 CFX_ByteString GetNamedAction() const 322 CFX_ByteString GetNamedAction() const
323 { 323 {
324 return m_pDict->GetString("N"); 324 return m_pDict->GetStringAt("N");
325 } 325 }
326 326
327 FX_DWORD GetFlags() const 327 FX_DWORD GetFlags() const
328 { 328 {
329 return m_pDict->GetInteger("Flags"); 329 return m_pDict->GetInteger("Flags");
330 } 330 }
331 331
332 CFX_WideString GetJavaScript() const; 332 CFX_WideString GetJavaScript() const;
333 333
334 CPDF_Dictionary* GetAnnot() const; 334 CPDF_Dictionary* GetAnnot() const;
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 1695
1696 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], const CFX_ByteStringC& csEntry); 1696 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], const CFX_ByteStringC& csEntry);
1697 1697
1698 CFX_WideString GetCaption(const CFX_ByteStringC& csEntr y); 1698 CFX_WideString GetCaption(const CFX_ByteStringC& csEntr y);
1699 1699
1700 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); 1700 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry);
1701 friend class CPDF_FormControl; 1701 friend class CPDF_FormControl;
1702 }; 1702 };
1703 1703
1704 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 1704 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698