summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h2
-rw-r--r--fpdfsdk/include/fsdk_baseform.h10
-rw-r--r--fpdfsdk/include/fsdk_mgr.h16
-rw-r--r--fpdfsdk/include/fx_systemhandler.h4
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h6
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h10
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h6
-rw-r--r--fpdfsdk/include/javascript/JS_EventHandler.h4
-rw-r--r--fpdfsdk/include/javascript/JS_GlobalData.h24
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h10
-rw-r--r--fpdfsdk/include/javascript/JS_Value.h10
-rw-r--r--fpdfsdk/include/javascript/PublicMethods.h24
-rw-r--r--fpdfsdk/include/javascript/global.h8
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Label.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h4
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp2
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp2
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp2
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp12
-rw-r--r--fpdfsdk/src/fpdf_sysfontinfo.cpp6
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp2
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp2
-rw-r--r--fpdfsdk/src/fpdfppo.cpp6
-rw-r--r--fpdfsdk/src/fpdfview.cpp10
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp2
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp14
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp8
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp10
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp6
-rw-r--r--fpdfsdk/src/javascript/Consts.cpp48
-rw-r--r--fpdfsdk/src/javascript/JS_EventHandler.cpp4
-rw-r--r--fpdfsdk/src/javascript/JS_GlobalData.cpp28
-rw-r--r--fpdfsdk/src/javascript/JS_Object.cpp10
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp10
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp52
-rw-r--r--fpdfsdk/src/javascript/global.cpp22
-rw-r--r--fpdfsdk/src/javascript/util.cpp8
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp12
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp6
55 files changed, 238 insertions, 238 deletions
diff --git a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
index a51e9efbe1..687cd6f207 100644
--- a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
+++ b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h
@@ -20,7 +20,7 @@ public:
virtual ~CBA_FontMap();
- virtual void Initial(FX_LPCSTR fontname = NULL);
+ virtual void Initial(const FX_CHAR* fontname = NULL);
public:
void SetDefaultFont(CPDF_Font * pFont, const CFX_ByteString & sFontName);
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 27ec143b35..a16399956f 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -108,7 +108,7 @@ public:
void ClearSelection(FX_BOOL bNotify);
void SetTopVisibleIndex(int index);
- void ResetAppearance(FX_LPCWSTR sValue, FX_BOOL bValueChanged);
+ void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void ResetFieldAppearance(FX_BOOL bValueChanged);
void UpdateField();
CFX_WideString OnFormat(int nCommitKey, FX_BOOL& bFormated);
@@ -135,9 +135,9 @@ private:
void ResetAppearance_PushButton();
void ResetAppearance_CheckBox();
void ResetAppearance_RadioButton();
- void ResetAppearance_ComboBox(FX_LPCWSTR sValue);
+ void ResetAppearance_ComboBox(const FX_WCHAR* sValue);
void ResetAppearance_ListBox();
- void ResetAppearance_TextField(FX_LPCWSTR sValue);
+ void ResetAppearance_TextField(const FX_WCHAR* sValue);
CPDF_Rect GetClientRect() const;
CPDF_Rect GetRotatedRect() const;
@@ -200,7 +200,7 @@ public:
void OnCalculate(CPDF_FormField* pFormField = NULL);
CFX_WideString OnFormat(CPDF_FormField* pFormField, int nCommitKey, FX_BOOL& bFormated);
- void ResetFieldAppearance(CPDF_FormField* pFormField, FX_LPCWSTR sValue, FX_BOOL bValueChanged);
+ void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void UpdateField(CPDF_FormField* pFormField);
public:
@@ -231,7 +231,7 @@ private:
private:
FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
- FX_BOOL FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBufSize);
+ FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
int GetPageIndexByAnnotDict(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict) const;
void DoFDFBuffer(CFX_ByteString sBuffer);
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index 04a26cf209..166b421580 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -121,7 +121,7 @@ public:
return FALSE;
}
- int JS_appAlert(FX_LPCWSTR Msg, FX_LPCWSTR Title, FX_UINT Type, FX_UINT Icon)
+ int JS_appAlert(const FX_WCHAR* Msg, const FX_WCHAR* Title, FX_UINT Type, FX_UINT Icon)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert)
{
@@ -137,7 +137,7 @@ public:
return -1;
}
- int JS_appResponse(FX_LPCWSTR Question, FX_LPCWSTR Title, FX_LPCWSTR Default, FX_LPCWSTR cLabel, FPDF_BOOL bPassword, void* response, int length)
+ int JS_appResponse(const FX_WCHAR* Question, const FX_WCHAR* Title, const FX_WCHAR* Default, const FX_WCHAR* cLabel, FPDF_BOOL bPassword, void* response, int length)
{
if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_response)
{
@@ -222,7 +222,7 @@ public:
return L"";
}
- void JS_docSubmitForm(void* formData, int length, FX_LPCWSTR URL)
+ void JS_docSubmitForm(void* formData, int length, const FX_WCHAR* URL)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_submitForm)
{
@@ -233,7 +233,7 @@ public:
}
}
- void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,FX_LPCWSTR To, FX_LPCWSTR Subject, FX_LPCWSTR CC, FX_LPCWSTR BCC, FX_LPCWSTR Msg)
+ void JS_docmailForm(void* mailData, int length, FPDF_BOOL bUI,const FX_WCHAR* To, const FX_WCHAR* Subject, const FX_WCHAR* CC, const FX_WCHAR* BCC, const FX_WCHAR* Msg)
{
if(m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail)
{
@@ -298,7 +298,7 @@ public:
}
return 0;
}
- void FFI_ExecuteNamedAction(FX_LPCSTR namedAction)
+ void FFI_ExecuteNamedAction(const FX_CHAR* namedAction)
{
if(m_pInfo && m_pInfo->FFI_ExecuteNamedAction)
{
@@ -313,7 +313,7 @@ public:
}
}
- void FFI_DoURIAction(FX_LPCSTR bsURI)
+ void FFI_DoURIAction(const FX_CHAR* bsURI)
{
if(m_pInfo && m_pInfo->FFI_DoURIAction)
{
@@ -430,7 +430,7 @@ public:
FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot);
CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict);
- CPDFSDK_Annot* AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict);
+ CPDFSDK_Annot* AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(CPDF_Annot * pPDFAnnot);
FX_BOOL DeleteAnnot(CPDFSDK_Annot* pAnnot);
int CountAnnots();
@@ -447,7 +447,7 @@ public:
FX_BOOL OnMouseMove(const CPDF_Point & point, int nFlag);
FX_BOOL OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag);
- FX_BOOL IsValidAnnot(FX_LPVOID p);
+ FX_BOOL IsValidAnnot(void* p);
void GetCurrentMatrix(CPDF_Matrix& matrix) {matrix = m_curMatrix;}
void UpdateRects(CFX_RectArray& rects);
void UpdateView(CPDFSDK_Annot* pAnnot);
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index 276019eae5..e398f78b88 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -7,8 +7,8 @@
#ifndef FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_
#define FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_
-typedef FX_LPVOID FX_HWND;
-typedef FX_LPVOID FX_HMENU;
+typedef void* FX_HWND;
+typedef void* FX_HMENU;
typedef void (*TimerCallback)(int32_t idEvent);
typedef struct _FX_SYSTEMTIME
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 0da6fe6f9e..f710cddaa7 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -309,14 +309,14 @@ public:
virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//put text into edit.
- virtual void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
+ virtual void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a word into the edit.
virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
+ virtual FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//do backspace operation.
virtual FX_BOOL Backspace() = 0;
@@ -468,7 +468,7 @@ public:
virtual int32_t GetItemIndex(const CPDF_Point & point) const = 0;
virtual int32_t GetFirstSelected() const = 0;
- virtual void AddString(FX_LPCWSTR string) = 0;
+ virtual void AddString(const FX_WCHAR* string) = 0;
virtual void SetTopItem(int32_t nIndex) = 0;
virtual void Select(int32_t nItemIndex) = 0;
virtual void SetCaret(int32_t nItemIndex) = 0;
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 6fd7b9a4ee..0a3617f4e4 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -618,7 +618,7 @@ public:
void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void SetText(FX_LPCWSTR text,int32_t charset = DEFAULT_CHARSET,
+ void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
@@ -626,11 +626,11 @@ public:
FX_BOOL Delete();
FX_BOOL Clear();
FX_BOOL Empty();
- FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset = DEFAULT_CHARSET,
+ FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
FX_BOOL Redo();
FX_BOOL Undo();
- CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
+ CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
@@ -679,14 +679,14 @@ private:
void SetContentChanged();
void EnableNotify(FX_BOOL bNotify);
- void SetText(FX_LPCWSTR text,int32_t charset,
+ void SetText(const FX_WCHAR* text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(FX_LPCWSTR text, int32_t charset,
+ FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index b7888eaf3b..02028f2cff 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -163,7 +163,7 @@ public:
void SetRect(const CLST_Rect & rect);
void SetSelect(FX_BOOL bSelected);
void SetCaret(FX_BOOL bCaret);
- void SetText(FX_LPCWSTR text);
+ void SetText(const FX_WCHAR* text);
void SetFontSize(FX_FLOAT fFontSize);
CFX_WideString GetText() const;
@@ -240,7 +240,7 @@ public:
protected:
virtual void Empty();
- void AddItem(FX_LPCWSTR str);
+ void AddItem(const FX_WCHAR* str);
virtual void ReArrange(int32_t nItemIndex);
virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
@@ -331,7 +331,7 @@ public:
virtual CPDF_Rect GetContentRect() const;
virtual int32_t GetItemIndex(const CPDF_Point & point) const;
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
void SetTopItem(int32_t nIndex);
void Select(int32_t nItemIndex);
virtual void SetCaret(int32_t nItemIndex);
diff --git a/fpdfsdk/include/javascript/JS_EventHandler.h b/fpdfsdk/include/javascript/JS_EventHandler.h
index d6cdbe81bc..a99030734b 100644
--- a/fpdfsdk/include/javascript/JS_EventHandler.h
+++ b/fpdfsdk/include/javascript/JS_EventHandler.h
@@ -126,8 +126,8 @@ public:
FX_BOOL FieldFull();
FX_BOOL KeyDown();
FX_BOOL Modifier();
- FX_LPCWSTR Name();
- FX_LPCWSTR Type();
+ const FX_WCHAR* Name();
+ const FX_WCHAR* Type();
FX_BOOL& Rc();
int& SelEnd();
int& SelStart();
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h
index f19265c651..448537ac71 100644
--- a/fpdfsdk/include/javascript/JS_GlobalData.h
+++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -66,14 +66,14 @@ public:
virtual ~CJS_GlobalData();
public:
- void SetGlobalVariableNumber(FX_LPCSTR propname, double dData);
- void SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData);
- void SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteString& sData);
- void SetGlobalVariableObject(FX_LPCSTR propname, const CJS_GlobalVariableArray& array);
- void SetGlobalVariableNull(FX_LPCSTR propname);
-
- FX_BOOL SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent);
- FX_BOOL DeleteGlobalVariable(FX_LPCSTR propname);
+ void SetGlobalVariableNumber(const FX_CHAR* propname, double dData);
+ void SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData);
+ void SetGlobalVariableString(const FX_CHAR* propname, const CFX_ByteString& sData);
+ void SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array);
+ void SetGlobalVariableNull(const FX_CHAR* propname);
+
+ FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent);
+ FX_BOOL DeleteGlobalVariable(const FX_CHAR* propname);
int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
@@ -82,11 +82,11 @@ private:
void LoadGlobalPersistentVariables();
void SaveGlobalPersisitentVariables();
- CJS_GlobalData_Element* GetGlobalVariable(FX_LPCSTR propname);
- int FindGlobalVariable(FX_LPCSTR propname);
+ CJS_GlobalData_Element* GetGlobalVariable(const FX_CHAR* propname);
+ int FindGlobalVariable(const FX_CHAR* propname);
- void LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength);
- void WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength);
+ void LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength);
+ void WriteFileBuffer(const FX_WCHAR* sFilePath, const FX_CHAR* pBuffer, int32_t nLength);
void MakeByteString(const CFX_ByteString& name, CJS_KeyValue* pData, CFX_BinaryBuf& sData);
private:
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index 5828f2ec38..0eb92b0b59 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -32,8 +32,8 @@ public:
operator CJS_Object* (){return m_pJSObject;};
CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
- int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0);
- void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
+ int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0);
+ void Alert(CJS_Context* pContext, const FX_WCHAR* swMsg);
protected:
CJS_Object* m_pJSObject;
@@ -48,7 +48,7 @@ public:
void MakeWeak();
void Dispose();
- virtual FX_BOOL IsType(FX_LPCSTR sClassName){return TRUE;};
+ virtual FX_BOOL IsType(const FX_CHAR* sClassName){return TRUE;};
virtual CFX_ByteString GetClassName(){return "";};
virtual FX_BOOL InitInstance(IFXJS_Context* cc){return TRUE;};
@@ -61,8 +61,8 @@ public:
CJS_EmbedObj * GetEmbedObject(){return m_pEmbedObj;};
static CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc);
- static int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
- static void Alert(CJS_Context* pContext, FX_LPCWSTR swMsg);
+ static int MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle = NULL, FX_UINT nType = 0,FX_UINT nIcon = 0);
+ static void Alert(CJS_Context* pContext, const FX_WCHAR* swMsg);
v8::Isolate* GetIsolate() {return m_pIsolate;}
protected:
diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h
index 245b736cdf..4381bd55a6 100644
--- a/fpdfsdk/include/javascript/JS_Value.h
+++ b/fpdfsdk/include/javascript/JS_Value.h
@@ -27,8 +27,8 @@ public:
CJS_Value(v8::Isolate* isolate, JSFXObject);
CJS_Value(v8::Isolate* isolate, CJS_Object*);
CJS_Value(v8::Isolate* isolate, CJS_Document*);
- CJS_Value(v8::Isolate* isolate, FX_LPCSTR pStr);
- CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr);
+ CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr);
+ CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr);
CJS_Value(v8::Isolate* isolate, CJS_Array& array);
~CJS_Value();
@@ -59,8 +59,8 @@ public:
void operator = (v8::Local<v8::Object>);
void operator = (CJS_Array &);
void operator = (CJS_Date &);
- void operator = (FX_LPCWSTR pWstr);
- void operator = (FX_LPCSTR pStr);
+ void operator = (const FX_WCHAR* pWstr);
+ void operator = (const FX_CHAR* pStr);
void operator = (CJS_Value value);
FX_BOOL IsArrayObject() const;
@@ -111,7 +111,7 @@ public:
void operator>>(CFX_ByteString&) const;
void operator<<(CFX_WideString);
void operator>>(CFX_WideString&) const;
- void operator<<(FX_LPCWSTR c_string);
+ void operator<<(const FX_WCHAR* c_string);
void operator<<(JSFXObject);
void operator>>(JSFXObject&) const;
void operator>>(CJS_Array& array) const;
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index 375ae1fcfe..ba38503017 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -70,23 +70,23 @@ public:
static CFX_WideString ParseStringString(const CFX_WideString& string, int nStart, int& nSkip);
static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, FX_BOOL& bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString & format);
- static FX_BOOL ConvertStringToNumber(FX_LPCWSTR swSource, double & dRet, FX_BOOL & bDot);
- static double ParseStringToNumber(FX_LPCWSTR swSource);
+ static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot);
+ static double ParseStringToNumber(const FX_WCHAR* swSource);
static double ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
+ static double ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
public:
- static CFX_WideString StrLTrim(FX_LPCWSTR pStr);
- static CFX_WideString StrRTrim(FX_LPCWSTR pStr);
- static CFX_WideString StrTrim(FX_LPCWSTR pStr);
+ static CFX_WideString StrLTrim(const FX_WCHAR* pStr);
+ static CFX_WideString StrRTrim(const FX_WCHAR* pStr);
+ static CFX_WideString StrTrim(const FX_WCHAR* pStr);
- static CFX_ByteString StrLTrim(FX_LPCSTR pStr);
- static CFX_ByteString StrRTrim(FX_LPCSTR pStr);
- static CFX_ByteString StrTrim(FX_LPCSTR pStr);
+ static CFX_ByteString StrLTrim(const FX_CHAR* pStr);
+ static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
+ static CFX_ByteString StrTrim(const FX_CHAR* pStr);
- static FX_BOOL IsNumber(FX_LPCSTR string);
- static FX_BOOL IsNumber(FX_LPCWSTR string);
+ static FX_BOOL IsNumber(const FX_CHAR* string);
+ static FX_BOOL IsNumber(const FX_WCHAR* string);
static FX_BOOL IsDigit(char ch);
static FX_BOOL IsDigit(wchar_t ch);
@@ -96,7 +96,7 @@ public:
static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
static FX_BOOL isReservedMaskChar(wchar_t ch);
- static double AF_Simple(FX_LPCWSTR sFuction, double dValue1, double dValue2);
+ static double AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2);
static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val);
};
diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h
index fac93d8e5b..3c8972c67c 100644
--- a/fpdfsdk/include/javascript/global.h
+++ b/fpdfsdk/include/javascript/global.h
@@ -48,9 +48,9 @@ public:
FX_BOOL setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
- FX_BOOL QueryProperty(FX_LPCWSTR propname);
- FX_BOOL DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue & vp, CFX_WideString & sError);
- FX_BOOL DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString & sError);
+ FX_BOOL QueryProperty(const FX_WCHAR* propname);
+ FX_BOOL DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue & vp, CFX_WideString & sError);
+ FX_BOOL DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString & sError);
void Initial(CPDFDoc_Environment* pApp);
@@ -58,7 +58,7 @@ private:
void UpdateGlobalPersistentVariables();
void CommitGlobalPersisitentVariables();
void DestroyGlobalPersisitentVariables();
- FX_BOOL SetGlobalVariables(FX_LPCSTR propname, int nType,
+ FX_BOOL SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent);
void ObjectToArray(v8::Local<v8::Object> pObj, CJS_GlobalVariableArray& array);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 7abdeeffce..b82330c6b9 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -77,9 +77,9 @@ public:
void SetFillerNotify(IPWL_Filler_Notify* pNotify);
CFX_WideString GetText() const;
- void SetText(FX_LPCWSTR text);
+ void SetText(const FX_WCHAR* text);
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
int32_t GetSelect() const;
void SetSelect(int32_t nItemIndex);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 63625641ce..c59099d661 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -78,8 +78,8 @@ public:
virtual void PasteText();
virtual void CutText();
- virtual void SetText(FX_LPCWSTR csText);
- void ReplaceSel(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
+ void ReplaceSel(const FX_WCHAR* csText);
CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const;
CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 2eb779ddc8..bfa1868b9e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -81,7 +81,7 @@ public:
virtual FX_FLOAT GetFontSize() const;
public:
- virtual void SetText(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
virtual void CopyText();
virtual void PasteText();
@@ -131,7 +131,7 @@ protected:
virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
- virtual void InsertText(FX_LPCWSTR csText);
+ virtual void InsertText(const FX_WCHAR* csText);
virtual void SetCursor();
FX_BOOL IsWndHorV();
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index 4f44660cb2..f83575b66f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -72,7 +72,7 @@ public:
virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
public:
- virtual void Initial(FX_LPCSTR fontname = NULL);
+ virtual void Initial(const FX_CHAR* fontname = NULL);
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
int32_t GetFontMapCount() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index c09f7a9fe8..1a2adf6469 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -27,7 +27,7 @@ public:
void GetImageSize(FX_FLOAT & fWidth,FX_FLOAT & fHeight);
CPDF_Matrix GetImageMatrix();
CFX_ByteString GetImageAlias();
- void SetImageAlias(FX_LPCSTR sImageAlias);
+ void SetImageAlias(const FX_CHAR* sImageAlias);
protected:
CPDF_Stream* m_pPDFStream;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h
index be083db486..6d9754dd80 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Label.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Label.h
@@ -21,7 +21,7 @@ public:
virtual void SetFontSize(FX_FLOAT fFontSize);
virtual FX_FLOAT GetFontSize() const;
- void SetText(FX_LPCWSTR csText);
+ void SetText(const FX_WCHAR* csText);
CFX_WideString GetText() const;
void SetLimitChar(int32_t nLimitChar);
void SetHorzScale(int32_t nHorzScale);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index c5a6df76dd..bbb9f35125 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -59,7 +59,7 @@ public:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void RePosChildWnd();
- virtual void SetText(FX_LPCWSTR csText,FX_BOOL bRefresh = TRUE);
+ virtual void SetText(const FX_WCHAR* csText,FX_BOOL bRefresh = TRUE);
virtual CFX_WideString GetText() const;
virtual CPDF_Rect GetFocusRect() const;
virtual void SetFontSize(FX_FLOAT fFontSize);
@@ -67,7 +67,7 @@ public:
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
- void AddString(FX_LPCWSTR string);
+ void AddString(const FX_WCHAR* string);
void SetTopVisibleIndex(int32_t nItemIndex);
void ScrollToListItem(int32_t nItemIndex);
void ResetContent();
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index a9e6dda05b..ee6ec6ff02 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -145,7 +145,7 @@ public:
FX_FLOAT GetItemLeftMargin();
FX_FLOAT GetItemRightMargin();
- virtual void SetText(FX_LPCWSTR csText);
+ virtual void SetText(const FX_WCHAR* csText);
protected:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h
index bdc1406a3d..be5ec58d1f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Signature.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h
@@ -38,10 +38,10 @@ public:
CPWL_Signature();
virtual ~CPWL_Signature();
- void SetText(FX_LPCWSTR sText);
- void SetDescription(FX_LPCWSTR string);
+ void SetText(const FX_WCHAR* sText);
+ void SetDescription(const FX_WCHAR* string);
void SetImage(CFX_DIBSource* pImage);
- void SetImageStream(CPDF_Stream * pStream, FX_LPCSTR sImageAlias);
+ void SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias);
void SetTextFlag(FX_BOOL bTextExist);
void SetImageFlag(FX_BOOL bImageExist);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 970480f14a..9f089e6fa4 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -173,8 +173,8 @@ class IPWL_SpellCheck
{
public:
virtual ~IPWL_SpellCheck() { }
- virtual FX_BOOL CheckWord(FX_LPCSTR sWord) = 0;
- virtual void SuggestWords(FX_LPCSTR sWord, CFX_ByteStringArray & sSuggest) = 0;
+ virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0;
+ virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0;
};
class IPWL_Provider
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 11600b75f8..ff1eebfc5b 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -43,7 +43,7 @@ void CBA_FontMap::Reset()
m_sDefaultFontName = "";
}
-void CBA_FontMap::Initial(FX_LPCSTR fontname)
+void CBA_FontMap::Initial(const FX_CHAR* fontname)
{
int32_t nCharset = DEFAULT_CHARSET;
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index f31685f6d8..88b00dead7 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -50,7 +50,7 @@ public:
virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
- return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (FX_LPBYTE)buffer, size);
+ return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size);
}
virtual void Release()
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 2a2f3ae096..613a5fd134 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -28,7 +28,7 @@ void CFSDK_UnsupportInfo_Adapter::ReportError(int nErrorType)
}
}
-void FreeUnsupportInfo(FX_LPVOID pData)
+void FreeUnsupportInfo(void* pData)
{
CFSDK_UnsupportInfo_Adapter * pAdapter = (CFSDK_UnsupportInfo_Adapter *)pData;
delete pAdapter;
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index eeb9993efb..e9ab80ecca 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -217,7 +217,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
return;
}
@@ -235,9 +235,9 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CPDF_StreamAcc acc;
acc.LoadAllData(pContents);
CFX_ByteString sStream = "q\n";
- CFX_ByteString sBody = CFX_ByteString((FX_LPCSTR)acc.GetData(), acc.GetSize());
+ CFX_ByteString sBody = CFX_ByteString((const FX_CHAR*)acc.GetData(), acc.GetSize());
sStream = sStream + sBody + "\nQ";
- pContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
pContentsArray->AddReference(pDocument, dwObjNum);
break;
}
@@ -264,7 +264,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
}
@@ -520,7 +520,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag)
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
- FX_LPCBYTE pData = acc.GetData();
+ const uint8_t* pData = acc.GetData();
CFX_ByteString sStream(pData, acc.GetSize());
CFX_ByteString sTemp;
@@ -538,7 +538,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag)
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, sFormName.c_str());
sStream += sTemp;
- pNewXObject->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE);
+ pNewXObject->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
pPageDict->RemoveAt( "Annots" );
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index bce3f68dbb..ac2b74c98a 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -29,21 +29,21 @@ public:
return FALSE;
}
- virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact) override
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) override
{
if (m_pInfo->MapFont)
return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &bExact);
return NULL;
}
- virtual void* GetFont(FX_LPCSTR family) override
+ virtual void* GetFont(const FX_CHAR* family) override
{
if (m_pInfo->GetFont)
return m_pInfo->GetFont(m_pInfo, family);
return NULL;
}
- virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) override
+ virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) override
{
if (m_pInfo->GetFontData)
return m_pInfo->GetFontData(m_pInfo, hFont, table, buffer, size);
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index 613bae1433..cb300e8bd0 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -111,7 +111,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
pDic = new CPDF_Dictionary;
CPDF_Stream* pEndStream = new CPDF_Stream(NULL,0, pDic);
- pEndStream->SetData((FX_LPCBYTE)" Q", 2, FALSE, FALSE);
+ pEndStream->SetData((const uint8_t*)" Q", 2, FALSE, FALSE);
pDoc->AddIndirectObject(pEndStream);
CPDF_Array* pContentArray = NULL;
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index b89ce26714..b2a4267c41 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -159,7 +159,7 @@ DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FP
return dest.GetPageIndex(pDoc);
}
-static void ReleaseLinkList(FX_LPVOID data)
+static void ReleaseLinkList(void* data)
{
delete (CPDF_LinkList*)data;
}
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 2b583f038d..0b3ca090b1 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -178,7 +178,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray*
FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum();
FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum();
- pMapPtrToPtr->SetAt((FX_LPVOID)(uintptr_t)dwOldPageObj, (FX_LPVOID)(uintptr_t)dwNewPageObj);
+ pMapPtrToPtr->SetAt((void*)(uintptr_t)dwOldPageObj, (void*)(uintptr_t)dwNewPageObj);
this->UpdateReference(pCurPageDict, pDestPDFDoc, pMapPtrToPtr);
curpage++;
@@ -301,7 +301,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
size_t dwNewObjNum = 0;
- pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum);
+ pMapPtrToPtr->Lookup((void*)dwObjnum, (void*&)dwNewObjNum);
if(dwNewObjNum)
{
return (int)dwNewObjNum;
@@ -339,7 +339,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt
}
}
dwNewObjNum = pDoc->AddIndirectObject(pClone);//, onum, gnum);
- pMapPtrToPtr->SetAt((FX_LPVOID)dwObjnum, (FX_LPVOID)dwNewObjNum);
+ pMapPtrToPtr->SetAt((void*)dwObjnum, (void*)dwNewObjNum);
if(!UpdateReference(pClone, pDoc, pMapPtrToPtr))
{
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index efb1148305..96d1ff0e31 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -30,7 +30,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t si
if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) {
return FALSE;
}
- return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(FX_LPBYTE) buffer, size);
+ return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(uint8_t*) buffer, size);
}
//0 bit: FPDF_POLICY_MACHINETIME_ACCESS
@@ -188,7 +188,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BY
CPDF_Parser* pParser = new CPDF_Parser;
pParser->SetPassword(password);
- FX_DWORD err_code = pParser->StartParse((FX_LPCSTR)file_path);
+ FX_DWORD err_code = pParser->StartParse((const FX_CHAR*)file_path);
if (err_code) {
delete pParser;
ProcessParseError(err_code);
@@ -445,7 +445,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int
// Create a device with this external buffer
pContext->m_pBitmap = new CFX_DIBitmap;
- pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (FX_LPBYTE)pBuffer);
+ pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (uint8_t*)pBuffer);
pContext->m_pDevice = new CPDF_FxgeDevice;
((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap);
@@ -533,7 +533,7 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page,
DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page)
{
if (!page) return;
- CPDFSDK_PageView* pPageView = (CPDFSDK_PageView*)(((CPDF_Page*)page))->GetPrivateData((FX_LPVOID)page);
+ CPDFSDK_PageView* pPageView = (CPDFSDK_PageView*)(((CPDF_Page*)page))->GetPrivateData((void*)page);
if (pPageView && pPageView->IsLocked()) {
pPageView->TakeOverPage();
return;
@@ -625,7 +625,7 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for
return NULL;
}
CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
- pBitmap->Create(width, height, fx_format, (FX_LPBYTE)first_scan, stride);
+ pBitmap->Create(width, height, fx_format, (uint8_t*)first_scan, stride);
return pBitmap;
}
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index 50d6b654f6..d4b2204f6c 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -600,7 +600,7 @@ void CPDFSDK_ActionHandler::DoAction_URI(CPDFSDK_Document* pDocument, const CPDF
ASSERT(pApp != NULL);
CFX_ByteString sURI = action.GetURI(pDocument->GetDocument());
- pApp->FFI_DoURIAction(FX_LPCSTR(sURI));
+ pApp->FFI_DoURIAction(sURI.c_str());
}
void CPDFSDK_ActionHandler::DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action)
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 8d62a16ff4..936d881780 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -349,7 +349,7 @@ FX_BOOL CPDFSDK_Widget::IsAppModified() const
return m_bAppModified;
}
-void CPDFSDK_Widget::ResetAppearance(FX_LPCWSTR sValue, FX_BOOL bValueChanged)
+void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
SetAppModified();
@@ -1024,7 +1024,7 @@ void CPDFSDK_Widget::ResetAppearance_RadioButton()
SetAppState("Off");
}
-void CPDFSDK_Widget::ResetAppearance_ComboBox(FX_LPCWSTR sValue)
+void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
{
CPDF_FormControl* pControl = GetFormControl();
ASSERT(pControl != NULL);
@@ -1198,7 +1198,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP);
}
-void CPDFSDK_Widget::ResetAppearance_TextField(FX_LPCWSTR sValue)
+void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
{
CPDF_FormControl* pControl = GetFormControl();
ASSERT(pControl != NULL);
@@ -2042,7 +2042,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, int nComm
return sValue;
}
-void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, FX_LPCWSTR sValue, FX_BOOL bValueChanged)
+void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
ASSERT(pFormField != NULL);
@@ -2255,7 +2255,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, con
CFX_ByteTextBuf textBuf;
ExportFieldsToFDFTextBuf(fields, bIncludeOrExclude, textBuf);
- FX_LPBYTE pBuffer = textBuf.GetBuffer();
+ uint8_t* pBuffer = textBuf.GetBuffer();
FX_STRSIZE nBufSize = textBuf.GetLength();
if (bUrlEncoded)
@@ -2310,7 +2310,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_Wid
return TRUE;
}
-FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBufSize)
+FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize)
{
CFDF_Document* pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize);
if (pFDF)
@@ -2389,7 +2389,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, FX_BOO
delete pFDFDoc;
if (!bRet) return FALSE;
- FX_LPBYTE pBuffer = FdfBuffer.GetBuffer();
+ uint8_t* pBuffer = FdfBuffer.GetBuffer();
FX_STRSIZE nBufSize = FdfBuffer.GetLength();
if (bUrlEncoded)
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 36e48117ae..a8fd5eee7f 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -617,7 +617,7 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDF_Page* page):m_
CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
pPDFInterForm->FixPageFields(page);
}
- m_page->SetPrivateData((FX_LPVOID)m_page, (FX_LPVOID)this, NULL);
+ m_page->SetPrivateData((void*)m_page, (void*)this, NULL);
m_fxAnnotArray.RemoveAll();
m_bEnterWidget = FALSE;
@@ -650,7 +650,7 @@ CPDFSDK_PageView::~CPDFSDK_PageView()
delete m_pAnnotList;
m_pAnnotList = NULL;
}
- m_page->RemovePrivateData((FX_LPVOID)m_page);
+ m_page->RemovePrivateData((void*)m_page);
if(m_bTakeOverPage) {
delete m_page;
}
@@ -790,7 +790,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary * pDict)
return NULL;
}
-CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict)
+CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict)
{
return NULL;
}
@@ -1049,7 +1049,7 @@ int CPDFSDK_PageView::GetPageIndex()
return -1;
}
-FX_BOOL CPDFSDK_PageView::IsValidAnnot(FX_LPVOID p)
+FX_BOOL CPDFSDK_PageView::IsValidAnnot(void* p)
{
if (p == NULL) return FALSE;
int iCount = m_pAnnotList->Count();
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index 9415cefbe3..b45fc69780 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -1921,7 +1921,7 @@ FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place
return FALSE;
}
-void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset /*= DEFAULT_CHARSET*/,
+void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -1952,7 +1952,7 @@ FX_BOOL CFX_Edit::Clear()
return Clear(TRUE,TRUE);
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset /*= DEFAULT_CHARSET*/,
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
@@ -2962,7 +2962,7 @@ void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
}
}
-void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset,
+void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset,
const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
Empty();
@@ -3264,7 +3264,7 @@ FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint)
return FALSE;
}
-FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset,
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (IsTextOverflow()) return FALSE;
@@ -3510,7 +3510,7 @@ FX_FLOAT CFX_Edit::GetLineBottom(const CPVT_WordPlace& place) const
return 0.0f;
}
-CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset,
+CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
{
CPVT_WordPlace wp = place;
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index 03b23020b4..6d48b30269 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -76,7 +76,7 @@ void CFX_ListItem::SetCaret(FX_BOOL bCaret)
m_bCaret = bCaret;
}
-void CFX_ListItem::SetText(FX_LPCWSTR text)
+void CFX_ListItem::SetText(const FX_WCHAR* text)
{
if (m_pEdit)
m_pEdit->SetText(text);
@@ -146,7 +146,7 @@ void CFX_List::SetFontSize(FX_FLOAT fFontSize)
m_fFontSize = fFontSize;
}
-void CFX_List::AddItem(FX_LPCWSTR str)
+void CFX_List::AddItem(const FX_WCHAR* str)
{
if (CFX_ListItem * pListItem = new CFX_ListItem())
{
@@ -733,7 +733,7 @@ CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const
return InToOut(CFX_List::GetItemRect(nIndex));
}
-void CFX_ListCtrl::AddString(FX_LPCWSTR string)
+void CFX_ListCtrl::AddString(const FX_WCHAR* string)
{
AddItem(string);
ReArrange(GetCount() - 1);
diff --git a/fpdfsdk/src/javascript/Consts.cpp b/fpdfsdk/src/javascript/Consts.cpp
index 1b1c8babcb..cea9f9a4c9 100644
--- a/fpdfsdk/src/javascript/Consts.cpp
+++ b/fpdfsdk/src/javascript/Consts.cpp
@@ -151,14 +151,14 @@ int CJS_GlobalConsts::Init(IJS_Runtime* pRuntime)
int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
{
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
+ const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
+ const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
L"[+-]?\\.\\d+", /* -.1 */
L"[+-]?\\d+\\." /* -1. */
};
@@ -166,15 +166,15 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
+ const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
+ const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
+ const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
L"[+-]?[.,]\\d+", /* -,1 */
L"[+-]?\\d+[.,]" /* -1, */
};
@@ -182,32 +182,32 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{5}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP4_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_ZIP4_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
+ const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_PHONE_ENTRY";
- FX_LPCWSTR ArrayContent[] = {
+ const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {
L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 555-1234 */
L"\\(\\d{0,3}", /* (408 */
L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) 555-1234 */
@@ -220,8 +220,8 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_PHONE_COMMIT";
- FX_LPCWSTR ArrayContent[] = {
+ const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {
L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */
L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */
L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */
@@ -231,14 +231,14 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
}
{
- FX_LPCWSTR ArrayName = L"RE_SSN_ENTRY";
- FX_LPCWSTR ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
+ const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = L"RE_SSN_COMMIT";
- FX_LPCWSTR ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
+ const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT";
+ const FX_WCHAR* ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp
index cf59ed9c86..fe4f6b2d4c 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp
@@ -461,7 +461,7 @@ FX_BOOL CJS_EventHandler::Modifier()
return m_bModifier;
}
-FX_LPCWSTR CJS_EventHandler::Name()
+const FX_WCHAR* CJS_EventHandler::Name()
{
switch (m_eEventType)
{
@@ -509,7 +509,7 @@ FX_LPCWSTR CJS_EventHandler::Name()
return L"";
}
-FX_LPCWSTR CJS_EventHandler::Type()
+const FX_WCHAR* CJS_EventHandler::Type()
{
switch (m_eEventType)
{
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index 450c7a1338..74707fab10 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -138,7 +138,7 @@ CJS_GlobalData::~CJS_GlobalData()
m_arrayGlobalData.RemoveAll();
}
-int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname)
+int CJS_GlobalData::FindGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
@@ -157,7 +157,7 @@ int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname)
return nRet;
}
-CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname)
+CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
@@ -169,7 +169,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname)
return NULL;
}
-void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData)
+void CJS_GlobalData::SetGlobalVariableNumber(const FX_CHAR* propname, double dData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -195,7 +195,7 @@ void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData)
}
}
-void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData)
+void CJS_GlobalData::SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -221,7 +221,7 @@ void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData)
}
}
-void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteString& sData)
+void CJS_GlobalData::SetGlobalVariableString(const FX_CHAR* propname, const CFX_ByteString& sData)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -247,7 +247,7 @@ void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteS
}
}
-void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_GlobalVariableArray& array)
+void CJS_GlobalData::SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -273,7 +273,7 @@ void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_Globa
}
}
-void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname)
+void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -297,7 +297,7 @@ void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname)
}
}
-FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent)
+FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -316,7 +316,7 @@ FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL
return FALSE;
}
-FX_BOOL CJS_GlobalData::DeleteGlobalVariable(FX_LPCSTR propname)
+FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -350,7 +350,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetAt(int index) const
void CJS_GlobalData::LoadGlobalPersistentVariables()
{
- FX_LPBYTE pBuffer = NULL;
+ uint8_t* pBuffer = NULL;
int32_t nLength = 0;
LoadFileBuffer(m_sFilePath.c_str(), pBuffer, nLength);
@@ -358,7 +358,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
if (pBuffer)
{
- FX_LPBYTE p = pBuffer;
+ uint8_t* p = pBuffer;
FX_WORD wType = *((FX_WORD*)p);
p += sizeof(FX_WORD);
@@ -508,15 +508,15 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables()
sFile.AppendBlock(sData.GetBuffer(), sData.GetSize());
CRYPT_ArcFourCryptBlock(sFile.GetBuffer(), sFile.GetSize(), JS_RC4KEY, sizeof(JS_RC4KEY));
- WriteFileBuffer(m_sFilePath.c_str(), (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize());
+ WriteFileBuffer(m_sFilePath.c_str(), (const FX_CHAR*)sFile.GetBuffer(), sFile.GetSize());
}
-void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength)
+void CJS_GlobalData::LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength)
{
//UnSupport.
}
-void CJS_GlobalData::WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength)
+void CJS_GlobalData::WriteFileBuffer(const FX_WCHAR* sFilePath, const FX_CHAR* pBuffer, int32_t nLength)
{
//UnSupport.
}
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 66fd2b682f..f40f142fba 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/src/javascript/JS_Object.cpp
@@ -19,7 +19,7 @@ JS_TIMER_MAPARRAY& GetTimeMap()
return *timeMap;
}
-int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon)
+int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon)
{
int nRet = 0;
@@ -62,12 +62,12 @@ CPDFSDK_PageView* CJS_EmbedObj::JSGetPageView(IFXJS_Context* cc)
return FXJS_GetPageView(cc);
}
-int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,FX_LPCWSTR swMsg,FX_LPCWSTR swTitle,FX_UINT nType,FX_UINT nIcon)
+int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,const FX_WCHAR* swMsg,const FX_WCHAR* swTitle,FX_UINT nType,FX_UINT nIcon)
{
return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
}
-void CJS_EmbedObj::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg)
+void CJS_EmbedObj::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg)
{
CJS_Object::Alert(pContext, swMsg);
}
@@ -134,12 +134,12 @@ CPDFSDK_PageView* CJS_Object::JSGetPageView(IFXJS_Context* cc)
return FXJS_GetPageView(cc);
}
-int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon)
+int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon)
{
return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
}
-void CJS_Object::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg)
+void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg)
{
ASSERT(pContext != NULL);
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 0943802508..5bca831710 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -57,12 +57,12 @@ CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Document* pJsDoc):m_isolate(isola
m_pValue = (JSFXObject)*pJsDoc;
}
-CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr):m_isolate(isolate)
+CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr):m_isolate(isolate)
{
operator =(pWstr);
}
-CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCSTR pStr):m_isolate(isolate)
+CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr):m_isolate(isolate)
{
operator = (pStr);
}
@@ -200,7 +200,7 @@ void CJS_Value::operator = (CJS_Document* pJsDoc)
}
}
-void CJS_Value::operator =(FX_LPCWSTR pWstr)
+void CJS_Value::operator =(const FX_WCHAR* pWstr)
{
m_pValue = JS_NewString(m_isolate,(wchar_t *)pWstr);
@@ -214,7 +214,7 @@ void CJS_Value::SetNull()
m_eType = VT_null;
}
-void CJS_Value::operator = (FX_LPCSTR pStr)
+void CJS_Value::operator = (const FX_CHAR* pStr)
{
operator = (CFX_WideString::FromLocal(pStr).c_str());
}
@@ -419,7 +419,7 @@ void CJS_PropValue::operator >>(CFX_ByteString &string) const
string = CJS_Value::ToCFXByteString();
}
-void CJS_PropValue::operator <<(FX_LPCWSTR c_string)
+void CJS_PropValue::operator <<(const FX_WCHAR* c_string)
{
ASSERT(!m_bIsSetting);
CJS_Value::operator =(c_string);
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 4607fc69cc..bfd6935ce2 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -64,8 +64,8 @@ IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods)
struct stru_TbConvert
{
- FX_LPCSTR lpszJSMark;
- FX_LPCSTR lpszCppMark;
+ const FX_CHAR* lpszJSMark;
+ const FX_CHAR* lpszCppMark;
};
static const stru_TbConvert fcTable[] = {
@@ -91,21 +91,21 @@ static const stru_TbConvert fcTable[] = {
//"t"
};
-static FX_LPCWSTR months[] =
+static const FX_WCHAR* months[] =
{
L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec"
};
-static FX_LPCWSTR fullmonths[] =
+static const FX_WCHAR* fullmonths[] =
{
L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December"
};
-FX_BOOL CJS_PublicMethods::IsNumber(FX_LPCWSTR string)
+FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string)
{
CFX_WideString sTrim = StrTrim(string);
- FX_LPCWSTR pTrim = sTrim.c_str();
- FX_LPCWSTR p = pTrim;
+ const FX_WCHAR* pTrim = sTrim.c_str();
+ const FX_WCHAR* p = pTrim;
FX_BOOL bDot = FALSE;
@@ -191,7 +191,7 @@ FX_BOOL CJS_PublicMethods::isReservedMaskChar(wchar_t ch)
return ch == L'9' || ch == L'A' || ch == L'O' || ch == L'X';
}
-double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double dValue2)
+double CJS_PublicMethods::AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2)
{
if (FXSYS_wcsicmp(sFuction,L"AVG") == 0 || FXSYS_wcsicmp(sFuction,L"SUM") == 0)
{
@@ -213,49 +213,49 @@ double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double
return dValue1;
}
-CFX_WideString CJS_PublicMethods::StrLTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrLTrim(const FX_WCHAR* pStr)
{
while (*pStr && *pStr == L' ') pStr++;
return pStr;
}
-CFX_WideString CJS_PublicMethods::StrRTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrRTrim(const FX_WCHAR* pStr)
{
- FX_LPCWSTR p = pStr;
+ const FX_WCHAR* p = pStr;
while (*p) p++;
while (p > pStr && *(p - 1) == L' ') p--;
return CFX_WideString(pStr, p - pStr);
}
-CFX_WideString CJS_PublicMethods::StrTrim(FX_LPCWSTR pStr)
+CFX_WideString CJS_PublicMethods::StrTrim(const FX_WCHAR* pStr)
{
return StrRTrim(StrLTrim(pStr).c_str());
}
-CFX_ByteString CJS_PublicMethods::StrLTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrLTrim(const FX_CHAR* pStr)
{
while (*pStr && *pStr == ' ') pStr++;
return pStr;
}
-CFX_ByteString CJS_PublicMethods::StrRTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrRTrim(const FX_CHAR* pStr)
{
- FX_LPCSTR p = pStr;
+ const FX_CHAR* p = pStr;
while (*p) p++;
while (p > pStr && *(p - 1) == L' ') p--;
return CFX_ByteString(pStr,p-pStr);
}
-CFX_ByteString CJS_PublicMethods::StrTrim(FX_LPCSTR pStr)
+CFX_ByteString CJS_PublicMethods::StrTrim(const FX_CHAR* pStr)
{
return StrRTrim(StrLTrim(pStr));
}
-double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS)
+double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS)
{
bDot = FALSE;
bSign = FALSE;
@@ -263,11 +263,11 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits,
FX_BOOL bDigitExist = FALSE;
- FX_LPCWSTR p = swSource;
+ const FX_WCHAR* p = swSource;
wchar_t c;
- FX_LPCWSTR pStart = NULL;
- FX_LPCWSTR pEnd = NULL;
+ const FX_WCHAR* pStart = NULL;
+ const FX_WCHAR* pEnd = NULL;
while ((c = *p))
{
@@ -401,7 +401,7 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits,
return dRet;
}
-double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource)
+double CJS_PublicMethods::ParseStringToNumber(const FX_WCHAR* swSource)
{
FX_BOOL bAllDigits = FALSE;
FX_BOOL bDot = FALSE;
@@ -411,7 +411,7 @@ double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource)
return ParseNumber(swSource, bAllDigits, bDot, bSign, bKXJS);
}
-FX_BOOL CJS_PublicMethods::ConvertStringToNumber(FX_LPCWSTR swSource, double & dRet, FX_BOOL & bDot)
+FX_BOOL CJS_PublicMethods::ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot)
{
FX_BOOL bAllDigits = FALSE;
FX_BOOL bSign = FALSE;
@@ -1660,7 +1660,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
+ const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy",
L"m/d/yy h:MM tt", L"m/d/yy HH:MM" };
@@ -1691,7 +1691,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Paramet
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
+ const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy",
L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy",
L"m/d/yy h:MM tt", L"m/d/yy HH:MM" };
@@ -1721,7 +1721,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
+ const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
ASSERT(iIndex<FX_ArraySize(cFormats));
@@ -1747,7 +1747,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Paramet
}
int iIndex = params[0].ToInt();
- FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
+ const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"};
ASSERT(iIndex<FX_ArraySize(cFormats));
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 7065933143..bbe5c02257 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -138,17 +138,17 @@ void global_alternate::Initial(CPDFDoc_Environment* pApp)
UpdateGlobalPersistentVariables();
}
-FX_BOOL global_alternate::QueryProperty(FX_LPCWSTR propname)
+FX_BOOL global_alternate::QueryProperty(const FX_WCHAR* propname)
{
return CFX_WideString(propname) != L"setPersistent";
}
-FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString& sError)
+FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError)
{
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
pData->bDeleted = TRUE;
return TRUE;
@@ -157,7 +157,7 @@ FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CF
return FALSE;
}
-FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
@@ -206,7 +206,7 @@ FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
if (pData)
{
@@ -270,7 +270,7 @@ FX_BOOL global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters&
CFX_ByteString sName = params[0].ToCFXByteString();
js_global_data* pData = NULL;
- if (m_mapGlobal.Lookup(sName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sName, (void*&)pData))
{
if (pData && !pData->bDeleted)
{
@@ -341,7 +341,7 @@ void global_alternate::CommitGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
if (pData)
{
@@ -495,7 +495,7 @@ void global_alternate::DestroyGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
delete pData;
}
@@ -503,13 +503,13 @@ void global_alternate::DestroyGlobalPersisitentVariables()
}
-FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
+FX_BOOL global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent)
{
if (propname == NULL) return FALSE;
js_global_data* pTemp = NULL;
- m_mapGlobal.Lookup(propname, (FX_LPVOID&)pTemp);
+ m_mapGlobal.Lookup(propname, (void*&)pTemp);
if (pTemp)
{
@@ -601,7 +601,7 @@ FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
return FALSE;
}
- m_mapGlobal.SetAt(propname, (FX_LPVOID)pNewData);
+ m_mapGlobal.SetAt(propname, (void*)pNewData);
return TRUE;
}
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index e051cda66e..97bddec5c1 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -58,8 +58,8 @@ util::~util(void)
struct stru_TbConvert
{
- FX_LPCWSTR lpszJSMark;
- FX_LPCWSTR lpszCppMark;
+ const FX_WCHAR* lpszJSMark;
+ const FX_WCHAR* lpszCppMark;
};
const stru_TbConvert fcTable[] = {
@@ -315,7 +315,7 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
struct stru_TbConvertAd
{
- FX_LPCWSTR lpszJSMark;
+ const FX_WCHAR* lpszJSMark;
int iValue;
};
@@ -411,7 +411,7 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur
struct stru_TbConvertAd
{
- FX_LPCWSTR lpszJSMark;
+ const FX_WCHAR* lpszJSMark;
int iValue;
};
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 0c0d8b5b1b..5ffbc9d86b 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -33,7 +33,7 @@ class CJS_PrivateData
public:
CJS_PrivateData():ObjDefID(-1), pPrivate(NULL) {}
int ObjDefID;
- FX_LPVOID pPrivate;
+ void* pPrivate;
};
@@ -105,7 +105,7 @@ int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* s
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -125,7 +125,7 @@ int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t*
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsPropertyName), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut);
+ objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, bsPropertyName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -162,7 +162,7 @@ int JS_DefineObjConst(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sC
if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0;
CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID);
v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate);
- objTemp->Set(isolate, FX_LPCSTR(bsConstName), pDefault);
+ objTemp->Set(isolate, bsConstName.c_str(), pDefault);
pObjDef->m_objTemplate.Reset(isolate,objTemp);
return 0;
}
@@ -202,7 +202,7 @@ int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v
objTemp = v8::ObjectTemplate::New(isolate);
else
objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly);
globalObjTemp.Reset(isolate,objTemp);
@@ -225,7 +225,7 @@ int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8:
objTemp = v8::ObjectTemplate::New(isolate);
else
objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp);
- objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsConst), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly);
+ objTemp->Set(v8::String::NewFromUtf8(isolate, bsConst.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly);
globalObjTemp.Reset(isolate,objTemp);
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index 51c4c185f9..6ed64a4776 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -244,13 +244,13 @@ CFX_WideString CPWL_ComboBox::GetText() const
return CFX_WideString();
}
-void CPWL_ComboBox::SetText(FX_LPCWSTR text)
+void CPWL_ComboBox::SetText(const FX_WCHAR* text)
{
if (m_pEdit)
m_pEdit->SetText(text);
}
-void CPWL_ComboBox::AddString(FX_LPCWSTR string)
+void CPWL_ComboBox::AddString(const FX_WCHAR* string)
{
if (m_pList)
m_pList->AddString(string);
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index f50233ff1c..62f09eff2b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -37,7 +37,7 @@ void CPWL_Edit::OnDestroy()
{
}
-void CPWL_Edit::SetText(FX_LPCWSTR csText)
+void CPWL_Edit::SetText(const FX_WCHAR* csText)
{
CFX_WideString swText = csText;
@@ -865,7 +865,7 @@ void CPWL_Edit::SetLimitChar(int32_t nLimitChar)
m_pEdit->SetLimitChar(nLimitChar);
}
-void CPWL_Edit::ReplaceSel(FX_LPCWSTR csText)
+void CPWL_Edit::ReplaceSel(const FX_WCHAR* csText)
{
m_pEdit->Clear();
m_pEdit->InsertText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index a38371c326..57b0c01782 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -561,7 +561,7 @@ FX_FLOAT CPWL_EditCtrl::GetCaretFontSize() const
return fFontSize;
}
-void CPWL_EditCtrl::SetText(FX_LPCWSTR csText)
+void CPWL_EditCtrl::SetText(const FX_WCHAR* csText)
{
m_pEdit->SetText(csText);
}
@@ -582,7 +582,7 @@ void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow)
{
}
-void CPWL_EditCtrl::InsertText(FX_LPCWSTR csText)
+void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText)
{
if (!IsReadOnly())
m_pEdit->InsertText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 62811eaac1..3d381f65c9 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -195,7 +195,7 @@ void CPWL_FontMap::Empty()
}
}
-void CPWL_FontMap::Initial(FX_LPCSTR fontname)
+void CPWL_FontMap::Initial(const FX_CHAR* fontname)
{
CFX_ByteString sFontName = fontname;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 9426824c8e..f85156da0c 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -109,7 +109,7 @@ CFX_ByteString CPWL_Image::GetImageAlias()
return CFX_ByteString();
}
-void CPWL_Image::SetImageAlias(FX_LPCSTR sImageAlias)
+void CPWL_Image::SetImageAlias(const FX_CHAR* sImageAlias)
{
m_sImageAlias = sImageAlias;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index f2f3929e3f..9875002437 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -43,7 +43,7 @@ void CPWL_Label::OnCreated()
}
}
-void CPWL_Label::SetText(FX_LPCWSTR csText)
+void CPWL_Label::SetText(const FX_WCHAR* csText)
{
m_pEdit->SetText(csText);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index 47c1c86123..ecf9e1231f 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -462,7 +462,7 @@ CPDF_Rect CPWL_ListBox::GetFocusRect() const
return CPWL_Wnd::GetFocusRect();
}
-void CPWL_ListBox::AddString(FX_LPCWSTR string)
+void CPWL_ListBox::AddString(const FX_WCHAR* string)
{
if (m_pList)
{
@@ -470,7 +470,7 @@ void CPWL_ListBox::AddString(FX_LPCWSTR string)
}
}
-void CPWL_ListBox::SetText(FX_LPCWSTR csText,FX_BOOL bRefresh)
+void CPWL_ListBox::SetText(const FX_WCHAR* csText,FX_BOOL bRefresh)
{
//return CPDF_List::SetText(csText,bRefresh);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 6e8ffcd546..13e15a0518 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -143,7 +143,7 @@ void CPWL_Note_Edit::RePosChildWnd()
m_fOldItemHeight = this->GetContentRect().Height();
}
-void CPWL_Note_Edit::SetText(FX_LPCWSTR csText)
+void CPWL_Note_Edit::SetText(const FX_WCHAR* csText)
{
m_bEnableNotify = FALSE;
CPWL_Edit::SetText(csText);
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index fe07630057..4864cabc11 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -99,14 +99,14 @@ void CPWL_Signature::SetFoxitFlag(FX_BOOL bFlagExist)
m_bFlagExist = bFlagExist;
}
-void CPWL_Signature::SetText(FX_LPCWSTR sText)
+void CPWL_Signature::SetText(const FX_WCHAR* sText)
{
m_pText->SetText(sText);
RePosChildWnd();
}
-void CPWL_Signature::SetDescription(FX_LPCWSTR string)
+void CPWL_Signature::SetDescription(const FX_WCHAR* string)
{
m_pDescription->SetText(string);
@@ -120,7 +120,7 @@ void CPWL_Signature::SetImage(CFX_DIBSource* pImage)
RePosChildWnd();
}
-void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, FX_LPCSTR sImageAlias)
+void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias)
{
m_pImage->SetPDFStream(pStream);
m_pImage->SetImageAlias(sImageAlias);