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

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

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. 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
« 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return CPDF_Action(pArray->GetDict(iIndex)); 275 return CPDF_Action(pArray->GetDict(iIndex));
276 } 276 }
277 return CPDF_Action(); 277 return CPDF_Action();
278 } 278 }
279 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV", "PI", 279 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV", "PI",
280 "O", "C", 280 "O", "C",
281 "K", "F", "V", "C", 281 "K", "F", "V", "C",
282 "WC", "WS", "DS", "WP", "DP", 282 "WC", "WS", "DS", "WP", "DP",
283 "" 283 ""
284 }; 284 };
285 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const 285 bool CPDF_AAction::ActionExist(AActionType eType) const
286 { 286 {
287 if (m_pDict == NULL) { 287 if (m_pDict == NULL) {
288 return FALSE; 288 return false;
289 } 289 }
290 return m_pDict->KeyExist(g_sAATypes[(int)eType]); 290 return m_pDict->KeyExist(g_sAATypes[(int)eType]);
291 } 291 }
292 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const 292 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const
293 { 293 {
294 if (!m_pDict) { 294 if (!m_pDict) {
295 return CPDF_Action(); 295 return CPDF_Action();
296 } 296 }
297 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); 297 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType]));
298 } 298 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 return CPDF_Action(); 356 return CPDF_Action();
357 } 357 }
358 return CPDF_Action(pAction->GetDict()); 358 return CPDF_Action(pAction->GetDict());
359 } 359 }
360 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const 360 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const
361 { 361 {
362 ASSERT(m_pDocument != NULL); 362 ASSERT(m_pDocument != NULL);
363 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); 363 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript"));
364 return name_tree.GetIndex(csName); 364 return name_tree.GetIndex(csName);
365 } 365 }
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