| OLD | NEW |
| 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 "core/include/fpdfdoc/fpdf_doc.h" |
| 8 |
| 8 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const { | 9 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const { |
| 9 if (!m_pDict) { | 10 if (!m_pDict) { |
| 10 return CPDF_Dest(); | 11 return CPDF_Dest(); |
| 11 } | 12 } |
| 12 CFX_ByteString type = m_pDict->GetString("S"); | 13 CFX_ByteString type = m_pDict->GetString("S"); |
| 13 if (type != "GoTo" && type != "GoToR") { | 14 if (type != "GoTo" && type != "GoToR") { |
| 14 return CPDF_Dest(); | 15 return CPDF_Dest(); |
| 15 } | 16 } |
| 16 CPDF_Object* pDest = m_pDict->GetElementValue("D"); | 17 CPDF_Object* pDest = m_pDict->GetElementValue("D"); |
| 17 if (!pDest) { | 18 if (!pDest) { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 if (!ToDictionary(pAction)) { | 319 if (!ToDictionary(pAction)) { |
| 319 return CPDF_Action(); | 320 return CPDF_Action(); |
| 320 } | 321 } |
| 321 return CPDF_Action(pAction->GetDict()); | 322 return CPDF_Action(pAction->GetDict()); |
| 322 } | 323 } |
| 323 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { | 324 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { |
| 324 ASSERT(m_pDocument != NULL); | 325 ASSERT(m_pDocument != NULL); |
| 325 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); | 326 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); |
| 326 return name_tree.GetIndex(csName); | 327 return name_tree.GetIndex(csName); |
| 327 } | 328 } |
| OLD | NEW |