| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ |
| 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ |
| 9 | 9 |
| 10 #include "JS_Define.h" | 10 #include "JS_Define.h" |
| 11 | 11 |
| 12 class PrintParamsObj : public CJS_EmbedObj { | 12 class PrintParamsObj : public CJS_EmbedObj { |
| 13 public: | 13 public: |
| 14 PrintParamsObj(CJS_Object* pJSObject); | 14 PrintParamsObj(CJS_Object* pJSObject); |
| 15 virtual ~PrintParamsObj() {} | 15 ~PrintParamsObj() override {} |
| 16 | 16 |
| 17 public: | 17 public: |
| 18 FX_BOOL bUI; | 18 FX_BOOL bUI; |
| 19 int nStart; | 19 int nStart; |
| 20 int nEnd; | 20 int nEnd; |
| 21 FX_BOOL bSilent; | 21 FX_BOOL bSilent; |
| 22 FX_BOOL bShrinkToFit; | 22 FX_BOOL bShrinkToFit; |
| 23 FX_BOOL bPrintAsImage; | 23 FX_BOOL bPrintAsImage; |
| 24 FX_BOOL bReverse; | 24 FX_BOOL bReverse; |
| 25 FX_BOOL bAnnotations; | 25 FX_BOOL bAnnotations; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 class CJS_PrintParamsObj : public CJS_Object { | 28 class CJS_PrintParamsObj : public CJS_Object { |
| 29 public: | 29 public: |
| 30 CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} | 30 CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} |
| 31 virtual ~CJS_PrintParamsObj() {} | 31 ~CJS_PrintParamsObj() override {} |
| 32 | 32 |
| 33 DECLARE_JS_CLASS(CJS_PrintParamsObj); | 33 DECLARE_JS_CLASS(CJS_PrintParamsObj); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 class Icon; | 36 class Icon; |
| 37 class Field; | 37 class Field; |
| 38 | 38 |
| 39 struct IconElement { | 39 struct IconElement { |
| 40 IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {} | 40 IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {} |
| 41 virtual ~IconElement() {} | 41 virtual ~IconElement() {} |
| (...skipping 21 matching lines...) Expand all Loading... |
| 63 int m_iLength; | 63 int m_iLength; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 struct CJS_DelayData; | 66 struct CJS_DelayData; |
| 67 struct CJS_DelayAnnot; | 67 struct CJS_DelayAnnot; |
| 68 struct CJS_AnnotObj; | 68 struct CJS_AnnotObj; |
| 69 | 69 |
| 70 class Document : public CJS_EmbedObj { | 70 class Document : public CJS_EmbedObj { |
| 71 public: | 71 public: |
| 72 Document(CJS_Object* pJSObject); | 72 Document(CJS_Object* pJSObject); |
| 73 virtual ~Document(); | 73 ~Document() override; |
| 74 | 74 |
| 75 public: | 75 public: |
| 76 FX_BOOL ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 76 FX_BOOL ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 77 FX_BOOL author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 77 FX_BOOL author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 78 FX_BOOL baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 78 FX_BOOL baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 79 FX_BOOL bookmarkRoot(IFXJS_Context* cc, | 79 FX_BOOL bookmarkRoot(IFXJS_Context* cc, |
| 80 CJS_PropValue& vp, | 80 CJS_PropValue& vp, |
| 81 CFX_WideString& sError); | 81 CFX_WideString& sError); |
| 82 FX_BOOL calculate(IFXJS_Context* cc, | 82 FX_BOOL calculate(IFXJS_Context* cc, |
| 83 CJS_PropValue& vp, | 83 CJS_PropValue& vp, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 IconTree* m_pIconTree; | 316 IconTree* m_pIconTree; |
| 317 CPDFSDK_Document* m_pDocument; | 317 CPDFSDK_Document* m_pDocument; |
| 318 CFX_WideString m_cwBaseURL; | 318 CFX_WideString m_cwBaseURL; |
| 319 bool m_bDelay; | 319 bool m_bDelay; |
| 320 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; | 320 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; |
| 321 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; | 321 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 class CJS_Document : public CJS_Object { | 324 class CJS_Document : public CJS_Object { |
| 325 public: | 325 public: |
| 326 CJS_Document(JSFXObject pObject) : CJS_Object(pObject){}; | 326 explicit CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {} |
| 327 virtual ~CJS_Document(){}; | 327 ~CJS_Document() override {} |
| 328 | 328 |
| 329 virtual FX_BOOL InitInstance(IFXJS_Context* cc); | 329 // CJS_Object |
| 330 FX_BOOL InitInstance(IFXJS_Context* cc) override; |
| 330 | 331 |
| 331 DECLARE_JS_CLASS(CJS_Document); | 332 DECLARE_JS_CLASS(CJS_Document); |
| 332 | 333 |
| 333 JS_STATIC_PROP(ADBE, Document); | 334 JS_STATIC_PROP(ADBE, Document); |
| 334 JS_STATIC_PROP(author, Document); | 335 JS_STATIC_PROP(author, Document); |
| 335 JS_STATIC_PROP(baseURL, Document); | 336 JS_STATIC_PROP(baseURL, Document); |
| 336 JS_STATIC_PROP(bookmarkRoot, Document); | 337 JS_STATIC_PROP(bookmarkRoot, Document); |
| 337 JS_STATIC_PROP(calculate, Document); | 338 JS_STATIC_PROP(calculate, Document); |
| 338 JS_STATIC_PROP(Collab, Document); | 339 JS_STATIC_PROP(Collab, Document); |
| 339 JS_STATIC_PROP(creationDate, Document); | 340 JS_STATIC_PROP(creationDate, Document); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 JS_STATIC_METHOD(removeField, Document); | 399 JS_STATIC_METHOD(removeField, Document); |
| 399 JS_STATIC_METHOD(replacePages, Document); | 400 JS_STATIC_METHOD(replacePages, Document); |
| 400 JS_STATIC_METHOD(removeIcon, Document); | 401 JS_STATIC_METHOD(removeIcon, Document); |
| 401 JS_STATIC_METHOD(resetForm, Document); | 402 JS_STATIC_METHOD(resetForm, Document); |
| 402 JS_STATIC_METHOD(saveAs, Document); | 403 JS_STATIC_METHOD(saveAs, Document); |
| 403 JS_STATIC_METHOD(submitForm, Document); | 404 JS_STATIC_METHOD(submitForm, Document); |
| 404 JS_STATIC_METHOD(mailDoc, Document); | 405 JS_STATIC_METHOD(mailDoc, Document); |
| 405 }; | 406 }; |
| 406 | 407 |
| 407 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ | 408 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ |
| OLD | NEW |