From 12a6b0c1bb3ab86a03a84464bed168995ae0d82a Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 26 May 2016 11:14:08 -0700 Subject: Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value* This CL replaces FXJSE_HOBJECT and FXJSE_HVALUE with the concrete CFXJSE_Value* type. All variables are renamed to match. Review-Url: https://codereview.chromium.org/2012253002 --- fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp | 22 ++++++++-------------- fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h | 11 ++++------- 2 files changed, 12 insertions(+), 21 deletions(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp index 701d999908..f207760398 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp @@ -1214,18 +1214,18 @@ FX_BOOL CPDFXFA_Document::_SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) { FX_BOOL CPDFXFA_Document::SetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, - FXJSE_HVALUE hValue) { + CFXJSE_Value* pValue) { if (hDoc != m_pXFADoc) return FALSE; if (m_pSDKDoc && m_pSDKDoc->GetEnv()->GetJSRuntime()) - return m_pSDKDoc->GetEnv()->GetJSRuntime()->SetHValueByName(szPropName, - hValue); + return m_pSDKDoc->GetEnv()->GetJSRuntime()->SetValueByName(szPropName, + pValue); return FALSE; } FX_BOOL CPDFXFA_Document::GetPDFScriptObject(CXFA_FFDoc* hDoc, const CFX_ByteStringC& utf8Name, - FXJSE_HVALUE hValue) { + CFXJSE_Value* pValue) { if (hDoc != m_pXFADoc) return FALSE; @@ -1237,12 +1237,11 @@ FX_BOOL CPDFXFA_Document::GetPDFScriptObject(CXFA_FFDoc* hDoc, m_pJSContext = m_pSDKDoc->GetEnv()->GetJSRuntime()->NewContext(); } - return _GetHValueByName(utf8Name, hValue, - m_pSDKDoc->GetEnv()->GetJSRuntime()); + return m_pSDKDoc->GetEnv()->GetJSRuntime()->GetValueByName(utf8Name, pValue); } FX_BOOL CPDFXFA_Document::GetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, - FXJSE_HVALUE hValue) { + CFXJSE_Value* pValue) { if (hDoc != m_pXFADoc) return FALSE; if (!m_pSDKDoc || !m_pSDKDoc->GetEnv()->GetJSRuntime()) @@ -1253,11 +1252,6 @@ FX_BOOL CPDFXFA_Document::GetGlobalProperty(CXFA_FFDoc* hDoc, m_pJSContext = m_pSDKDoc->GetEnv()->GetJSRuntime()->NewContext(); } - return _GetHValueByName(szPropName, hValue, - m_pSDKDoc->GetEnv()->GetJSRuntime()); -} -FX_BOOL CPDFXFA_Document::_GetHValueByName(const CFX_ByteStringC& utf8Name, - FXJSE_HVALUE hValue, - IJS_Runtime* runTime) { - return runTime->GetHValueByName(utf8Name, hValue); + return m_pSDKDoc->GetEnv()->GetJSRuntime()->GetValueByName(szPropName, + pValue); } diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h index d54b77abea..9cab4d941b 100644 --- a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h +++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h @@ -163,17 +163,17 @@ class CPDFXFA_Document : public IXFA_DocProvider { return FALSE; } - // Get PDF javascript object, set the object to hValue. + // Get PDF javascript object, set the object to pValue. virtual FX_BOOL GetPDFScriptObject(CXFA_FFDoc* hDoc, const CFX_ByteStringC& utf8Name, - FXJSE_HVALUE hValue); + CFXJSE_Value* pValue); virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, - FXJSE_HVALUE hValue); + CFXJSE_Value* pValue); virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, - FXJSE_HVALUE hValue); + CFXJSE_Value* pValue); virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) { @@ -183,9 +183,6 @@ class CPDFXFA_Document : public IXFA_DocProvider { virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, const CFX_WideString& wsLink); - FX_BOOL _GetHValueByName(const CFX_ByteStringC& utf8Name, - FXJSE_HVALUE hValue, - IJS_Runtime* runTime); FX_BOOL _OnBeforeNotifySumbit(); void _OnAfterNotifySumbit(); FX_BOOL _NotifySubmit(FX_BOOL bPrevOrPost); -- cgit v1.2.3