summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_app.h18
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h22
-rw-r--r--fpdfsdk/include/fsdk_mgr.h2
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h4
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h4
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp47
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp16
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp16
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp4
9 files changed, 68 insertions, 65 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
index 1a8a6b41b0..e650c6235b 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
@@ -33,7 +33,7 @@ public:
// IFXA_AppProvider:
void GetAppType(CFX_WideString &wsAppType) override;
- void SetAppType(FX_WSTR wsAppType) override;
+ void SetAppType(const CFX_WideStringC& wsAppType) override;
void GetLanguage(CFX_WideString &wsLanguage) override;
void GetPlatform(CFX_WideString &wsPlatform) override;
@@ -49,20 +49,20 @@ public:
}
void Beep(FX_DWORD dwType) override;
- int32_t MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
- void Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle,
- FX_WSTR wsDefaultAnswer, FX_BOOL bMark) override;
+ int32_t MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType) override;
+ void Response(CFX_WideString &wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle,
+ const CFX_WideStringC& wsDefaultAnswer, FX_BOOL bMark) override;
int32_t GetDocumentCountInBatch() override;
int32_t GetCurDocumentInBatch() override;
- IFX_FileRead* DownloadURL(FX_WSTR wsURL) override;
- FX_BOOL PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
- FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse) override;
- FX_BOOL PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode) override;
+ IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) override;
+ FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsContentType,
+ const CFX_WideStringC& wsEncode, const CFX_WideStringC& wsHeader, CFX_WideString &wsResponse) override;
+ FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsEncode) override;
void LoadString(int32_t iStringID, CFX_WideString &wsString) override;
- FX_BOOL ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen) override;
+ FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen) override;
IFWL_AdapterTimerMgr* GetTimerMgr() override;
CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList;
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index 163120b928..cc871badb2 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -68,10 +68,10 @@ public:
virtual FX_BOOL IsCalculationsEnabled(IXFA_Doc* hDoc);
virtual void SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle);
- virtual void SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle);
- virtual void ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE);
- virtual void ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath);
- virtual void GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE);
+ virtual void SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle);
+ virtual void ExportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP = TRUE);
+ virtual void ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath);
+ virtual void GotoURL(IXFA_Doc* hDoc, const CFX_WideStringC& bsURL, FX_BOOL bAppend = TRUE);
virtual FX_BOOL IsValidationsEnabled(IXFA_Doc* hDoc);
virtual void SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);
virtual void SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget);
@@ -86,7 +86,7 @@ public:
//SignaturePseudoModel method
//TODO:
virtual int32_t Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}
- virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}
+ virtual FX_BOOL Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, const CFX_WideStringC& wsExpression, const CFX_WideStringC& wsXMLIdent, const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}
virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) {return 0;}
virtual FX_BOOL Clear(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) {return 0;}
@@ -105,19 +105,19 @@ public:
*/
virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit);
- virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord){return FALSE;}
- virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest){return FALSE;}
+ virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord){return FALSE;}
+ virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord, CFX_ByteStringArray& sSuggest){return FALSE;}
//Get PDF javascript object, set the object to hValue.
- virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
- virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);
- virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
+ virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue);
virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile){return NULL;}
virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink);
- FX_BOOL _GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime);
+ FX_BOOL _GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime);
FX_BOOL _OnBeforeNotifySumbit();
void _OnAfterNotifySumbit();
FX_BOOL _NotifySubmit(FX_BOOL bPrevOrPost);
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index b0ff5a7599..eb557f5830 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -412,7 +412,7 @@ public:
return L"";
}
- void FFI_GotoURL(FPDF_DOCUMENT document, FX_WSTR wsURL, FX_BOOL bAppend)
+ void FFI_GotoURL(FPDF_DOCUMENT document, const CFX_WideStringC& wsURL, FX_BOOL bAppend)
{
if (m_pInfo && m_pInfo->FFI_GotoURL)
{
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index d40c87b1f5..ddab4cfde7 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -85,8 +85,8 @@ public:
virtual CPDFSDK_Document* GetReaderDocument() = 0;
- virtual FX_BOOL GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue) = 0;
protected:
~IFXJS_Runtime() { }
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index 91a82da375..950d43fa47 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -61,8 +61,8 @@ public:
v8::Local<v8::Context> NewJSContext();
- virtual FX_BOOL GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue);
- virtual FX_BOOL SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
+ virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue);
protected:
CFX_ArrayTemplate<CJS_Context*> m_ContextArray;
CPDFDoc_Environment* m_pApp;
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index c258b93c7d..2dd242b372 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -208,27 +208,30 @@ void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code)
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document)
{
- if (!document) return PAGEMODE_UNKNOWN;
+ if (!document)
+ return PAGEMODE_UNKNOWN;
+
CPDF_Dictionary *pRoot = (((CPDFXFA_Document*)document)->GetPDFDoc())->GetRoot();
- if (!pRoot)
- return PAGEMODE_UNKNOWN;
- CPDF_Object* pName = pRoot->GetElement("PageMode");
- if (!pName)
- return PAGEMODE_USENONE;
- CFX_ByteString strPageMode = pName->GetString();
-
- if (strPageMode.IsEmpty()||strPageMode.EqualNoCase(FX_BSTR("UseNone")))
- return PAGEMODE_USENONE;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseOutlines")))
- return PAGEMODE_USEOUTLINES;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseThumbs")))
- return PAGEMODE_USETHUMBS;
- else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen")))
- return PAGEMODE_FULLSCREEN;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseOC")))
- return PAGEMODE_USEOC;
- else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments")))
- return PAGEMODE_USEATTACHMENTS;
-
- return PAGEMODE_UNKNOWN;
+ if (!pRoot)
+ return PAGEMODE_UNKNOWN;
+
+ CPDF_Object* pName = pRoot->GetElement("PageMode");
+ if (!pName)
+ return PAGEMODE_USENONE;
+
+ CFX_ByteString strPageMode = pName->GetString();
+ if (strPageMode.IsEmpty()||strPageMode.EqualNoCase("UseNone"))
+ return PAGEMODE_USENONE;
+ if (strPageMode.EqualNoCase("UseOutlines"))
+ return PAGEMODE_USEOUTLINES;
+ if (strPageMode.EqualNoCase("UseThumbs"))
+ return PAGEMODE_USETHUMBS;
+ if (strPageMode.EqualNoCase("FullScreen"))
+ return PAGEMODE_FULLSCREEN;
+ if (strPageMode.EqualNoCase("UseOC"))
+ return PAGEMODE_USEOC;
+ if (strPageMode.EqualNoCase("UseAttachments"))
+ return PAGEMODE_USEATTACHMENTS;
+
+ return PAGEMODE_UNKNOWN;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
index cf5db2b3c3..72fc91e708 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
@@ -136,7 +136,7 @@ void CPDFXFA_App::GetAppName(CFX_WideString& wsName)
}
}
-void CPDFXFA_App::SetAppType(FX_WSTR wsAppType)
+void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType)
{
m_csAppType = wsAppType;
}
@@ -178,7 +178,7 @@ void CPDFXFA_App::Beep(FX_DWORD dwType)
}
}
-int32_t CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
+int32_t CPDFXFA_App::MsgBox(const CFX_WideStringC& wsMessage, const CFX_WideStringC& wsTitle, FX_DWORD dwIconType, FX_DWORD dwButtonType)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
@@ -231,7 +231,7 @@ int32_t CPDFXFA_App::MsgBox(FX_WSTR wsMessage, FX_WSTR wsTitle, FX_DWORD dwIconT
return XFA_IDYes;
}
-void CPDFXFA_App::Response(CFX_WideString &wsAnswer, FX_WSTR wsQuestion, FX_WSTR wsTitle, FX_WSTR wsDefaultAnswer, FX_BOOL bMark)
+void CPDFXFA_App::Response(CFX_WideString &wsAnswer, const CFX_WideStringC& wsQuestion, const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsDefaultAnswer, FX_BOOL bMark)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -271,7 +271,7 @@ int32_t CPDFXFA_App::GetDocumentCountInBatch()
return 0;
}
-IFX_FileRead* CPDFXFA_App::DownloadURL(FX_WSTR wsURL)
+IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideStringC& wsURL)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -281,8 +281,8 @@ IFX_FileRead* CPDFXFA_App::DownloadURL(FX_WSTR wsURL)
return NULL;
}
-FX_BOOL CPDFXFA_App::PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsContentType,
- FX_WSTR wsEncode, FX_WSTR wsHeader, CFX_WideString &wsResponse)
+FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsContentType,
+ const CFX_WideStringC& wsEncode, const CFX_WideStringC& wsHeader, CFX_WideString &wsResponse)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -293,7 +293,7 @@ FX_BOOL CPDFXFA_App::PostRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsCon
return FALSE;
}
-FX_BOOL CPDFXFA_App::PutRequestURL(FX_WSTR wsURL, FX_WSTR wsData, FX_WSTR wsEncode)
+FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsData, const CFX_WideStringC& wsEncode)
{
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
@@ -545,7 +545,7 @@ void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString &wsString)
}
-FX_BOOL CPDFXFA_App::ShowFileDialog(FX_WSTR wsTitle, FX_WSTR wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
+FX_BOOL CPDFXFA_App::ShowFileDialog(const CFX_WideStringC& wsTitle, const CFX_WideStringC& wsFilter, CFX_WideStringArray &wsPathArr, FX_BOOL bOpen)
{
return FALSE;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index c1f402e393..b4ac5f0e17 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -701,7 +701,7 @@ void CPDFXFA_Document::GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle)
wsTitle = wsTitle.FromLocal(csTitle.GetBuffer(csTitle.GetLength()));
csTitle.ReleaseBuffer(csTitle.GetLength());
}
-void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle)
+void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, const CFX_WideStringC& wsTitle)
{
if (hDoc != m_pXFADoc)
return;
@@ -713,7 +713,7 @@ void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle)
return;
pInfoDict->SetAt("Title", FX_NEW CPDF_String(wsTitle));
}
-void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP)
+void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP)
{
if (hDoc != m_pXFADoc)
return;
@@ -834,12 +834,12 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX
}
FX_BOOL bError= fileWrite.Flush();
}
-void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath)
+void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath)
{
//TODO...
}
-void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend)
+void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc, const CFX_WideStringC& bsURL, FX_BOOL bAppend)
{
if (hDoc != m_pXFADoc)
return;
@@ -1392,7 +1392,7 @@ FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit)
return bRet;
}
-FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1401,7 +1401,7 @@ FX_BOOL CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName,
return m_pSDKDoc->GetEnv()->GetJSRuntime()->SetHValueByName(szPropName, hValue);
return FALSE;
}
-FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1418,7 +1418,7 @@ FX_BOOL CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, F
return _GetHValueByName(utf8Name, hValue, m_pSDKDoc->GetEnv()->GetJSRuntime());
}
-FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)
+FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue)
{
if (hDoc != m_pXFADoc)
return FALSE;
@@ -1434,7 +1434,7 @@ FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName,
return _GetHValueByName(szPropName, hValue, m_pSDKDoc->GetEnv()->GetJSRuntime());
}
-FX_BOOL CPDFXFA_Document::_GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime)
+FX_BOOL CPDFXFA_Document::_GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime)
{
return runTime->GetHValueByName(utf8Name, hValue);
}
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index e3e38bcf3d..d8fea8d768 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -359,7 +359,7 @@ CFX_WideString ChangeObjName(const CFX_WideString& str)
sRet.Replace(L"_", L".");
return sRet;
}
-FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
const FX_CHAR* name = utf8Name.GetCStr();
@@ -382,7 +382,7 @@ FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
return TRUE;
}
-FX_BOOL CJS_Runtime::SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue)
+FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue)
{
if (utf8Name.IsEmpty() || hValue == NULL)
return FALSE;