summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 14:37:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:37:55 -0700
commit4cf551577856f89103e162edc761def44ffb96fc (patch)
tree452684db6c2dd2b9aa697415ff4b752e59123b77 /fpdfsdk/javascript/Document.h
parent66bd67023f747c489d7144aaf4ca6222c686cd26 (diff)
downloadpdfium-4cf551577856f89103e162edc761def44ffb96fc.tar.xz
Remove FX_BOOL from fpdfsdk.
Review-Url: https://codereview.chromium.org/2453683011
Diffstat (limited to 'fpdfsdk/javascript/Document.h')
-rw-r--r--fpdfsdk/javascript/Document.h336
1 files changed, 166 insertions, 170 deletions
diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h
index 129411a431..227c4284bb 100644
--- a/fpdfsdk/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -22,14 +22,14 @@ class PrintParamsObj : public CJS_EmbedObj {
~PrintParamsObj() override {}
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 {
@@ -61,215 +61,211 @@ class Document : public CJS_EmbedObj {
explicit Document(CJS_Object* pJSObject);
~Document() override;
- FX_BOOL ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL author(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL baseURL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL bookmarkRoot(IJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError);
- FX_BOOL calculate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL Collab(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL creationDate(IJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError);
- FX_BOOL creator(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL dirty(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL documentFileName(IJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError);
- FX_BOOL external(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL filesize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL icons(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL info(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL keywords(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL layout(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL modDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL mouseX(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL mouseY(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL numFields(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL numPages(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL pageNum(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL pageWindowRect(IJS_Context* cc,
- CJS_PropValue& vp,
- CFX_WideString& sError);
- FX_BOOL path(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL producer(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL subject(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL title(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL zoom(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL zoomType(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool author(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool baseURL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool bookmarkRoot(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool calculate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool Collab(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool creationDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool creator(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool dirty(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool documentFileName(IJS_Context* cc,
+ CJS_PropValue& vp,
+ CFX_WideString& sError);
+ bool external(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool filesize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool icons(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool info(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool keywords(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool layout(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool modDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool mouseX(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool mouseY(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool numFields(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool numPages(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool pageNum(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool pageWindowRect(IJS_Context* cc,
+ CJS_PropValue& vp,
+ CFX_WideString& sError);
+ bool path(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool producer(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool subject(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool title(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool zoom(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool zoomType(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL addAnnot(IJS_Context* cc,
+ bool addAnnot(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool addField(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool addLink(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool addIcon(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool calculateNow(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool closeDoc(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool createDataObject(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool deletePages(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL addField(IJS_Context* cc,
+ bool exportAsText(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool exportAsFDF(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL addLink(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL addIcon(IJS_Context* cc,
+ bool exportAsXFDF(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool extractPages(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getAnnot(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getAnnots(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getAnnot3D(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL calculateNow(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL closeDoc(IJS_Context* cc,
+ bool getAnnots3D(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL createDataObject(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL deletePages(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL exportAsText(IJS_Context* cc,
+ bool getField(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getIcon(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getLinks(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getNthFieldName(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL exportAsFDF(IJS_Context* cc,
+ bool getOCGs(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getPageBox(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getPageNthWord(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL exportAsXFDF(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL extractPages(IJS_Context* cc,
+ bool getPageNthWordQuads(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool getPageNumWords(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL getAnnot(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getAnnots(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getAnnot3D(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getAnnots3D(IJS_Context* cc,
+ bool getPrintParams(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL getField(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getIcon(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getLinks(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getNthFieldName(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getOCGs(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getPageBox(IJS_Context* cc,
+ bool getURL(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool gotoNamedDest(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL getPageNthWord(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getPageNthWordQuads(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getPageNumWords(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getPrintParams(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL getURL(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL gotoNamedDest(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL importAnFDF(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL importAnXFDF(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL importTextData(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL insertPages(IJS_Context* cc,
+ bool importAnFDF(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool importAnXFDF(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool importTextData(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL mailForm(IJS_Context* cc,
+ bool insertPages(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL print(IJS_Context* cc,
+ bool mailForm(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL removeField(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL replacePages(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL resetForm(IJS_Context* cc,
+ bool print(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool removeField(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool replacePages(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL saveAs(IJS_Context* cc,
+ bool resetForm(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL submitForm(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL syncAnnotScan(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError);
- FX_BOOL mailDoc(IJS_Context* cc,
+ bool saveAs(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool submitForm(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL removeIcon(IJS_Context* cc,
+ bool syncAnnotScan(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
- FX_BOOL URL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool mailDoc(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool removeIcon(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ bool URL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv);
CPDFSDK_FormFillEnvironment* GetFormFillEnv() const {
@@ -284,10 +280,10 @@ class Document : public CJS_EmbedObj {
int CountWords(CPDF_TextObject* pTextObj);
CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
- FX_BOOL getPropertyInternal(IJS_Context* cc,
- CJS_PropValue& vp,
- const CFX_ByteString& propName,
- CFX_WideString& sError);
+ bool getPropertyInternal(IJS_Context* cc,
+ CJS_PropValue& vp,
+ const CFX_ByteString& propName,
+ CFX_WideString& sError);
CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv;
CFX_WideString m_cwBaseURL;