| 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 #include "fpdfsdk/include/fsdk_define.h" | 8 #include "fpdfsdk/include/fsdk_define.h" |
| 9 #include "fpdfsdk/include/fsdk_mgr.h" | 9 #include "fpdfsdk/include/fsdk_mgr.h" |
| 10 #include "fpdfsdk/include/javascript/IJavaScript.h" | 10 #include "fpdfsdk/include/javascript/IJavaScript.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 CPDF_Dest MyDest = action.GetDest(pPDFDocument); | 429 CPDF_Dest MyDest = action.GetDest(pPDFDocument); |
| 430 int nPageIndex = MyDest.GetPageIndex(pPDFDocument); | 430 int nPageIndex = MyDest.GetPageIndex(pPDFDocument); |
| 431 int nFitType = MyDest.GetZoomMode(); | 431 int nFitType = MyDest.GetZoomMode(); |
| 432 const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); | 432 const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); |
| 433 float* pPosAry = nullptr; | 433 float* pPosAry = nullptr; |
| 434 int sizeOfAry = 0; | 434 int sizeOfAry = 0; |
| 435 if (pMyArray) { | 435 if (pMyArray) { |
| 436 pPosAry = new float[pMyArray->GetCount()]; | 436 pPosAry = new float[pMyArray->GetCount()]; |
| 437 int j = 0; | 437 int j = 0; |
| 438 for (int i = 2; i < (int)pMyArray->GetCount(); i++) { | 438 for (int i = 2; i < (int)pMyArray->GetCount(); i++) { |
| 439 pPosAry[j++] = pMyArray->GetFloat(i); | 439 pPosAry[j++] = pMyArray->GetFloatAt(i); |
| 440 } | 440 } |
| 441 sizeOfAry = j; | 441 sizeOfAry = j; |
| 442 } | 442 } |
| 443 | 443 |
| 444 CPDFDoc_Environment* pApp = pDocument->GetEnv(); | 444 CPDFDoc_Environment* pApp = pDocument->GetEnv(); |
| 445 pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry); | 445 pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry); |
| 446 delete[] pPosAry; | 446 delete[] pPosAry; |
| 447 } | 447 } |
| 448 | 448 |
| 449 void CPDFSDK_ActionHandler::DoAction_GoToR(CPDFSDK_Document* pDocument, | 449 void CPDFSDK_ActionHandler::DoAction_GoToR(CPDFSDK_Document* pDocument, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 const CPDF_Action& action, | 627 const CPDF_Action& action, |
| 628 CPDFSDK_Document* pDocument) { | 628 CPDFSDK_Document* pDocument) { |
| 629 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm(); | 629 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm(); |
| 630 if (pInterForm->DoAction_ImportData(action)) { | 630 if (pInterForm->DoAction_ImportData(action)) { |
| 631 pDocument->SetChangeMark(); | 631 pDocument->SetChangeMark(); |
| 632 return TRUE; | 632 return TRUE; |
| 633 } | 633 } |
| 634 | 634 |
| 635 return FALSE; | 635 return FALSE; |
| 636 } | 636 } |
| OLD | NEW |