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 "../../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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 return NULL; | 211 return NULL; |
212 } | 212 } |
213 CFX_ByteString csType = m_pDict->GetString("S"); | 213 CFX_ByteString csType = m_pDict->GetString("S"); |
214 if (csType == FX_BSTRC("Rendition")) { | 214 if (csType == FX_BSTRC("Rendition")) { |
215 return m_pDict->GetDict("AN"); | 215 return m_pDict->GetDict("AN"); |
216 } else if (csType == FX_BSTRC("Movie")) { | 216 } else if (csType == FX_BSTRC("Movie")) { |
217 return m_pDict->GetDict("Annotation"); | 217 return m_pDict->GetDict("Annotation"); |
218 } | 218 } |
219 return NULL; | 219 return NULL; |
220 } | 220 } |
221 FX_INT32 CPDF_Action::GetOperationType() const | 221 int32_t CPDF_Action::GetOperationType() const |
222 { | 222 { |
223 if (m_pDict == NULL) { | 223 if (m_pDict == NULL) { |
224 return 0; | 224 return 0; |
225 } | 225 } |
226 CFX_ByteString csType = m_pDict->GetString("S"); | 226 CFX_ByteString csType = m_pDict->GetString("S"); |
227 if (csType == FX_BSTRC("Rendition")) { | 227 if (csType == FX_BSTRC("Rendition")) { |
228 return m_pDict->GetInteger("OP"); | 228 return m_pDict->GetInteger("OP"); |
229 } else if (csType == FX_BSTRC("Movie")) { | 229 } else if (csType == FX_BSTRC("Movie")) { |
230 CFX_ByteString csOP = m_pDict->GetString("Operation"); | 230 CFX_ByteString csOP = m_pDict->GetString("Operation"); |
231 if (csOP == FX_BSTRC("Play")) { | 231 if (csOP == FX_BSTRC("Play")) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |