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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 if (type != "GoToR" && type != "Launch" && type != "SubmitForm" && | 66 if (type != "GoToR" && type != "Launch" && type != "SubmitForm" && |
67 type != "ImportData") { | 67 type != "ImportData") { |
68 return CFX_WideString(); | 68 return CFX_WideString(); |
69 } | 69 } |
70 CPDF_Object* pFile = m_pDict->GetDirectObjectBy("F"); | 70 CPDF_Object* pFile = m_pDict->GetDirectObjectBy("F"); |
71 CFX_WideString path; | 71 CFX_WideString path; |
72 if (!pFile) { | 72 if (!pFile) { |
73 if (type == "Launch") { | 73 if (type == "Launch") { |
74 CPDF_Dictionary* pWinDict = m_pDict->GetDictBy("Win"); | 74 CPDF_Dictionary* pWinDict = m_pDict->GetDictBy("Win"); |
75 if (pWinDict) { | 75 if (pWinDict) { |
76 return CFX_WideString::FromLocal(pWinDict->GetStringBy("F")); | 76 return CFX_WideString::FromLocal( |
| 77 pWinDict->GetStringBy("F").AsByteStringC()); |
77 } | 78 } |
78 } | 79 } |
79 return path; | 80 return path; |
80 } | 81 } |
81 CPDF_FileSpec filespec(pFile); | 82 CPDF_FileSpec filespec(pFile); |
82 filespec.GetFileName(&path); | 83 filespec.GetFileName(&path); |
83 return path; | 84 return path; |
84 } | 85 } |
85 CFX_ByteString CPDF_Action::GetURI(CPDF_Document* pDoc) const { | 86 CFX_ByteString CPDF_Action::GetURI(CPDF_Document* pDoc) const { |
86 CFX_ByteString csURI; | 87 CFX_ByteString csURI; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 if (!ToDictionary(pAction)) { | 295 if (!ToDictionary(pAction)) { |
295 return CPDF_Action(); | 296 return CPDF_Action(); |
296 } | 297 } |
297 return CPDF_Action(pAction->GetDict()); | 298 return CPDF_Action(pAction->GetDict()); |
298 } | 299 } |
299 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { | 300 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { |
300 ASSERT(m_pDocument); | 301 ASSERT(m_pDocument); |
301 CPDF_NameTree name_tree(m_pDocument, "JavaScript"); | 302 CPDF_NameTree name_tree(m_pDocument, "JavaScript"); |
302 return name_tree.GetIndex(csName); | 303 return name_tree.GetIndex(csName); |
303 } | 304 } |
OLD | NEW |