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

Side by Side Diff: core/src/fpdfdoc/doc_action.cpp

Issue 1258093002: FX Bool considered harmful, part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@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 | « core/src/fpdfapi/fpdf_render/render_int.h ('k') | core/src/fpdfdoc/doc_annot.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 #include "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const 8 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const
9 { 9 {
10 if (!m_pDict) { 10 if (!m_pDict) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return CPDF_Action(pArray->GetDict(iIndex)); 282 return CPDF_Action(pArray->GetDict(iIndex));
283 } 283 }
284 return CPDF_Action(); 284 return CPDF_Action();
285 } 285 }
286 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV", "PI", 286 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV", "PI",
287 "O", "C", 287 "O", "C",
288 "K", "F", "V", "C", 288 "K", "F", "V", "C",
289 "WC", "WS", "DS", "WP", "DP", 289 "WC", "WS", "DS", "WP", "DP",
290 "" 290 ""
291 }; 291 };
292 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const 292 bool CPDF_AAction::ActionExist(AActionType eType) const
293 { 293 {
294 if (m_pDict == NULL) { 294 if (m_pDict == NULL) {
295 return FALSE; 295 return false;
296 } 296 }
297 return m_pDict->KeyExist(g_sAATypes[(int)eType]); 297 return m_pDict->KeyExist(g_sAATypes[(int)eType]);
298 } 298 }
299 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const 299 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const
300 { 300 {
301 if (!m_pDict) { 301 if (!m_pDict) {
302 return CPDF_Action(); 302 return CPDF_Action();
303 } 303 }
304 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); 304 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType]));
305 } 305 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 return CPDF_Action(); 363 return CPDF_Action();
364 } 364 }
365 return CPDF_Action(pAction->GetDict()); 365 return CPDF_Action(pAction->GetDict());
366 } 366 }
367 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const 367 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const
368 { 368 {
369 ASSERT(m_pDocument != NULL); 369 ASSERT(m_pDocument != NULL);
370 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); 370 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript"));
371 return name_tree.GetIndex(csName); 371 return name_tree.GetIndex(csName);
372 } 372 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/render_int.h ('k') | core/src/fpdfdoc/doc_annot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698