summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include/javascript')
-rw-r--r--fpdfsdk/include/javascript/Consts.h36
-rw-r--r--fpdfsdk/include/javascript/Document.h13
-rw-r--r--fpdfsdk/include/javascript/Field.h8
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h6
-rw-r--r--fpdfsdk/include/javascript/Icon.h7
-rw-r--r--fpdfsdk/include/javascript/JS_Context.h216
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h2
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h16
-rw-r--r--fpdfsdk/include/javascript/PublicMethods.h4
-rw-r--r--fpdfsdk/include/javascript/app.h20
-rw-r--r--fpdfsdk/include/javascript/color.h6
-rw-r--r--fpdfsdk/include/javascript/console.h6
-rw-r--r--fpdfsdk/include/javascript/event.h6
-rw-r--r--fpdfsdk/include/javascript/global.h9
-rw-r--r--fpdfsdk/include/javascript/report.h6
-rw-r--r--fpdfsdk/include/javascript/util.h6
16 files changed, 180 insertions, 187 deletions
diff --git a/fpdfsdk/include/javascript/Consts.h b/fpdfsdk/include/javascript/Consts.h
index c0abe4c7d4..79f85f8002 100644
--- a/fpdfsdk/include/javascript/Consts.h
+++ b/fpdfsdk/include/javascript/Consts.h
@@ -13,8 +13,8 @@
class CJS_Border : public CJS_Object {
public:
- CJS_Border(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Border(void){};
+ explicit CJS_Border(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Border() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -23,8 +23,8 @@ class CJS_Border : public CJS_Object {
class CJS_Display : public CJS_Object {
public:
- CJS_Display(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Display(void){};
+ explicit CJS_Display(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Display() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -33,8 +33,8 @@ class CJS_Display : public CJS_Object {
class CJS_Font : public CJS_Object {
public:
- CJS_Font(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Font(void){};
+ explicit CJS_Font(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Font() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -43,8 +43,8 @@ class CJS_Font : public CJS_Object {
class CJS_Highlight : public CJS_Object {
public:
- CJS_Highlight(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Highlight(void){};
+ explicit CJS_Highlight(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Highlight() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -53,8 +53,8 @@ class CJS_Highlight : public CJS_Object {
class CJS_Position : public CJS_Object {
public:
- CJS_Position(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Position(void){};
+ explicit CJS_Position(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Position() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -63,8 +63,8 @@ class CJS_Position : public CJS_Object {
class CJS_ScaleHow : public CJS_Object {
public:
- CJS_ScaleHow(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_ScaleHow(void){};
+ explicit CJS_ScaleHow(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_ScaleHow() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -73,8 +73,8 @@ class CJS_ScaleHow : public CJS_Object {
class CJS_ScaleWhen : public CJS_Object {
public:
- CJS_ScaleWhen(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_ScaleWhen(void){};
+ explicit CJS_ScaleWhen(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_ScaleWhen() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -83,8 +83,8 @@ class CJS_ScaleWhen : public CJS_Object {
class CJS_Style : public CJS_Object {
public:
- CJS_Style(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Style(void){};
+ explicit CJS_Style(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Style() override {}
DECLARE_JS_CLASS_CONST();
};
@@ -93,8 +93,8 @@ class CJS_Style : public CJS_Object {
class CJS_Zoomtype : public CJS_Object {
public:
- CJS_Zoomtype(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Zoomtype(void){};
+ explicit CJS_Zoomtype(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Zoomtype() override {}
DECLARE_JS_CLASS_CONST();
};
diff --git a/fpdfsdk/include/javascript/Document.h b/fpdfsdk/include/javascript/Document.h
index 52a1981b5e..3b21ba6fc1 100644
--- a/fpdfsdk/include/javascript/Document.h
+++ b/fpdfsdk/include/javascript/Document.h
@@ -12,7 +12,7 @@
class PrintParamsObj : public CJS_EmbedObj {
public:
PrintParamsObj(CJS_Object* pJSObject);
- virtual ~PrintParamsObj() {}
+ ~PrintParamsObj() override {}
public:
FX_BOOL bUI;
@@ -28,7 +28,7 @@ class PrintParamsObj : public CJS_EmbedObj {
class CJS_PrintParamsObj : public CJS_Object {
public:
CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {}
- virtual ~CJS_PrintParamsObj() {}
+ ~CJS_PrintParamsObj() override {}
DECLARE_JS_CLASS(CJS_PrintParamsObj);
};
@@ -70,7 +70,7 @@ struct CJS_AnnotObj;
class Document : public CJS_EmbedObj {
public:
Document(CJS_Object* pJSObject);
- virtual ~Document();
+ ~Document() override;
public:
FX_BOOL ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
@@ -323,10 +323,11 @@ class Document : public CJS_EmbedObj {
class CJS_Document : public CJS_Object {
public:
- CJS_Document(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Document(){};
+ explicit CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Document() override {}
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ // CJS_Object
+ FX_BOOL InitInstance(IFXJS_Context* cc) override;
DECLARE_JS_CLASS(CJS_Document);
diff --git a/fpdfsdk/include/javascript/Field.h b/fpdfsdk/include/javascript/Field.h
index afbf783bf2..ca37ae57bd 100644
--- a/fpdfsdk/include/javascript/Field.h
+++ b/fpdfsdk/include/javascript/Field.h
@@ -89,7 +89,7 @@ struct CJS_DelayData {
class Field : public CJS_EmbedObj {
public:
Field(CJS_Object* pJSObject);
- virtual ~Field(void);
+ ~Field() override;
FX_BOOL alignment(IFXJS_Context* cc,
CJS_PropValue& vp,
@@ -533,10 +533,10 @@ class Field : public CJS_EmbedObj {
class CJS_Field : public CJS_Object {
public:
- CJS_Field(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Field(void){};
+ CJS_Field(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Field(void) override {}
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ FX_BOOL InitInstance(IFXJS_Context* cc) override;
DECLARE_JS_CLASS(CJS_Field);
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index d2cbfb1dd8..9c232b01fb 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -18,7 +18,6 @@ class CPDFSDK_Document;
class IFXJS_Context {
public:
- virtual ~IFXJS_Context() {}
virtual FX_BOOL Compile(const CFX_WideString& script,
CFX_WideString& info) = 0;
virtual FX_BOOL RunScript(const CFX_WideString& script,
@@ -129,6 +128,9 @@ class IFXJS_Context {
virtual void OnExternal_Exec() = 0;
virtual void EnableMessageBox(FX_BOOL bEnable) = 0;
+
+ protected:
+ virtual ~IFXJS_Context() {}
};
class IFXJS_Runtime {
@@ -147,7 +149,7 @@ class IFXJS_Runtime {
FXJSE_HVALUE hValue) = 0;
protected:
- ~IFXJS_Runtime() {}
+ virtual ~IFXJS_Runtime() {}
};
class CPDFDoc_Environment;
diff --git a/fpdfsdk/include/javascript/Icon.h b/fpdfsdk/include/javascript/Icon.h
index 0b549ec613..6d2f6e4645 100644
--- a/fpdfsdk/include/javascript/Icon.h
+++ b/fpdfsdk/include/javascript/Icon.h
@@ -12,7 +12,8 @@
class Icon : public CJS_EmbedObj {
public:
Icon(CJS_Object* pJSObject);
- virtual ~Icon();
+ ~Icon() override;
+
FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
void SetStream(CPDF_Stream* pIconStream);
CPDF_Stream* GetStream();
@@ -26,8 +27,8 @@ class Icon : public CJS_EmbedObj {
class CJS_Icon : public CJS_Object {
public:
- CJS_Icon(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Icon(){};
+ CJS_Icon(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Icon() override {}
public:
DECLARE_JS_CLASS(CJS_Icon);
diff --git a/fpdfsdk/include/javascript/JS_Context.h b/fpdfsdk/include/javascript/JS_Context.h
index f61f37cdc6..a716bc2ccb 100644
--- a/fpdfsdk/include/javascript/JS_Context.h
+++ b/fpdfsdk/include/javascript/JS_Context.h
@@ -17,121 +17,112 @@ class CJS_Runtime;
class CJS_Context : public IFXJS_Context {
public:
CJS_Context(CJS_Runtime* pRuntime);
- virtual ~CJS_Context();
+ ~CJS_Context() override;
+
+ // IFXJS_Context
+ FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info) override;
+ FX_BOOL RunScript(const CFX_WideString& script,
+ CFX_WideString& info) override;
+ void OnApp_Init() override;
+ void OnDoc_Open(CPDFSDK_Document* pDoc,
+ const CFX_WideString& strTargetName) override;
+ void OnDoc_WillPrint(CPDFSDK_Document* pDoc) override;
+ void OnDoc_DidPrint(CPDFSDK_Document* pDoc) override;
+ void OnDoc_WillSave(CPDFSDK_Document* pDoc) override;
+ void OnDoc_DidSave(CPDFSDK_Document* pDoc) override;
+ void OnDoc_WillClose(CPDFSDK_Document* pDoc) override;
+ void OnPage_Open(CPDFSDK_Document* pTarget) override;
+ void OnPage_Close(CPDFSDK_Document* pTarget) override;
+ void OnPage_InView(CPDFSDK_Document* pTarget) override;
+ void OnPage_OutView(CPDFSDK_Document* pTarget) override;
+ void OnField_MouseDown(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget) override;
+ void OnField_MouseEnter(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget) override;
+ void OnField_MouseExit(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget) override;
+ void OnField_MouseUp(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget) override;
+ void OnField_Focus(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget,
+ const CFX_WideString& Value) override;
+ void OnField_Blur(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget,
+ const CFX_WideString& Value) override;
+ void OnField_Calculate(CPDF_FormField* pSource,
+ CPDF_FormField* pTarget,
+ CFX_WideString& Value,
+ FX_BOOL& bRc) override;
+ void OnField_Format(CPDF_FormField* pTarget,
+ CFX_WideString& Value,
+ FX_BOOL bWillCommit) override;
+ void OnField_Keystroke(CFX_WideString& strChange,
+ const CFX_WideString& strChangeEx,
+ FX_BOOL bKeyDown,
+ FX_BOOL bModifier,
+ int& nSelEnd,
+ int& nSelStart,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget,
+ CFX_WideString& Value,
+ FX_BOOL bWillCommit,
+ FX_BOOL bFieldFull,
+ FX_BOOL& bRc) override;
+ void OnField_Validate(CFX_WideString& strChange,
+ const CFX_WideString& strChangeEx,
+ FX_BOOL bKeyDown,
+ FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDF_FormField* pTarget,
+ CFX_WideString& Value,
+ FX_BOOL& bRc) override;
+ void OnScreen_Focus(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_Blur(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_Open(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_Close(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_MouseDown(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_MouseUp(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_MouseEnter(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_MouseExit(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_InView(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnScreen_OutView(FX_BOOL bModifier,
+ FX_BOOL bShift,
+ CPDFSDK_Annot* pScreen) override;
+ void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) override;
+ void OnLink_MouseUp(CPDFSDK_Document* pTarget) override;
+ void OnMenu_Exec(CPDFSDK_Document* pTarget,
+ const CFX_WideString& strTargetName) override;
+ void OnBatchExec(CPDFSDK_Document* pTarget) override;
+ void OnConsole_Exec() override;
+ void OnExternal_Exec() override;
+ void EnableMessageBox(FX_BOOL bEnable) override { m_bMsgBoxEnable = bEnable; }
- public:
- virtual FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info);
- virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info);
-
- public:
- virtual void OnApp_Init();
-
- virtual void OnDoc_Open(CPDFSDK_Document* pDoc,
- const CFX_WideString& strTargetName);
- virtual void OnDoc_WillPrint(CPDFSDK_Document* pDoc);
- virtual void OnDoc_DidPrint(CPDFSDK_Document* pDoc);
- virtual void OnDoc_WillSave(CPDFSDK_Document* pDoc);
- virtual void OnDoc_DidSave(CPDFSDK_Document* pDoc);
- virtual void OnDoc_WillClose(CPDFSDK_Document* pDoc);
-
- virtual void OnPage_Open(CPDFSDK_Document* pTarget);
- virtual void OnPage_Close(CPDFSDK_Document* pTarget);
- virtual void OnPage_InView(CPDFSDK_Document* pTarget);
- virtual void OnPage_OutView(CPDFSDK_Document* pTarget);
-
- virtual void OnField_MouseDown(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget);
- virtual void OnField_MouseEnter(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget);
- virtual void OnField_MouseExit(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget);
- virtual void OnField_MouseUp(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget);
- virtual void OnField_Focus(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget,
- const CFX_WideString& Value);
- virtual void OnField_Blur(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget,
- const CFX_WideString& Value);
-
- virtual void OnField_Calculate(CPDF_FormField* pSource,
- CPDF_FormField* pTarget,
- CFX_WideString& Value,
- FX_BOOL& bRc);
- virtual void OnField_Format(CPDF_FormField* pTarget,
- CFX_WideString& Value,
- FX_BOOL bWillCommit);
- virtual void OnField_Keystroke(CFX_WideString& strChange,
- const CFX_WideString& strChangeEx,
- FX_BOOL bKeyDown,
- FX_BOOL bModifier,
- int& nSelEnd,
- int& nSelStart,
- FX_BOOL bShift,
- CPDF_FormField* pTarget,
- CFX_WideString& Value,
- FX_BOOL bWillCommit,
- FX_BOOL bFieldFull,
- FX_BOOL& bRc);
- virtual void OnField_Validate(CFX_WideString& strChange,
- const CFX_WideString& strChangeEx,
- FX_BOOL bKeyDown,
- FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDF_FormField* pTarget,
- CFX_WideString& Value,
- FX_BOOL& bRc);
-
- virtual void OnScreen_Focus(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Blur(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Open(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Close(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseDown(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseUp(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseEnter(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseExit(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_InView(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
- virtual void OnScreen_OutView(FX_BOOL bModifier,
- FX_BOOL bShift,
- CPDFSDK_Annot* pScreen);
-
- virtual void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark);
- virtual void OnLink_MouseUp(CPDFSDK_Document* pTarget);
-
- virtual void OnMenu_Exec(CPDFSDK_Document* pTarget,
- const CFX_WideString& strTargetName);
- virtual void OnBatchExec(CPDFSDK_Document* pTarget);
- virtual void OnConsole_Exec();
- virtual void OnExternal_Exec();
-
- virtual void EnableMessageBox(FX_BOOL bEnable) { m_bMsgBoxEnable = bEnable; }
FX_BOOL IsMsgBoxEnabled() const { return m_bMsgBoxEnable; }
- public:
CPDFDoc_Environment* GetReaderApp();
CJS_Runtime* GetJSRuntime() { return m_pRuntime; }
@@ -143,7 +134,6 @@ class CJS_Context : public IFXJS_Context {
private:
CJS_Runtime* m_pRuntime;
CJS_EventHandler* m_pEventHandler;
-
FX_BOOL m_bBusy;
FX_BOOL m_bMsgBoxEnable;
};
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index adcedb837c..9fd7bff3d4 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -49,7 +49,7 @@ class CJS_EmbedObj {
class CJS_Object {
public:
explicit CJS_Object(JSFXObject pObject);
- virtual ~CJS_Object(void);
+ virtual ~CJS_Object();
void MakeWeak();
void Dispose();
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index 1e9f3a97ac..2e397ea1ef 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -31,14 +31,14 @@ class CJS_FieldEvent {
class CJS_Runtime : public IFXJS_Runtime {
public:
CJS_Runtime(CPDFDoc_Environment* pApp);
- virtual ~CJS_Runtime();
-
- virtual IFXJS_Context* NewContext();
- virtual void ReleaseContext(IFXJS_Context* pContext);
- virtual IFXJS_Context* GetCurrentContext();
-
- virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc);
- virtual CPDFSDK_Document* GetReaderDocument() { return m_pDocument; }
+ ~CJS_Runtime() override;
+
+ // IFXJS_Runtime
+ IFXJS_Context* NewContext() override;
+ void ReleaseContext(IFXJS_Context* pContext) override;
+ IFXJS_Context* GetCurrentContext() override;
+ void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override;
+ CPDFSDK_Document* GetReaderDocument() override { return m_pDocument; }
CPDFDoc_Environment* GetReaderApp() { return m_pApp; }
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index c5d5ea6d46..96c5ea5ad0 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -11,8 +11,8 @@
class CJS_PublicMethods : public CJS_Object {
public:
- CJS_PublicMethods(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_PublicMethods(void){};
+ CJS_PublicMethods(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_PublicMethods() override {}
public:
static FX_BOOL AFNumber_Format(IFXJS_Context* cc,
diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h
index b13121323b..995c2605df 100644
--- a/fpdfsdk/include/javascript/app.h
+++ b/fpdfsdk/include/javascript/app.h
@@ -18,7 +18,7 @@ class CJS_Timer;
class TimerObj : public CJS_EmbedObj {
public:
TimerObj(CJS_Object* pJSObject);
- virtual ~TimerObj();
+ ~TimerObj() override;
public:
void SetTimer(CJS_Timer* pTimer);
@@ -31,7 +31,7 @@ class TimerObj : public CJS_EmbedObj {
class CJS_TimerObj : public CJS_Object {
public:
CJS_TimerObj(JSFXObject pObject) : CJS_Object(pObject) {}
- virtual ~CJS_TimerObj() {}
+ ~CJS_TimerObj() override {}
DECLARE_JS_CLASS(CJS_TimerObj);
};
@@ -39,7 +39,7 @@ class CJS_TimerObj : public CJS_Object {
class app : public CJS_EmbedObj {
public:
app(CJS_Object* pJSObject);
- virtual ~app();
+ ~app() override;
public:
FX_BOOL activeDocs(IFXJS_Context* cc,
@@ -160,24 +160,22 @@ class app : public CJS_EmbedObj {
CJS_Value& vRet,
CFX_WideString& sError);
- private:
- void TimerProc(CJS_Timer* pTimer);
- void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript);
-
- public:
static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath);
private:
+ // CJS_EmbedObj
+ void TimerProc(CJS_Timer* pTimer) override;
+ void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript);
+
bool m_bCalculate;
bool m_bRuntimeHighLight;
-
CFX_ArrayTemplate<CJS_Timer*> m_aTimer;
};
class CJS_App : public CJS_Object {
public:
- CJS_App(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_App(void){};
+ explicit CJS_App(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_App() override {}
DECLARE_JS_CLASS(CJS_App);
diff --git a/fpdfsdk/include/javascript/color.h b/fpdfsdk/include/javascript/color.h
index 45704efa80..cabd770ee8 100644
--- a/fpdfsdk/include/javascript/color.h
+++ b/fpdfsdk/include/javascript/color.h
@@ -13,7 +13,7 @@
class color : public CJS_EmbedObj {
public:
color(CJS_Object* pJSObject);
- virtual ~color(void);
+ ~color() override;
FX_BOOL black(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
FX_BOOL blue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
@@ -60,8 +60,8 @@ class color : public CJS_EmbedObj {
class CJS_Color : public CJS_Object {
public:
- CJS_Color(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Color(void){};
+ CJS_Color(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Color() override {}
DECLARE_JS_CLASS(CJS_Color);
diff --git a/fpdfsdk/include/javascript/console.h b/fpdfsdk/include/javascript/console.h
index a04d87b007..e001695ebf 100644
--- a/fpdfsdk/include/javascript/console.h
+++ b/fpdfsdk/include/javascript/console.h
@@ -12,7 +12,7 @@
class console : public CJS_EmbedObj {
public:
console(CJS_Object* pJSObject);
- virtual ~console(void);
+ ~console() override;
public:
FX_BOOL clear(IFXJS_Context* cc,
@@ -35,8 +35,8 @@ class console : public CJS_EmbedObj {
class CJS_Console : public CJS_Object {
public:
- CJS_Console(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Console(void){};
+ CJS_Console(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Console() override {}
DECLARE_JS_CLASS(CJS_Console);
diff --git a/fpdfsdk/include/javascript/event.h b/fpdfsdk/include/javascript/event.h
index c7c899e69d..e48a659fc7 100644
--- a/fpdfsdk/include/javascript/event.h
+++ b/fpdfsdk/include/javascript/event.h
@@ -12,7 +12,7 @@
class event : public CJS_EmbedObj {
public:
event(CJS_Object* pJSObject);
- virtual ~event(void);
+ ~event() override;
public:
FX_BOOL change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
@@ -59,8 +59,8 @@ class event : public CJS_EmbedObj {
class CJS_Event : public CJS_Object {
public:
- CJS_Event(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Event(void){};
+ CJS_Event(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Event() override {}
DECLARE_JS_CLASS(CJS_Event);
diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h
index 303ac76a3e..369956749b 100644
--- a/fpdfsdk/include/javascript/global.h
+++ b/fpdfsdk/include/javascript/global.h
@@ -36,7 +36,7 @@ struct js_global_data {
class global_alternate : public CJS_EmbedObj {
public:
global_alternate(CJS_Object* pJSObject);
- virtual ~global_alternate();
+ ~global_alternate() override;
public:
FX_BOOL setPersistent(IFXJS_Context* cc,
@@ -81,10 +81,11 @@ class global_alternate : public CJS_EmbedObj {
class CJS_Global : public CJS_Object {
public:
- CJS_Global(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Global(void){};
+ explicit CJS_Global(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Global() override {}
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ // CJS_Object
+ FX_BOOL InitInstance(IFXJS_Context* cc) override;
DECLARE_SPECIAL_JS_CLASS(CJS_Global);
diff --git a/fpdfsdk/include/javascript/report.h b/fpdfsdk/include/javascript/report.h
index a9004fd46a..52be2f36e2 100644
--- a/fpdfsdk/include/javascript/report.h
+++ b/fpdfsdk/include/javascript/report.h
@@ -12,7 +12,7 @@
class Report : public CJS_EmbedObj {
public:
Report(CJS_Object* pJSObject);
- virtual ~Report();
+ ~Report() override;
public:
FX_BOOL save(IFXJS_Context* cc,
@@ -27,8 +27,8 @@ class Report : public CJS_EmbedObj {
class CJS_Report : public CJS_Object {
public:
- CJS_Report(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Report(){};
+ CJS_Report(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Report() override {}
public:
DECLARE_JS_CLASS(CJS_Report);
diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h
index 2e65bd3f58..369985673a 100644
--- a/fpdfsdk/include/javascript/util.h
+++ b/fpdfsdk/include/javascript/util.h
@@ -14,7 +14,7 @@
class util : public CJS_EmbedObj {
public:
util(CJS_Object* pJSObject);
- virtual ~util(void);
+ ~util() override;
public:
FX_BOOL printd(IFXJS_Context* cc,
@@ -51,8 +51,8 @@ class util : public CJS_EmbedObj {
class CJS_Util : public CJS_Object {
public:
- CJS_Util(JSFXObject pObject) : CJS_Object(pObject){};
- virtual ~CJS_Util(void){};
+ CJS_Util(JSFXObject pObject) : CJS_Object(pObject) {}
+ ~CJS_Util() override {}
DECLARE_JS_CLASS(CJS_Util);