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 "fpdfsdk/include/fsdk_actionhandler.h" | 7 #include "fpdfsdk/include/fsdk_actionhandler.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 CPDF_Dest MyDest = action.GetDest(pPDFDocument); | 433 CPDF_Dest MyDest = action.GetDest(pPDFDocument); |
434 int nPageIndex = MyDest.GetPageIndex(pPDFDocument); | 434 int nPageIndex = MyDest.GetPageIndex(pPDFDocument); |
435 int nFitType = MyDest.GetZoomMode(); | 435 int nFitType = MyDest.GetZoomMode(); |
436 const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); | 436 const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); |
437 float* pPosAry = nullptr; | 437 float* pPosAry = nullptr; |
438 int sizeOfAry = 0; | 438 int sizeOfAry = 0; |
439 if (pMyArray) { | 439 if (pMyArray) { |
440 pPosAry = new float[pMyArray->GetCount()]; | 440 pPosAry = new float[pMyArray->GetCount()]; |
441 int j = 0; | 441 int j = 0; |
442 for (int i = 2; i < (int)pMyArray->GetCount(); i++) { | 442 for (size_t i = 2; i < pMyArray->GetCount(); i++) { |
443 pPosAry[j++] = pMyArray->GetFloatAt(i); | 443 pPosAry[j++] = pMyArray->GetFloatAt(i); |
444 } | 444 } |
445 sizeOfAry = j; | 445 sizeOfAry = j; |
446 } | 446 } |
447 | 447 |
448 CPDFDoc_Environment* pApp = pDocument->GetEnv(); | 448 CPDFDoc_Environment* pApp = pDocument->GetEnv(); |
449 pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry); | 449 pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry); |
450 delete[] pPosAry; | 450 delete[] pPosAry; |
451 } | 451 } |
452 | 452 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 const CPDF_Action& action, | 631 const CPDF_Action& action, |
632 CPDFSDK_Document* pDocument) { | 632 CPDFSDK_Document* pDocument) { |
633 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm(); | 633 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm(); |
634 if (pInterForm->DoAction_ImportData(action)) { | 634 if (pInterForm->DoAction_ImportData(action)) { |
635 pDocument->SetChangeMark(); | 635 pDocument->SetChangeMark(); |
636 return TRUE; | 636 return TRUE; |
637 } | 637 } |
638 | 638 |
639 return FALSE; | 639 return FALSE; |
640 } | 640 } |
OLD | NEW |