| 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 "xfa/fxfa/app/xfa_ffdochandler.h" | 7 #include "xfa/fxfa/app/xfa_ffdochandler.h" |
| 8 | 8 |
| 9 #include "xfa/fxfa/app/xfa_ffdoc.h" | 9 #include "xfa/fxfa/app/xfa_ffdoc.h" |
| 10 #include "xfa/fxfa/parser/xfa_script.h" | 10 #include "xfa/fxfa/parser/xfa_script.h" |
| 11 | 11 |
| 12 CXFA_FFDocHandler::CXFA_FFDocHandler() {} | 12 CXFA_FFDocHandler::CXFA_FFDocHandler() {} |
| 13 CXFA_FFDocHandler::~CXFA_FFDocHandler() {} | 13 CXFA_FFDocHandler::~CXFA_FFDocHandler() {} |
| 14 void CXFA_FFDocHandler::ReleaseDoc(IXFA_Doc* hDoc) { | 14 void CXFA_FFDocHandler::ReleaseDoc(IXFA_Doc* hDoc) { |
| 15 delete hDoc; // virtual dtor. | 15 delete hDoc; // virtual dtor. |
| 16 } | 16 } |
| 17 IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(IXFA_Doc* hDoc) { | 17 IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(IXFA_Doc* hDoc) { |
| 18 return static_cast<CXFA_FFDoc*>(hDoc)->GetDocProvider(); | 18 return static_cast<CXFA_FFDoc*>(hDoc)->GetDocProvider(); |
| 19 } | 19 } |
| 20 FX_DWORD CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc) { | 20 uint32_t CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc) { |
| 21 return static_cast<CXFA_FFDoc*>(hDoc)->GetDocType(); | 21 return static_cast<CXFA_FFDoc*>(hDoc)->GetDocType(); |
| 22 } | 22 } |
| 23 int32_t CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc) { | 23 int32_t CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc) { |
| 24 return static_cast<CXFA_FFDoc*>(hDoc)->StartLoad(); | 24 return static_cast<CXFA_FFDoc*>(hDoc)->StartLoad(); |
| 25 } | 25 } |
| 26 int32_t CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause) { | 26 int32_t CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause) { |
| 27 return static_cast<CXFA_FFDoc*>(hDoc)->DoLoad(pPause); | 27 return static_cast<CXFA_FFDoc*>(hDoc)->DoLoad(pPause); |
| 28 } | 28 } |
| 29 void CXFA_FFDocHandler::StopLoad(IXFA_Doc* hDoc) { | 29 void CXFA_FFDocHandler::StopLoad(IXFA_Doc* hDoc) { |
| 30 static_cast<CXFA_FFDoc*>(hDoc)->StopLoad(); | 30 static_cast<CXFA_FFDoc*>(hDoc)->StopLoad(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, | 33 IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, |
| 34 FX_DWORD dwView) { | 34 uint32_t dwView) { |
| 35 return static_cast<CXFA_FFDoc*>(hDoc)->CreateDocView(dwView); | 35 return static_cast<CXFA_FFDoc*>(hDoc)->CreateDocView(dwView); |
| 36 } | 36 } |
| 37 int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc) { | 37 int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc) { |
| 38 return 0; | 38 return 0; |
| 39 } | 39 } |
| 40 void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, | 40 void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, |
| 41 int32_t iPackage, | 41 int32_t iPackage, |
| 42 CFX_WideStringC& wsPackage) {} | 42 CFX_WideStringC& wsPackage) {} |
| 43 IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData( | 43 IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData( |
| 44 IXFA_Doc* hDoc, | 44 IXFA_Doc* hDoc, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 IXFA_ScriptContext* pScriptContext = pXFADoc->GetScriptContext(); | 102 IXFA_ScriptContext* pScriptContext = pXFADoc->GetScriptContext(); |
| 103 if (!pScriptContext) { | 103 if (!pScriptContext) { |
| 104 return FALSE; | 104 return FALSE; |
| 105 } | 105 } |
| 106 return pScriptContext->RunScript( | 106 return pScriptContext->RunScript( |
| 107 (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, hRetValue, | 107 (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, hRetValue, |
| 108 hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject, NULL) | 108 hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject, NULL) |
| 109 : NULL); | 109 : NULL); |
| 110 } | 110 } |
| OLD | NEW |