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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 if (!ToDictionary(pAction)) { | 317 if (!ToDictionary(pAction)) { |
317 return CPDF_Action(); | 318 return CPDF_Action(); |
318 } | 319 } |
319 return CPDF_Action(pAction->GetDict()); | 320 return CPDF_Action(pAction->GetDict()); |
320 } | 321 } |
321 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { | 322 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { |
322 ASSERT(m_pDocument != NULL); | 323 ASSERT(m_pDocument != NULL); |
323 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); | 324 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); |
324 return name_tree.GetIndex(csName); | 325 return name_tree.GetIndex(csName); |
325 } | 326 } |
OLD | NEW |