From 1770c021cf998ff1b33855b1397f6ea8ff9f7cd7 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Mar 2016 14:14:16 -0400 Subject: Move xfa/src up to xfa/. This CL moves the xfa/src files up to the xfa/ directory and fixes the includes, include guards, and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1803723002 . --- xfa/src/fxfa/app/xfa_ffdochandler.cpp | 110 ---------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 xfa/src/fxfa/app/xfa_ffdochandler.cpp (limited to 'xfa/src/fxfa/app/xfa_ffdochandler.cpp') diff --git a/xfa/src/fxfa/app/xfa_ffdochandler.cpp b/xfa/src/fxfa/app/xfa_ffdochandler.cpp deleted file mode 100644 index f2473659ec..0000000000 --- a/xfa/src/fxfa/app/xfa_ffdochandler.cpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "xfa/src/fxfa/app/xfa_ffdochandler.h" - -#include "xfa/src/fxfa/app/xfa_ffdoc.h" -#include "xfa/src/fxfa/parser/xfa_script.h" - -CXFA_FFDocHandler::CXFA_FFDocHandler() {} -CXFA_FFDocHandler::~CXFA_FFDocHandler() {} -void CXFA_FFDocHandler::ReleaseDoc(IXFA_Doc* hDoc) { - delete hDoc; // virtual dtor. -} -IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(IXFA_Doc* hDoc) { - return static_cast(hDoc)->GetDocProvider(); -} -FX_DWORD CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc) { - return static_cast(hDoc)->GetDocType(); -} -int32_t CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc) { - return static_cast(hDoc)->StartLoad(); -} -int32_t CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause* pPause) { - return static_cast(hDoc)->DoLoad(pPause); -} -void CXFA_FFDocHandler::StopLoad(IXFA_Doc* hDoc) { - static_cast(hDoc)->StopLoad(); -} - -IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, - FX_DWORD dwView) { - return static_cast(hDoc)->CreateDocView(dwView); -} -int32_t CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc) { - return 0; -} -void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, - int32_t iPackage, - CFX_WideStringC& wsPackage) {} -IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData( - IXFA_Doc* hDoc, - const CFX_WideStringC& wsPackage) { - return static_cast(hDoc)->GetPackageData(wsPackage); -} -FX_BOOL CXFA_FFDocHandler::SavePackage(IXFA_Doc* hDoc, - const CFX_WideStringC& wsPackage, - IFX_FileWrite* pFile, - IXFA_ChecksumContext* pCSContext) { - return static_cast(hDoc) - ->SavePackage(wsPackage, pFile, pCSContext); -} -FX_BOOL CXFA_FFDocHandler::CloseDoc(IXFA_Doc* hDoc) { - return static_cast(hDoc)->CloseDoc(); -} - -FX_BOOL CXFA_FFDocHandler::ImportData(IXFA_Doc* hDoc, - IFX_FileRead* pStream, - FX_BOOL bXDP) { - return static_cast(hDoc)->ImportData(pStream, bXDP); -} -void CXFA_FFDocHandler::SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) { - static_cast(hDoc)->GetXFADoc()->InitScriptContext(hRuntime); -} -FXJSE_HVALUE CXFA_FFDocHandler::GetXFAScriptObject(IXFA_Doc* hDoc) { - CXFA_Document* pXFADoc = static_cast(hDoc)->GetXFADoc(); - if (!pXFADoc) { - return NULL; - } - IXFA_ScriptContext* pScriptContext = pXFADoc->GetScriptContext(); - if (!pScriptContext) { - return NULL; - } - return pScriptContext->GetJSValueFromMap(pXFADoc->GetRoot()); -} -XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(IXFA_Doc* hDoc) { - CXFA_Document* pXFADoc = static_cast(hDoc)->GetXFADoc(); - if (!pXFADoc) { - return XFA_ATTRIBUTEENUM_Unknown; - } - CXFA_Node* pForm = ToNode(pXFADoc->GetXFAObject(XFA_HASHCODE_Form)); - if (!pForm) { - return XFA_ATTRIBUTEENUM_Unknown; - } - CXFA_Node* pSubForm = pForm->GetFirstChildByClass(XFA_ELEMENT_Subform); - if (!pSubForm) { - return XFA_ATTRIBUTEENUM_Unknown; - } - return pSubForm->GetEnum(XFA_ATTRIBUTE_RestoreState); -} -FX_BOOL CXFA_FFDocHandler::RunDocScript(IXFA_Doc* hDoc, - XFA_SCRIPTTYPE eScriptType, - const CFX_WideStringC& wsScript, - FXJSE_HVALUE hRetValue, - FXJSE_HVALUE hThisObject) { - CXFA_Document* pXFADoc = static_cast(hDoc)->GetXFADoc(); - if (!pXFADoc) { - return FALSE; - } - IXFA_ScriptContext* pScriptContext = pXFADoc->GetScriptContext(); - if (!pScriptContext) { - return FALSE; - } - return pScriptContext->RunScript( - (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, hRetValue, - hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject, NULL) - : NULL); -} -- cgit v1.2.3