diff options
Diffstat (limited to 'fpdfsdk/include/javascript/Document.h')
-rw-r--r-- | fpdfsdk/include/javascript/Document.h | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/fpdfsdk/include/javascript/Document.h b/fpdfsdk/include/javascript/Document.h index b6447fda2a..eae3e0730d 100644 --- a/fpdfsdk/include/javascript/Document.h +++ b/fpdfsdk/include/javascript/Document.h @@ -16,14 +16,14 @@ public: virtual ~PrintParamsObj(){} public: - FX_BOOL bUI; + bool bUI; int nStart; int nEnd; - FX_BOOL bSilent; - FX_BOOL bShrinkToFit; - FX_BOOL bPrintAsImage; - FX_BOOL bReverse; - FX_BOOL bAnnotations; + bool bSilent; + bool bShrinkToFit; + bool bPrintAsImage; + bool bReverse; + bool bAnnotations; }; class CJS_PrintParamsObj : public CJS_Object @@ -85,84 +85,84 @@ public: virtual ~Document(); public: - FX_BOOL ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - FX_BOOL removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + bool removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); public: void AttachDoc(CPDFSDK_Document* pDoc); CPDFSDK_Document* GetReaderDoc(); - static FX_BOOL ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName); - static FX_BOOL ExtractFolderName(CPDFSDK_Document* pDoc, CFX_ByteString& strFolderName); + static bool ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName); + static bool ExtractFolderName(CPDFSDK_Document* pDoc, CFX_ByteString& strFolderName); void AddDelayData(CJS_DelayData* pData); void DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex); void AddDelayAnnotData(CJS_AnnotObj *pData); @@ -176,7 +176,7 @@ private: bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect); int CountWords(CPDF_TextObject* pTextObj); CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex); - FX_BOOL ParserParams(JSObject *pObj,CJS_AnnotObj& annotobj); + bool ParserParams(JSObject *pObj,CJS_AnnotObj& annotobj); v8::Isolate* m_isolate; IconTree* m_pIconTree; @@ -193,7 +193,7 @@ public: CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {}; virtual ~CJS_Document(){}; - virtual FX_BOOL InitInstance(IFXJS_Context* cc); + virtual bool InitInstance(IFXJS_Context* cc); DECLARE_JS_CLASS(CJS_Document); |