| 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 { | 13 { |
| 14 public: | 14 public: |
| 15 PrintParamsObj(CJS_Object* pJSObject); | 15 PrintParamsObj(CJS_Object* pJSObject); |
| 16 virtual ~PrintParamsObj(){} | 16 virtual ~PrintParamsObj(){} |
| 17 | 17 |
| 18 public: | 18 public: |
| 19 » FX_BOOL bUI; | 19 » bool bUI; |
| 20 int nStart; | 20 int nStart; |
| 21 int nEnd; | 21 int nEnd; |
| 22 » FX_BOOL bSilent; | 22 » bool bSilent; |
| 23 » FX_BOOL bShrinkToFit; | 23 » bool bShrinkToFit; |
| 24 » FX_BOOL bPrintAsImage; | 24 » bool bPrintAsImage; |
| 25 » FX_BOOL bReverse; | 25 » bool bReverse; |
| 26 » FX_BOOL bAnnotations; | 26 » bool bAnnotations; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 class CJS_PrintParamsObj : public CJS_Object | 29 class CJS_PrintParamsObj : public CJS_Object |
| 30 { | 30 { |
| 31 public: | 31 public: |
| 32 CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} | 32 CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} |
| 33 virtual ~CJS_PrintParamsObj(){} | 33 virtual ~CJS_PrintParamsObj(){} |
| 34 | 34 |
| 35 DECLARE_JS_CLASS(CJS_PrintParamsObj); | 35 DECLARE_JS_CLASS(CJS_PrintParamsObj); |
| 36 }; | 36 }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 struct CJS_DelayAnnot; | 78 struct CJS_DelayAnnot; |
| 79 struct CJS_AnnotObj; | 79 struct CJS_AnnotObj; |
| 80 | 80 |
| 81 class Document : public CJS_EmbedObj | 81 class Document : public CJS_EmbedObj |
| 82 { | 82 { |
| 83 public: | 83 public: |
| 84 Document(CJS_Object* pJSObject); | 84 Document(CJS_Object* pJSObject); |
| 85 virtual ~Document(); | 85 virtual ~Document(); |
| 86 | 86 |
| 87 public: | 87 public: |
| 88 » FX_BOOL»ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); | 88 » bool» ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); |
| 89 » FX_BOOL»author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); | 89 » bool» author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); |
| 90 » FX_BOOL»baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); | 90 » bool» baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); |
| 91 » FX_BOOL»bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStrin
g& sError); | 91 » bool» bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStrin
g& sError); |
| 92 » FX_BOOL»calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
sError); | 92 » bool» calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
sError); |
| 93 » FX_BOOL»Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); | 93 » bool» Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); |
| 94 » FX_BOOL»creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStrin
g& sError); | 94 » bool» creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStrin
g& sError); |
| 95 » FX_BOOL»creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); | 95 » bool» creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); |
| 96 » FX_BOOL»delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); | 96 » bool» delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 97 » FX_BOOL»dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); | 97 » bool» dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 98 » FX_BOOL»documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideS
tring& sError); | 98 » bool» documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideS
tring& sError); |
| 99 » FX_BOOL external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 99 » bool external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 100 » FX_BOOL»filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 100 » bool» filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); |
| 101 » FX_BOOL»icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); | 101 » bool» icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 102 » FX_BOOL»info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); | 102 » bool» info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); |
| 103 » FX_BOOL»keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 103 » bool» keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); |
| 104 » FX_BOOL»layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); | 104 » bool» layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); |
| 105 » FX_BOOL»media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); | 105 » bool» media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 106 » FX_BOOL»modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); | 106 » bool» modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); |
| 107 » FX_BOOL»mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); | 107 » bool» mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); |
| 108 » FX_BOOL»mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); | 108 » bool» mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ror); |
| 109 » FX_BOOL»numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
sError); | 109 » bool» numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
sError); |
| 110 » FX_BOOL»numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 110 » bool» numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); |
| 111 » FX_BOOL»pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); | 111 » bool» pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); |
| 112 » FX_BOOL»pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStr
ing& sError); | 112 » bool» pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStr
ing& sError); |
| 113 » FX_BOOL»path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); | 113 » bool» path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); |
| 114 » FX_BOOL»producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 114 » bool» producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); |
| 115 » FX_BOOL»subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); | 115 » bool» subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
rror); |
| 116 » FX_BOOL»title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); | 116 » bool» title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
or); |
| 117 » FX_BOOL»zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); | 117 » bool» zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
r); |
| 118 » FX_BOOL»zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); | 118 » bool» zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
Error); |
| 119 | 119 |
| 120 » FX_BOOL addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 120 » bool addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
& vRet, CFX_WideString& sError); |
| 121 » FX_BOOL»addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 121 » bool» addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 122 » FX_BOOL»addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); | 122 » bool» addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); |
| 123 » FX_BOOL»addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); | 123 » bool» addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); |
| 124 » FX_BOOL»calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 124 » bool» calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); |
| 125 » FX_BOOL»closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 125 » bool» closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 126 » FX_BOOL»createDataObject(IFXJS_Context* cc, const CJS_Parameters& params
, CJS_Value& vRet, CFX_WideString& sError); | 126 » bool» createDataObject(IFXJS_Context* cc, const CJS_Parameters& params
, CJS_Value& vRet, CFX_WideString& sError); |
| 127 » FX_BOOL deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 127 » bool deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 128 » FX_BOOL»exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 128 » bool» exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); |
| 129 » FX_BOOL»exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 129 » bool» exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); |
| 130 » FX_BOOL»exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 130 » bool» exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); |
| 131 » FX_BOOL extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 131 » bool extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); |
| 132 » FX_BOOL»getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 132 » bool» getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 133 » FX_BOOL»getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); | 133 » bool» getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); |
| 134 » FX_BOOL»getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); | 134 » bool» getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); |
| 135 » FX_BOOL»getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 135 » bool» getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); |
| 136 » FX_BOOL»getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 136 » bool» getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 137 » FX_BOOL»getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); | 137 » bool» getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); |
| 138 » FX_BOOL»getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 138 » bool» getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 139 » FX_BOOL»getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); | 139 » bool» getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); |
| 140 » FX_BOOL»getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); | 140 » bool» getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); |
| 141 » FX_BOOL»getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); | 141 » bool» getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); |
| 142 » FX_BOOL»getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); | 142 » bool» getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); |
| 143 » FX_BOOL»getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& par
ams, CJS_Value& vRet, CFX_WideString& sError); | 143 » bool» getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& par
ams, CJS_Value& vRet, CFX_WideString& sError); |
| 144 » FX_BOOL»getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); | 144 » bool» getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); |
| 145 » FX_BOOL getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); | 145 » bool getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); |
| 146 » FX_BOOL getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, CFX_WideString& sError); | 146 » bool getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
vRet, CFX_WideString& sError); |
| 147 » FX_BOOL»importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 147 » bool» importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); |
| 148 » FX_BOOL»importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 148 » bool» importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); |
| 149 » FX_BOOL»importTextData(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); | 149 » bool» importTextData(IFXJS_Context* cc, const CJS_Parameters& params,
CJS_Value& vRet, CFX_WideString& sError); |
| 150 » FX_BOOL insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 150 » bool insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 151 » FX_BOOL»mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); | 151 » bool» mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
lue& vRet, CFX_WideString& sError); |
| 152 » FX_BOOL»print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
& vRet, CFX_WideString& sError); | 152 » bool» print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
& vRet, CFX_WideString& sError); |
| 153 » FX_BOOL»removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); | 153 » bool» removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS
_Value& vRet, CFX_WideString& sError); |
| 154 » FX_BOOL replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJ
S_Value& vRet, CFX_WideString& sError); | 154 » bool replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); |
| 155 » FX_BOOL»resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); | 155 » bool» resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
alue& vRet, CFX_WideString& sError); |
| 156 » FX_BOOL»saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, CFX_WideString& sError); | 156 » bool» saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, CFX_WideString& sError); |
| 157 » FX_BOOL»submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); | 157 » bool» submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); |
| 158 » FX_BOOL»mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); | 158 » bool» mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, CFX_WideString& sError); |
| 159 » FX_BOOL»removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); | 159 » bool» removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, CFX_WideString& sError); |
| 160 | 160 |
| 161 public: | 161 public: |
| 162 void AttachDoc(CPDFSDK_Document* pDoc
); | 162 void AttachDoc(CPDFSDK_Document* pDoc
); |
| 163 CPDFSDK_Document* GetReaderDoc(); | 163 CPDFSDK_Document* GetReaderDoc(); |
| 164 » static FX_BOOL ExtractFileName(CPDFSDK_Document
* pDoc, CFX_ByteString& strFileName); | 164 » static bool ExtractFileName(CPDFSDK_Document* p
Doc, CFX_ByteString& strFileName); |
| 165 » static FX_BOOL ExtractFolderName(CPDFSDK_Docume
nt* pDoc, CFX_ByteString& strFolderName); | 165 » static bool ExtractFolderName(CPDFSDK_Document*
pDoc, CFX_ByteString& strFolderName); |
| 166 void AddDelayData(CJS_DelayData* pDat
a); | 166 void AddDelayData(CJS_DelayData* pDat
a); |
| 167 void DoFieldDelay(const CFX_WideStrin
g& sFieldName, int nControlIndex); | 167 void DoFieldDelay(const CFX_WideStrin
g& sFieldName, int nControlIndex); |
| 168 void AddDelayAnnotData(CJS_AnnotObj *
pData); | 168 void AddDelayAnnotData(CJS_AnnotObj *
pData); |
| 169 void DoAnnotDelay(); | 169 void DoAnnotDelay(); |
| 170 void SetIsolate(v8::Isolate* isolate)
{m_isolate = isolate;} | 170 void SetIsolate(v8::Isolate* isolate)
{m_isolate = isolate;} |
| 171 CJS_Document* GetCJSDoc() const; | 171 CJS_Document* GetCJSDoc() const; |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 CFX_WideString ReversalStr(CFX_WideString cbFro
m); | 174 CFX_WideString ReversalStr(CFX_WideString cbFro
m); |
| 175 CFX_WideString CutString(CFX_WideString cbFrom)
; | 175 CFX_WideString CutString(CFX_WideString cbFrom)
; |
| 176 bool IsEnclosedInRect(CFX_FloatRect r
ect, CFX_FloatRect LinkRect); | 176 bool IsEnclosedInRect(CFX_FloatRect r
ect, CFX_FloatRect LinkRect); |
| 177 int CountWords(CPDF_TextObject* pTex
tObj); | 177 int CountWords(CPDF_TextObject* pTex
tObj); |
| 178 CFX_WideString GetObjWordStr(CPDF_TextObject* p
TextObj, int nWordIndex); | 178 CFX_WideString GetObjWordStr(CPDF_TextObject* p
TextObj, int nWordIndex); |
| 179 » FX_BOOL ParserParams(JSObject *pObj,CJS_
AnnotObj& annotobj); | 179 » bool ParserParams(JSObject *pObj,CJS_Ann
otObj& annotobj); |
| 180 | 180 |
| 181 v8::Isolate* m_isolate; | 181 v8::Isolate* m_isolate; |
| 182 IconTree* m_pIconTree; | 182 IconTree* m_pIconTree; |
| 183 CPDFSDK_Document* m_pDocument; | 183 CPDFSDK_Document* m_pDocument; |
| 184 CFX_WideString m_cwBaseURL; | 184 CFX_WideString m_cwBaseURL; |
| 185 » FX_BOOL m_bDelay; | 185 » bool m_bDelay; |
| 186 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; | 186 CFX_ArrayTemplate<CJS_DelayData*> m_DelayData; |
| 187 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; | 187 CFX_ArrayTemplate<CJS_AnnotObj*> m_DelayAnnotData; |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 class CJS_Document : public CJS_Object | 190 class CJS_Document : public CJS_Object |
| 191 { | 191 { |
| 192 public: | 192 public: |
| 193 CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {}; | 193 CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {}; |
| 194 virtual ~CJS_Document(){}; | 194 virtual ~CJS_Document(){}; |
| 195 | 195 |
| 196 » virtual FX_BOOL»InitInstance(IFXJS_Context* cc); | 196 » virtual bool» InitInstance(IFXJS_Context* cc); |
| 197 | 197 |
| 198 DECLARE_JS_CLASS(CJS_Document); | 198 DECLARE_JS_CLASS(CJS_Document); |
| 199 | 199 |
| 200 JS_STATIC_PROP(ADBE, Document); | 200 JS_STATIC_PROP(ADBE, Document); |
| 201 JS_STATIC_PROP(author, Document); | 201 JS_STATIC_PROP(author, Document); |
| 202 JS_STATIC_PROP(baseURL, Document); | 202 JS_STATIC_PROP(baseURL, Document); |
| 203 JS_STATIC_PROP(bookmarkRoot, Document); | 203 JS_STATIC_PROP(bookmarkRoot, Document); |
| 204 JS_STATIC_PROP(calculate, Document); | 204 JS_STATIC_PROP(calculate, Document); |
| 205 JS_STATIC_PROP(Collab, Document); | 205 JS_STATIC_PROP(Collab, Document); |
| 206 JS_STATIC_PROP(creationDate, Document); | 206 JS_STATIC_PROP(creationDate, Document); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 JS_STATIC_METHOD(removeField, Document); | 265 JS_STATIC_METHOD(removeField, Document); |
| 266 JS_STATIC_METHOD(replacePages, Document); | 266 JS_STATIC_METHOD(replacePages, Document); |
| 267 JS_STATIC_METHOD(removeIcon, Document); | 267 JS_STATIC_METHOD(removeIcon, Document); |
| 268 JS_STATIC_METHOD(resetForm, Document); | 268 JS_STATIC_METHOD(resetForm, Document); |
| 269 JS_STATIC_METHOD(saveAs, Document); | 269 JS_STATIC_METHOD(saveAs, Document); |
| 270 JS_STATIC_METHOD(submitForm, Document); | 270 JS_STATIC_METHOD(submitForm, Document); |
| 271 JS_STATIC_METHOD(mailDoc, Document); | 271 JS_STATIC_METHOD(mailDoc, Document); |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ | 274 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ |
| OLD | NEW |