diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-19 05:53:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-19 05:53:40 -0700 |
commit | 0582ad18b1e7ab9e404b7f8071a015ec756f5afe (patch) | |
tree | 4c0807ec379b17fc4439f6e3183faa881edb291c /xfa | |
parent | 86d945b2d24edade9c7175be1c31b246f54b04ca (diff) | |
download | pdfium-0582ad18b1e7ab9e404b7f8071a015ec756f5afe.tar.xz |
XFA unused function cleanup
This CL removes a series of unused XFA methods.
Review URL: https://codereview.chromium.org/1899103002
Diffstat (limited to 'xfa')
37 files changed, 24 insertions, 300 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index 27e779510a..1fecee7547 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -20,7 +20,7 @@ #include "xfa/fxfa/include/xfa_ffdocview.h" #include "xfa/fxfa/include/xfa_ffwidget.h" #include "xfa/fxfa/include/xfa_fontmgr.h" -#include "xfa/fxfa/parser/xfa_docdata.h" +#include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_serialize.h" #include "xfa/fxfa/parser/xfa_parser.h" #include "xfa/fxfa/parser/xfa_parser_imp.h" diff --git a/xfa/fxfa/include/fxfa_basic.h b/xfa/fxfa/include/fxfa_basic.h index 15fbc85ef4..30b7b6bdfe 100644 --- a/xfa/fxfa/include/fxfa_basic.h +++ b/xfa/fxfa/include/fxfa_basic.h @@ -926,9 +926,10 @@ struct XFA_ELEMENTINFO { uint32_t dwPackets; uint32_t eObjectType; }; -int32_t XFA_GetElementCount(); + const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName); const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName); + enum XFA_ATTRIBUTETYPE { XFA_ATTRIBUTETYPE_NOTSURE, XFA_ATTRIBUTETYPE_Enum, @@ -945,7 +946,7 @@ struct XFA_ATTRIBUTEINFO { uint32_t dwPackets; void* pDefValue; }; -int32_t XFA_GetAttributeCount(); + const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName); const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_ATTRIBUTE eName); FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, @@ -962,9 +963,6 @@ CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); -int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, - XFA_ATTRIBUTE eAttribute, - uint32_t dwPacket); CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); @@ -981,12 +979,9 @@ struct XFA_SCRIPTHIERARCHY { int16_t wParentIndex; }; -typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY; const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount); const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount); -const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement, - XFA_ELEMENT eChild, - uint32_t dwPacket); + const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); @@ -1047,15 +1042,17 @@ class CXFA_Measurement { FX_FLOAT m_fValue; XFA_UNIT m_eUnit; }; + class CFXJSE_Arguments; class CXFA_Object; + typedef void (CXFA_Object::*XFA_METHOD_CALLBACK)(CFXJSE_Arguments* pArguments); struct XFA_METHODINFO { uint32_t uHash; const FX_WCHAR* pName; XFA_METHOD_CALLBACK lpfnCallback; }; -int32_t XFA_GetMethodCount(); + const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsMethodName); typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK)(FXJSE_HVALUE hValue, diff --git a/xfa/fxfa/parser/xfa_basic_data.cpp b/xfa/fxfa/parser/xfa_basic_data.cpp index f8a26dc1cd..822b23f5e6 100644 --- a/xfa/fxfa/parser/xfa_basic_data.cpp +++ b/xfa/fxfa/parser/xfa_basic_data.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp index 112e247016..04cd0cdcb3 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.cpp +++ b/xfa/fxfa/parser/xfa_basic_imp.cpp @@ -12,7 +12,6 @@ #include "xfa/fgas/crt/fgas_system.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_data.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" @@ -86,9 +85,7 @@ const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByName( const XFA_ATTRIBUTEENUMINFO* XFA_GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName) { return g_XFAEnumData + eName; } -int32_t XFA_GetAttributeCount() { - return g_iXFAAttributeCount; -} + const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName) { int32_t iLength = wsName.GetLength(); if (iLength == 0) { @@ -167,16 +164,7 @@ FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, } return FALSE; } -int32_t XFA_GetAttributeDefaultValue_Integer(XFA_ELEMENT eElement, - XFA_ATTRIBUTE eAttribute, - uint32_t dwPacket) { - void* pValue; - if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute, - XFA_ATTRIBUTETYPE_Integer, dwPacket)) { - return (int32_t)(uintptr_t)pValue; - } - return 0; -} + CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { @@ -187,9 +175,7 @@ CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, } return CXFA_Measurement(); } -int32_t XFA_GetElementCount() { - return g_iXFAElementCount; -} + const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) { int32_t iLength = wsName.GetLength(); if (iLength == 0) { @@ -248,25 +234,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, return pInfo; return (dwPacket & pInfo->dwPackets) ? pInfo : NULL; } -const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement, - XFA_ELEMENT eChild, - uint32_t dwPacket) { - int32_t iCount = 0; - const uint16_t* pChild = XFA_GetElementChildren(eElement, iCount); - if (pChild == NULL || iCount < 1) { - return NULL; - } - CFX_DSPATemplate<uint16_t> search; - int32_t index = search.Lookup(eChild, pChild, iCount); - if (index < 0) { - return NULL; - } - const XFA_ELEMENTINFO* pInfo = XFA_GetElementByID(eChild); - ASSERT(pInfo); - if (dwPacket == XFA_XDPPACKET_UNKNOWN) - return pInfo; - return (dwPacket & pInfo->dwPackets) ? pInfo : NULL; -} + const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement, int32_t& iCount) { if (eElement >= g_iXFAElementCount) { @@ -363,9 +331,7 @@ const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(XFA_ELEMENT eElement, } while (iStart <= iEnd); return NULL; } -int32_t XFA_GetMethodCount() { - return g_iSomMethodCount; -} + const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, const CFX_WideStringC& wsMethodName) { int32_t iLength = wsMethodName.GetLength(); @@ -374,7 +340,7 @@ const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, } int32_t iElementIndex = eElement; while (iElementIndex != -1) { - XFA_LPCSCRIPTHIERARCHY scriptIndex = g_XFAScriptIndex + iElementIndex; + XFA_SCRIPTHIERARCHY const* scriptIndex = g_XFAScriptIndex + iElementIndex; int32_t icount = scriptIndex->wMethodCount; if (icount == 0) { iElementIndex = scriptIndex->wParentIndex; @@ -406,7 +372,7 @@ const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName( } int32_t iElementIndex = eElement; while (iElementIndex != -1) { - XFA_LPCSCRIPTHIERARCHY scriptIndex = g_XFAScriptIndex + iElementIndex; + XFA_SCRIPTHIERARCHY const* scriptIndex = g_XFAScriptIndex + iElementIndex; int32_t icount = scriptIndex->wAttributeCount; if (icount == 0) { iElementIndex = scriptIndex->wParentIndex; diff --git a/xfa/fxfa/parser/xfa_docdata.h b/xfa/fxfa/parser/xfa_docdata.h deleted file mode 100644 index 690ff3334f..0000000000 --- a/xfa/fxfa/parser/xfa_docdata.h +++ /dev/null @@ -1,16 +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 - -#ifndef XFA_FXFA_PARSER_XFA_DOCDATA_H_ -#define XFA_FXFA_PARSER_XFA_DOCDATA_H_ - -#include "xfa/fxfa/parser/xfa_document.h" - -enum XFA_DATAFORMAT { - XFA_DATAFORMAT_XDP, -}; - -#endif // XFA_FXFA_PARSER_XFA_DOCDATA_H_ diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp index b267fce339..ed392ff1b6 100644 --- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp @@ -5,7 +5,6 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 6ee4ec8d9a..22d3c625c9 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -11,7 +11,6 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/cxfa_occur.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_datadescription_imp.h" diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index 8ea2ebb1cb..bdcfba47cb 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_document_layout_imp.cpp b/xfa/fxfa/parser/xfa_document_layout_imp.cpp index eea99ece88..9b9a879d4d 100644 --- a/xfa/fxfa/parser/xfa_document_layout_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_layout_imp.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h" diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 3c06afaf4a..09b51914ca 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -9,7 +9,6 @@ #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_document_serialize.h b/xfa/fxfa/parser/xfa_document_serialize.h index 9bde4b038e..6448953231 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.h +++ b/xfa/fxfa/parser/xfa_document_serialize.h @@ -7,7 +7,13 @@ #ifndef XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_ #define XFA_FXFA_PARSER_XFA_DOCUMENT_SERIALIZE_H_ -#include "xfa/fxfa/parser/xfa_docdata.h" +#include "core/fxcrt/include/fx_string.h" + +class CXFA_Document; +class CXFA_Node; +class IFX_FileRead; +class IFX_FileWrite; +class IFX_Stream; class CXFA_DataImporter { public: diff --git a/xfa/fxfa/parser/xfa_layout_appadapter.cpp b/xfa/fxfa/parser/xfa_layout_appadapter.cpp index 56ef086f82..2331972c75 100644 --- a/xfa/fxfa/parser/xfa_layout_appadapter.cpp +++ b/xfa/fxfa/parser/xfa_layout_appadapter.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp index 17f97da779..1d3e31e276 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp @@ -13,7 +13,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/cxfa_occur.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp index c1f7514bcf..75bcbbecae 100644 --- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_datamerger_imp.h" diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index 91ca23e920..ee6d289a25 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -8,7 +8,6 @@ #include "core/fxcrt/include/fx_xml.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 9b605b0844..90c9824b76 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -10,7 +10,6 @@ #include "core/fxcrt/include/fx_xml.h" #include "core/fxge/include/fx_ge.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_locale.h" diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp index 6dd8377465..2c018ea72d 100644 --- a/xfa/fxfa/parser/xfa_localevalue.cpp +++ b/xfa/fxfa/parser/xfa_localevalue.cpp @@ -8,7 +8,6 @@ #include "xfa/fgas/localization/fgas_localeimp.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index e796b96326..0779cbf2b3 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -783,21 +783,9 @@ inline const CXFA_NodeList* CXFA_Object::AsNodeList() const { inline CXFA_Node* ToNode(CXFA_Object* pObj) { return pObj ? pObj->AsNode() : nullptr; } -inline CXFA_OrdinaryObject* ToOrdinaryObject(CXFA_Object* pObj) { - return pObj ? pObj->AsOrdinaryObject() : nullptr; -} -inline CXFA_NodeList* ToNodeList(CXFA_Object* pObj) { - return pObj ? pObj->AsNodeList() : nullptr; -} inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { return pObj ? pObj->AsNode() : nullptr; } -inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { - return pObj ? pObj->AsOrdinaryObject() : nullptr; -} -inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { - return pObj ? pObj->AsNodeList() : nullptr; -} #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index 156aa6f29b..306bd0f173 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -14,7 +14,6 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/cxfa_occur.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index 5dd6be50ce..4c53d3f512 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -11,7 +11,6 @@ #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/include/xfa_checksum.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script.h b/xfa/fxfa/parser/xfa_script.h index e608d4feec..971fe06b56 100644 --- a/xfa/fxfa/parser/xfa_script.h +++ b/xfa/fxfa/parser/xfa_script.h @@ -74,11 +74,4 @@ struct XFA_RESOLVENODE_RS { const XFA_SCRIPTATTRIBUTEINFO* pScriptAttribute; }; -struct XFA_JSBUILTININFO { - uint32_t uUnicodeHash; - const FX_CHAR* pName; -}; - -const XFA_JSBUILTININFO* XFA_GetJSBuiltinByHash(uint32_t uHashCode); - #endif // XFA_FXFA_PARSER_XFA_SCRIPT_H_ diff --git a/xfa/fxfa/parser/xfa_script_datawindow.cpp b/xfa/fxfa/parser/xfa_script_datawindow.cpp index c3383938fc..8ce5061c03 100644 --- a/xfa/fxfa/parser/xfa_script_datawindow.cpp +++ b/xfa/fxfa/parser/xfa_script_datawindow.cpp @@ -7,7 +7,6 @@ #include "xfa/fxfa/parser/xfa_script_datawindow.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp index 64f6b93cb9..2ddf0920d5 100644 --- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp @@ -9,7 +9,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/include/xfa_ffwidgethandler.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" @@ -138,12 +137,6 @@ void CScript_EventPseudoModel::Script_EventPseudoModel_Property( break; } } -void CScript_EventPseudoModel::Script_EventPseudoModel_CancelAction( - FXJSE_HVALUE hValue, - FX_BOOL bSetting, - XFA_ATTRIBUTE eAttribute) { - Script_EventPseudoModel_Property(hValue, XFA_EVENT_CANCELACTION, bSetting); -} void CScript_EventPseudoModel::Script_EventPseudoModel_Change( FXJSE_HVALUE hValue, FX_BOOL bSetting, diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.h b/xfa/fxfa/parser/xfa_script_eventpseudomodel.h index 1c185f5462..f2a11357cb 100644 --- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.h +++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.h @@ -33,9 +33,6 @@ class CScript_EventPseudoModel : public CXFA_OrdinaryObject { explicit CScript_EventPseudoModel(CXFA_Document* pDocument); virtual ~CScript_EventPseudoModel(); - void Script_EventPseudoModel_CancelAction(FXJSE_HVALUE hValue, - FX_BOOL bSetting, - XFA_ATTRIBUTE eAttribute); void Script_EventPseudoModel_Change(FXJSE_HVALUE hValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp index 647962a2ab..6a8700c670 100644 --- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp index 84d84bd153..ee95865dc6 100644 --- a/xfa/fxfa/parser/xfa_script_imp.cpp +++ b/xfa/fxfa/parser/xfa_script_imp.cpp @@ -9,7 +9,6 @@ #include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp index ab7f6923d4..1094beb31b 100644 --- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_document_layout_imp.h" diff --git a/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp index f2d7f1aaf8..86d3803a46 100644 --- a/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp @@ -7,7 +7,6 @@ #include "xfa/fxfa/parser/xfa_script_logpseudomodel.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index bb722c6bb9..96ae98aeaf 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -8,7 +8,6 @@ #include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index 38271da656..ecf384b51c 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -8,7 +8,6 @@ #include "core/fxcrt/include/fx_ext.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp index 4f2f2eeca6..913269fd80 100644 --- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp @@ -8,7 +8,6 @@ #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h index a3e7afa25b..c2a0fbbb82 100644 --- a/xfa/fxfa/parser/xfa_utils.h +++ b/xfa/fxfa/parser/xfa_utils.h @@ -213,9 +213,7 @@ FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode); IFX_Stream* XFA_CreateWideTextRead(const CFX_WideString& wsBuffer); FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement, FX_BOOL bLayoutContainer = FALSE); -FX_BOOL XFA_IsTakingupSpace(XFA_ATTRIBUTEENUM ePresence); -FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout); -FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout); + void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode); void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, IFX_Stream* pStream, diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp index ec7a10c10d..4fec7c071b 100644 --- a/xfa/fxfa/parser/xfa_utils_imp.cpp +++ b/xfa/fxfa/parser/xfa_utils_imp.cpp @@ -9,7 +9,6 @@ #include "core/fxcrt/include/fx_ext.h" #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" -#include "xfa/fxfa/parser/xfa_docdata.h" #include "xfa/fxfa/parser/xfa_doclayout.h" #include "xfa/fxfa/parser/xfa_document.h" #include "xfa/fxfa/parser/xfa_localemgr.h" @@ -266,37 +265,7 @@ FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement, FX_BOOL bLayoutContainer) { } return FALSE; } -FX_BOOL XFA_IsTakingupSpace(XFA_ATTRIBUTEENUM ePresence) { - switch (ePresence) { - case XFA_ATTRIBUTEENUM_Visible: - case XFA_ATTRIBUTEENUM_Invisible: - return TRUE; - default: - return FALSE; - } - return FALSE; -} -FX_BOOL XFA_IsFlowingLayout(XFA_ATTRIBUTEENUM eLayout) { - switch (eLayout) { - case XFA_ATTRIBUTEENUM_Tb: - case XFA_ATTRIBUTEENUM_Lr_tb: - case XFA_ATTRIBUTEENUM_Rl_tb: - return TRUE; - default: - return FALSE; - } - return FALSE; -} -FX_BOOL XFA_IsHorizontalFlow(XFA_ATTRIBUTEENUM eLayout) { - switch (eLayout) { - case XFA_ATTRIBUTEENUM_Lr_tb: - case XFA_ATTRIBUTEENUM_Rl_tb: - return TRUE; - default: - return FALSE; - } - return FALSE; -} + static const FX_DOUBLE fraction_scales[] = {0.1, 0.01, 0.001, diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp index 29a8077bd0..181398c630 100644 --- a/xfa/fxjse/class.cpp +++ b/xfa/fxjse/class.cpp @@ -24,29 +24,6 @@ static void FXJSE_V8SetterCallback_Wrapper( v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info); -void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, - const FXJSE_FUNCTION* lpFunctions, - int nNum) { - CFXJSE_Context* lpContext = reinterpret_cast<CFXJSE_Context*>(hContext); - ASSERT(lpContext); - CFXJSE_ScopeUtil_IsolateHandleContext scope(lpContext); - v8::Isolate* pIsolate = lpContext->GetRuntime(); - v8::Local<v8::Object> hGlobalObject = - FXJSE_GetGlobalObjectFromContext(scope.GetLocalContext()); - for (int32_t i = 0; i < nNum; i++) { - v8::Maybe<bool> maybe_success = hGlobalObject->DefineOwnProperty( - scope.GetLocalContext(), - v8::String::NewFromUtf8(pIsolate, lpFunctions[i].name), - v8::Function::New( - pIsolate, FXJSE_V8FunctionCallback_Wrapper, - v8::External::New(pIsolate, - const_cast<FXJSE_FUNCTION*>(lpFunctions + i))), - static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); - if (!maybe_success.FromMaybe(false)) - return; - } -} - FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, const FXJSE_CLASS* lpClass) { CFXJSE_Context* lpContext = reinterpret_cast<CFXJSE_Context*>(hContext); @@ -55,12 +32,6 @@ FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, CFXJSE_Class::Create(lpContext, lpClass, FALSE)); } -FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, - const CFX_ByteStringC& szName) { - return reinterpret_cast<FXJSE_HCLASS>(CFXJSE_Class::GetClassFromContext( - reinterpret_cast<CFXJSE_Context*>(hContext), szName)); -} - static void FXJSE_V8FunctionCallback_Wrapper( const v8::FunctionCallbackInfo<v8::Value>& info) { const FXJSE_FUNCTION* lpFunctionInfo = diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp index 83af487632..abb30c5dc5 100644 --- a/xfa/fxjse/context.cpp +++ b/xfa/fxjse/context.cpp @@ -37,12 +37,6 @@ FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext) { return reinterpret_cast<FXJSE_HVALUE>(lpValue); } -FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext) { - CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext); - return pContext ? reinterpret_cast<FXJSE_HRUNTIME>(pContext->GetRuntime()) - : NULL; -} - static const FX_CHAR* szCompatibleModeScripts[] = { "(function(global, list) {\n" " 'use strict';\n" @@ -127,52 +121,6 @@ v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate, return hReturnValue; } -FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, - CFX_ByteString& utf8Name, - CFX_ByteString& utf8Message) { - CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hRetValue); - if (!lpValue) { - return FALSE; - } - v8::Isolate* pIsolate = lpValue->GetIsolate(); - CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); - v8::Local<v8::Value> hValue = - v8::Local<v8::Value>::New(pIsolate, lpValue->DirectGetValue()); - if (!hValue->IsObject()) { - return FALSE; - } - v8::String::Utf8Value hStringVal0( - hValue.As<v8::Object>()->Get(0)->ToString()); - utf8Name = *hStringVal0; - v8::String::Utf8Value hStringVal1( - hValue.As<v8::Object>()->Get(1)->ToString()); - utf8Message = *hStringVal1; - return TRUE; -} - -FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, - int32_t& nLine, - int32_t& nCol) { - CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hRetValue); - if (!lpValue) { - return FALSE; - } - v8::Isolate* pIsolate = lpValue->GetIsolate(); - CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate); - v8::Local<v8::Value> hValue = - v8::Local<v8::Value>::New(pIsolate, lpValue->DirectGetValue()); - if (!hValue->IsObject()) { - return FALSE; - } - v8::MaybeLocal<v8::Int32> maybe_int = - hValue.As<v8::Object>()->Get(3)->ToInt32(pIsolate->GetCurrentContext()); - nLine = maybe_int.FromMaybe(v8::Local<v8::Int32>())->Value(); - maybe_int = - hValue.As<v8::Object>()->Get(5)->ToInt32(pIsolate->GetCurrentContext()); - nCol = maybe_int.FromMaybe(v8::Local<v8::Int32>())->Value(); - return TRUE; -} - CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass, void* lpGlobalObject) { diff --git a/xfa/fxjse/include/fxjse.h b/xfa/fxjse/include/fxjse.h index 54901704be..a93c3716a0 100644 --- a/xfa/fxjse/include/fxjse.h +++ b/xfa/fxjse/include/fxjse.h @@ -79,33 +79,24 @@ FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, void* lpGlobalObject = nullptr); void FXJSE_Context_Release(FXJSE_HCONTEXT hContext); FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext); -FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext); void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, uint32_t dwCompatibleFlags); -void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, - const FXJSE_FUNCTION* lpFunctions, - int nNum); FXJSE_HCLASS FXJSE_DefineClass(FXJSE_HCONTEXT hContext, const FXJSE_CLASS* lpClass); -FXJSE_HCLASS FXJSE_GetClass(FXJSE_HCONTEXT hContext, - const CFX_ByteStringC& szName); FXJSE_HVALUE FXJSE_Value_Create(FXJSE_HRUNTIME hRuntime); void FXJSE_Value_Release(FXJSE_HVALUE hValue); -FXJSE_HRUNTIME FXJSE_Value_GetRuntime(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsUndefined(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsNull(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsBoolean(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsUTF8String(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue); -FX_BOOL FXJSE_Value_IsInteger(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsArray(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue); -FX_BOOL FXJSE_Value_IsDate(FXJSE_HVALUE hValue); FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue); FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue); @@ -128,7 +119,6 @@ void FXJSE_Value_SetObject(FXJSE_HVALUE hValue, void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, uint32_t uValueCount, FXJSE_HVALUE* rgValues); -void FXJSE_Value_SetDate(FXJSE_HVALUE hValue, double dDouble); void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue); FX_BOOL FXJSE_Value_GetObjectProp(FXJSE_HVALUE hValue, @@ -140,9 +130,6 @@ FX_BOOL FXJSE_Value_SetObjectProp(FXJSE_HVALUE hValue, FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue, uint32_t uPropIdx, FXJSE_HVALUE hPropValue); -FX_BOOL FXJSE_Value_SetObjectPropByIdx(FXJSE_HVALUE hValue, - uint32_t uPropIdx, - FXJSE_HVALUE hPropValue); FX_BOOL FXJSE_Value_DeleteObjectProp(FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName); FX_BOOL FXJSE_Value_ObjectHasOwnProp(FXJSE_HVALUE hValue, @@ -152,11 +139,6 @@ FX_BOOL FXJSE_Value_SetObjectOwnProp(FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hPropValue); -FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction, - FXJSE_HVALUE hThis, - FXJSE_HVALUE hRetValue, - uint32_t nArgCount, - FXJSE_HVALUE* lpArgs); FX_BOOL FXJSE_Value_SetFunctionBind(FXJSE_HVALUE hValue, FXJSE_HVALUE hOldFunction, FXJSE_HVALUE hNewThis); @@ -169,11 +151,4 @@ FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, const CFX_ByteStringC& utf8Message); -FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, - CFX_ByteString& utf8Name, - CFX_ByteString& utf8Message); -FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, - int32_t& nLine, - int32_t& nCol); - #endif // XFA_FXJSE_INCLUDE_FXJSE_H_ diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp index cd3220a17a..dd07b6cbb8 100644 --- a/xfa/fxjse/value.cpp +++ b/xfa/fxjse/value.cpp @@ -36,11 +36,6 @@ FX_BOOL FXJSE_Value_IsNumber(FXJSE_HVALUE hValue) { return lpValue && lpValue->IsNumber(); } -FX_BOOL FXJSE_Value_IsInteger(FXJSE_HVALUE hValue) { - CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue); - return lpValue && lpValue->IsInteger(); -} - FX_BOOL FXJSE_Value_IsObject(FXJSE_HVALUE hValue) { CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue); return lpValue && lpValue->IsObject(); @@ -56,11 +51,6 @@ FX_BOOL FXJSE_Value_IsFunction(FXJSE_HVALUE hValue) { return lpValue && lpValue->IsFunction(); } -FX_BOOL FXJSE_Value_IsDate(FXJSE_HVALUE hValue) { - CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue); - return lpValue && lpValue->IsDate(); -} - FX_BOOL FXJSE_Value_ToBoolean(FXJSE_HVALUE hValue) { return reinterpret_cast<CFXJSE_Value*>(hValue)->ToBoolean(); } @@ -136,10 +126,6 @@ void FXJSE_Value_SetArray(FXJSE_HVALUE hValue, ->SetArray(uValueCount, reinterpret_cast<CFXJSE_Value**>(rgValues)); } -void FXJSE_Value_SetDate(FXJSE_HVALUE hValue, double dDouble) { - reinterpret_cast<CFXJSE_Value*>(hValue)->SetDate(dDouble); -} - void FXJSE_Value_Set(FXJSE_HVALUE hValue, FXJSE_HVALUE hOriginalValue) { CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue); CFXJSE_Value* lpOriginalValue = @@ -175,15 +161,6 @@ FX_BOOL FXJSE_Value_GetObjectPropByIdx(FXJSE_HVALUE hValue, return lpValue->GetObjectProperty(uPropIdx, lpPropValue); } -FX_BOOL FXJSE_Value_SetObjectPropByIdx(FXJSE_HVALUE hValue, - uint32_t uPropIdx, - FXJSE_HVALUE hPropValue) { - CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue); - CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue); - ASSERT(lpValue && lpPropValue); - return lpValue->SetObjectProperty(uPropIdx, lpPropValue); -} - FX_BOOL FXJSE_Value_DeleteObjectProp(FXJSE_HVALUE hValue, const CFX_ByteStringC& szPropName) { return reinterpret_cast<CFXJSE_Value*>(hValue) @@ -216,17 +193,6 @@ FX_BOOL FXJSE_Value_SetFunctionBind(FXJSE_HVALUE hValue, return lpValue->SetFunctionBind(lpOldFunction, lpNewThis); } -FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction, - FXJSE_HVALUE hThis, - FXJSE_HVALUE hRetValue, - uint32_t nArgCount, - FXJSE_HVALUE* lpArgs) { - CFXJSE_Value* lpThis = reinterpret_cast<CFXJSE_Value*>(hThis); - CFXJSE_Value* lpRetValue = reinterpret_cast<CFXJSE_Value*>(hRetValue); - return reinterpret_cast<CFXJSE_Value*>(hFunction) - ->Call(lpThis, lpRetValue, nArgCount, lpArgs); -} - FXJSE_HVALUE FXJSE_Value_Create(FXJSE_HRUNTIME hRuntime) { return reinterpret_cast<FXJSE_HVALUE>( CFXJSE_Value::Create(reinterpret_cast<v8::Isolate*>(hRuntime))); @@ -237,11 +203,6 @@ void FXJSE_Value_Release(FXJSE_HVALUE hValue) { delete lpValue; } -FXJSE_HRUNTIME FXJSE_Value_GetRuntime(FXJSE_HVALUE hValue) { - return reinterpret_cast<FXJSE_HRUNTIME>( - reinterpret_cast<CFXJSE_Value*>(hValue)->GetIsolate()); -} - void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name, const CFX_ByteStringC& utf8Message) { v8::Isolate* pIsolate = v8::Isolate::GetCurrent(); |