summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
commitd7e5cc754a937605d1f73db5e7967c58ddd80742 (patch)
treeed28e012c4d6a46b7f29f15a0c060474c27d4286 /fpdfsdk/include/javascript
parentbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff)
downloadpdfium-d7e5cc754a937605d1f73db5e7967c58ddd80742.tar.xz
Merge to XFA: Remove typdefs for pointer types in fx_system.h.
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
Diffstat (limited to 'fpdfsdk/include/javascript')
-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
6 files changed, 40 insertions, 40 deletions
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 4e1073d15a..fea082d811 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 3b97677fa6..803f6ba35e 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);