diff options
Diffstat (limited to 'fpdfsdk/src/javascript/Document.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/Document.cpp | 474 |
1 files changed, 237 insertions, 237 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 668032dcba..59816f091f 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -45,14 +45,14 @@ IMPLEMENT_JS_CLASS(CJS_PrintParamsObj, PrintParamsObj) PrintParamsObj::PrintParamsObj(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) { - bUI = true; + bUI = TRUE; nStart = 0; nEnd = 0; - bSilent = false; - bShrinkToFit = false; - bPrintAsImage = false; - bReverse = false; - bAnnotations = true; + bSilent = FALSE; + bShrinkToFit = FALSE; + bPrintAsImage = FALSE; + bReverse = FALSE; + bAnnotations = TRUE; } /* ---------------------- Document ---------------------- */ @@ -142,7 +142,7 @@ END_JS_STATIC_METHOD() IMPLEMENT_JS_CLASS(CJS_Document, Document) -bool CJS_Document::InitInstance(IFXJS_Context* cc) +FX_BOOL CJS_Document::InitInstance(IFXJS_Context* cc) { CJS_Context* pContext = (CJS_Context*)cc; ASSERT(pContext != NULL); @@ -152,7 +152,7 @@ bool CJS_Document::InitInstance(IFXJS_Context* cc) pDoc->AttachDoc(pContext->GetReaderDocument()); pDoc->SetIsolate(pContext->GetJSRuntime()->GetIsolate()); - return true; + return TRUE; }; /* --------------------------------- Document --------------------------------- */ @@ -162,7 +162,7 @@ Document::Document(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject), m_pIconTree(NULL), m_pDocument(NULL), m_cwBaseURL(L""), - m_bDelay(false) + m_bDelay(FALSE) { } @@ -190,20 +190,20 @@ Document::~Document() } //the total number of fileds in document. -bool Document::numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } CPDFSDK_InterForm *pInterForm = m_pDocument->GetInterForm(); CPDF_InterForm *pPDFForm = pInterForm->GetInterForm(); vp << (int)pPDFForm->CountFields(); - return true; + return TRUE; } -bool Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); @@ -226,10 +226,10 @@ bool Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro m_pDocument->ClearChangeMark(); } - return true; + return TRUE; } -bool Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); @@ -241,10 +241,10 @@ bool Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError { } - return true; + return TRUE; } -bool Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); @@ -276,55 +276,55 @@ bool Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr } } - return true; + return TRUE; } -bool Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj) +FX_BOOL Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj) { // Not supported. - return true; + return TRUE; } -bool Document::addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Not supported. - return true; + return TRUE; } -bool Document::addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Not supported. - return true; + return TRUE; } -bool Document::exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } //Maps a field object in PDF document to a JavaScript variable //comment: //note: the paremter cName, this is clue how to treat if the cName is not a valiable filed name in this document -bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context*)cc; if (params.size() < 1) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } CFX_WideString wideName = params[0].ToCFXWideString(); @@ -334,7 +334,7 @@ bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val if (pPDFForm->CountFields(wideName) <= 0) { vRet.SetNull(); - return true; + return TRUE; } CJS_Runtime* pRuntime = pContext->GetJSRuntime(); @@ -346,66 +346,66 @@ bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val pField->AttachField(this, wideName); vRet = pJSField; - return true; + return TRUE; } //Gets the name of the nth field in the document -bool Document::getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context*)cc; if (params.size() != 1) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } int nIndex = params[0].ToInt(); if (nIndex < 0) { sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR); - return false; + return FALSE; } CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); CPDF_InterForm* pPDFForm = pInterForm->GetInterForm(); CPDF_FormField* pField = pPDFForm->GetField(nIndex); if (!pField) - return false; + return FALSE; vRet = pField->GetFullName().c_str(); - return true; + return TRUE; } -bool Document::importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } //exports the form data and mails the resulting fdf file as an attachment to all recipients. //comment: need reader supports //note: -//int CPDFSDK_Document::mailForm(bool bUI,String cto,string ccc,string cbcc,string cSubject,string cms); +//int CPDFSDK_Document::mailForm(FX_BOOL bUI,String cto,string ccc,string cbcc,string cSubject,string cms); -bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false; + if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE; int iLength = params.size(); - bool bUI = iLength > 0 ? params[0].ToBool() : true; + FX_BOOL bUI = iLength > 0 ? params[0].ToBool() : TRUE; CFX_WideString cTo = iLength > 1 ? params[1].ToCFXWideString() : L""; CFX_WideString cCc = iLength > 2 ? params[2].ToCFXWideString() : L""; CFX_WideString cBcc = iLength > 3 ? params[3].ToCFXWideString() : L""; @@ -417,7 +417,7 @@ bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val CFX_ByteTextBuf textBuf; if (!pInterForm->ExportFormToFDFTextBuf(textBuf)) - return false; + return FALSE; CJS_Context* pContext = (CJS_Context*)cc; ASSERT(pContext != NULL); @@ -429,24 +429,24 @@ bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val pRuntime->BeginBlock(); pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI, cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str()); pRuntime->EndBlock(); - return true; + return TRUE; } -bool Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context*)cc; ASSERT(pContext != NULL); CJS_Runtime* pRuntime = pContext->GetJSRuntime(); ASSERT(pRuntime != NULL); - bool bUI = true; + FX_BOOL bUI = TRUE; int nStart = 0; int nEnd = 0; - bool bSilent = false; - bool bShrinkToFit = false; - bool bPrintAsImage = false; - bool bReverse = false; - bool bAnnotations = false; + FX_BOOL bSilent = FALSE; + FX_BOOL bShrinkToFit = FALSE; + FX_BOOL bPrintAsImage = FALSE; + FX_BOOL bReverse = FALSE; + FX_BOOL bAnnotations = FALSE; int nlength = params.size(); if(nlength ==9) @@ -500,26 +500,26 @@ bool Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& if (CPDFDoc_Environment* pEnv = m_pDocument->GetEnv()) { pEnv->JS_docprint(bUI, nStart, nEnd, bSilent, bShrinkToFit, bPrintAsImage, bReverse, bAnnotations); - return true; + return TRUE; } - return false; + return FALSE; } //removes the specified field from the document. //comment: //note: if the filed name is not retional, adobe is dumb for it. -bool Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) || - m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM))) return false; + m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM))) return FALSE; CJS_Context* pContext = (CJS_Context*)cc; if (params.size() != 1) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } CFX_WideString sFieldName = params[0].ToCFXWideString(); @@ -558,20 +558,20 @@ bool Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_ m_pDocument->SetChangeMark(); } - return true; + return TRUE; } //reset filed values within a document. //comment: //note: if the fields names r not rational, aodbe is dumb for it. -bool Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) || m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) || - m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return false; + m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE; CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); ASSERT(pInterForm != NULL); @@ -610,42 +610,42 @@ bool Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va if (aFields.GetSize() > 0) { - pPDFForm->ResetForm(aFields, true, true); + pPDFForm->ResetForm(aFields, TRUE, TRUE); m_pDocument->SetChangeMark(); } } else { - pPDFForm->ResetForm(true); + pPDFForm->ResetForm(TRUE); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); CJS_Context* pContext = (CJS_Context*)cc; int nSize = params.size(); if (nSize < 1) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } CFX_WideString strURL; - bool bFDF = true; - bool bEmpty = false; + FX_BOOL bFDF = TRUE; + FX_BOOL bEmpty = FALSE; v8::Isolate* isolate = GetIsolate(cc); CJS_Array aFields(isolate); @@ -677,16 +677,16 @@ bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V CJS_Runtime* pRuntime = pContext->GetJSRuntime(); CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); - bool bAll = (aFields.GetLength() == 0); + FX_BOOL bAll = (aFields.GetLength() == 0); if (bAll && bEmpty) { if (pPDFInterForm->CheckRequiredFields()) { pRuntime->BeginBlock(); - pInterForm->SubmitForm(strURL, false); + pInterForm->SubmitForm(strURL, FALSE); pRuntime->EndBlock(); } - return true; + return TRUE; } CFX_PtrArray fieldObjects; @@ -707,13 +707,13 @@ bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V } } - if (pPDFInterForm->CheckRequiredFields(&fieldObjects, true)) + if (pPDFInterForm->CheckRequiredFields(&fieldObjects, TRUE)) { pRuntime->BeginBlock(); - pInterForm->SubmitFields(strURL, fieldObjects, true, !bFDF); + pInterForm->SubmitFields(strURL, fieldObjects, TRUE, !bFDF); pRuntime->EndBlock(); } - return true; + return TRUE; } ////////////////////////////////////////////////////////////////////////////////////////////// @@ -728,26 +728,26 @@ CPDFSDK_Document * Document::GetReaderDoc() return m_pDocument; } -bool Document::ExtractFileName(CPDFSDK_Document *pDoc,CFX_ByteString &strFileName) +FX_BOOL Document::ExtractFileName(CPDFSDK_Document *pDoc,CFX_ByteString &strFileName) { - return false; + return FALSE; } -bool Document::ExtractFolderName(CPDFSDK_Document *pDoc,CFX_ByteString &strFolderName) +FX_BOOL Document::ExtractFolderName(CPDFSDK_Document *pDoc,CFX_ByteString &strFolderName) { - return false; + return FALSE; } -bool Document::bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - bool bUI = true; + FX_BOOL bUI = TRUE; CFX_WideString cTo = L""; CFX_WideString cCc = L""; CFX_WideString cBcc = L""; @@ -803,40 +803,40 @@ bool Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu pEnv->JS_docmailForm(NULL, 0, bUI, cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str()); pRuntime->EndBlock(); - return true; + return TRUE; } -bool Document::author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); - if (!pDictionary)return false; + if (!pDictionary)return FALSE; if (vp.IsGetting()) { vp << pDictionary->GetUnicodeText("Author"); - return true; + return TRUE; } else { - if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) return false; + if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) return FALSE; CFX_WideString csAuthor; vp >> csAuthor; pDictionary->SetAtString("Author", PDF_EncodeText(csAuthor)); m_pDocument->SetChangeMark(); - return true; + return TRUE; } } -bool Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; CFX_WideString cwAuthor = pDictionary->GetUnicodeText("Author"); CFX_WideString cwTitle = pDictionary->GetUnicodeText("Title"); @@ -880,14 +880,14 @@ bool Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError } vp << pObj; } - return true; + return TRUE; } -bool Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -896,21 +896,21 @@ bool Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString csCreationDate; vp >> csCreationDate; pDictionary->SetAtString("CreationDate", PDF_EncodeText(csCreationDate)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -919,17 +919,17 @@ bool Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString csCreator; vp >> csCreator; pDictionary->SetAtString("Creator", PDF_EncodeText(csCreator)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsGetting()) { @@ -938,7 +938,7 @@ bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; vp >> m_bDelay; if (m_bDelay) @@ -969,14 +969,14 @@ bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro } } } - return true; + return TRUE; } -bool Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -985,21 +985,21 @@ bool Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString csKeywords; vp >> csKeywords; pDictionary->SetAtString("Keywords", PDF_EncodeText(csKeywords)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -1008,21 +1008,21 @@ bool Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString csmodDate; vp >> csmodDate; pDictionary->SetAtString("ModDate", PDF_EncodeText(csmodDate)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -1031,21 +1031,21 @@ bool Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString csproducer; vp >> csproducer; pDictionary->SetAtString("Producer", PDF_EncodeText(csproducer)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -1054,24 +1054,24 @@ bool Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString cssubject; vp >> cssubject; pDictionary->SetAtString("Subject", PDF_EncodeText(cssubject)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (m_pDocument == NULL || m_pDocument->GetDocument() == NULL) - return false; + return FALSE; CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo(); if (!pDictionary) - return false; + return FALSE; if (vp.IsGetting()) { @@ -1080,58 +1080,58 @@ bool Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro else { if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) - return false; + return FALSE; CFX_WideString cstitle; vp >> cstitle; pDictionary->SetAtString("Title", PDF_EncodeText(cstitle)); m_pDocument->SetChangeMark(); } - return true; + return TRUE; } -bool Document::numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } vp << m_pDocument->GetPageCount(); - return true; + return TRUE; } -bool Document::external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { //In Chrome case,should always return true. if (vp.IsGetting()) { vp << true; } - return true; + return TRUE; } -bool Document::filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } vp << 0; - return true; + return TRUE; } -bool Document::mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsGetting()) { @@ -1141,10 +1141,10 @@ bool Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr { vp >> m_cwBaseURL; } - return true; + return TRUE; } -bool Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); @@ -1166,15 +1166,15 @@ bool Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s pInterForm->EnableCalculate(bCalculate); } - return true; + return TRUE; } -bool Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } CFX_WideString wsFilePath = m_pDocument->GetPath(); int32_t i = wsFilePath.GetLength() - 1; @@ -1189,7 +1189,7 @@ bool Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideSt }else{ vp << L""; } - return true; + return TRUE; } CFX_WideString Document::ReversalStr(CFX_WideString cbFrom) @@ -1239,74 +1239,74 @@ CFX_WideString Document::CutString(CFX_WideString cbFrom) return cbRet; } -bool Document::path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } vp << app::SysPathToPDFPath(m_pDocument->GetPath()); - return true; + return TRUE; } -bool Document::pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - return true; + return TRUE; } -bool Document::getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { vRet.SetNull(); - return true; + return TRUE; } -bool Document::getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { vRet.SetNull(); - return true; + return TRUE; } -bool Document::getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { vRet = VT_undefined; - return true; + return TRUE; } -bool Document::getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { - return true; + return TRUE; } bool Document::IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect) @@ -1370,12 +1370,12 @@ IconElement* IconTree::operator [](int iIndex) return NULL; } -bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context*)cc; if (params.size() != 2) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } CFX_WideString swIconName = params[0].ToCFXWideString(); @@ -1384,13 +1384,13 @@ bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu CJS_Runtime* pRuntime = pContext->GetJSRuntime(); if (JS_GetObjDefnID(pJSIcon) != JS_GetObjDefnID(*pRuntime, L"Icon")) { sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR); - return false; + return FALSE; } CJS_EmbedObj* pEmbedObj = params[1].ToCJSObject()->GetEmbedObject(); if (!pEmbedObj) { sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR); - return false; + return FALSE; } Icon* pIcon = (Icon*)pEmbedObj; @@ -1402,21 +1402,21 @@ bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu pNewIcon->NextIcon = NULL; pNewIcon->IconStream = pIcon; m_pIconTree->InsertIconElement(pNewIcon); - return true; + return TRUE; } -bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { CJS_Context* pContext = static_cast<CJS_Context*>(cc); sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY); - return false; + return FALSE; } if (!m_pIconTree) { vp.SetNull(); - return true; + return TRUE; } CJS_Array Icons(m_isolate); @@ -1431,13 +1431,13 @@ bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro pIconElement = (*m_pIconTree)[i]; JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon")); - if (pObj.IsEmpty()) return false; + if (pObj.IsEmpty()) return FALSE; CJS_Icon * pJS_Icon = (CJS_Icon *)JS_GetPrivate(pObj); - if (!pJS_Icon) return false; + if (!pJS_Icon) return FALSE; Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject(); - if (!pIcon)return false; + if (!pIcon)return FALSE; pIcon->SetStream(pIconElement->IconStream->GetStream()); pIcon->SetIconName(pIconElement->IconName); @@ -1445,19 +1445,19 @@ bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro } vp << Icons; - return true; + return TRUE; } -bool Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context *)cc; if (params.size() != 1) { sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); - return false; + return FALSE; } if(!m_pIconTree) - return false; + return FALSE; CFX_WideString swIconName = params[0].ToCFXWideString(); int iIconCounts = m_pIconTree->GetLength(); @@ -1470,82 +1470,82 @@ bool Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu Icon* pRetIcon = (*m_pIconTree)[i]->IconStream; JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon")); - if (pObj.IsEmpty()) return false; + if (pObj.IsEmpty()) return FALSE; CJS_Icon * pJS_Icon = (CJS_Icon *)JS_GetPrivate(pObj); - if (!pJS_Icon) return false; + if (!pJS_Icon) return FALSE; Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject(); - if (!pIcon)return false; + if (!pIcon)return FALSE; pIcon->SetIconName(swIconName); pIcon->SetStream(pRetIcon->GetStream()); vRet = pJS_Icon; - return true; + return TRUE; } } - return false; + return FALSE; } -bool Document::removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, no supported. - return true; + return TRUE; } -bool Document::createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not implemented. - return true; + return TRUE; } -bool Document::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) || m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) || - m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return false; + m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE; CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); ASSERT(pInterForm != NULL); pInterForm->OnCalculate(); - return true; + return TRUE; } -bool Document::Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false; + if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE; int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0; int nWordNo = params.GetSize() > 1 ? params[1].ToInt() : 0; bool bStrip = params.GetSize() > 2 ? params[2].ToBool() : true; CPDF_Document* pDocument = m_pDocument->GetDocument(); - if (!pDocument) return false; + if (!pDocument) return FALSE; CJS_Context* pContext = static_cast<CJS_Context*>(cc); if (nPageNo < 0 || nPageNo >= pDocument->GetPageCount()) { sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR); - return false; + return FALSE; } CPDF_Dictionary* pPageDict = pDocument->GetPage(nPageNo); - if (!pPageDict) return false; + if (!pPageDict) return FALSE; CPDF_Page page; page.Load(pDocument, pPageDict); @@ -1584,23 +1584,23 @@ bool Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, C } vRet = swRet.c_str(); - return true; + return TRUE; } -bool Document::getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false; + if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE; - return false; + return FALSE; } -bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { ASSERT(m_pDocument != NULL); - if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false; + if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE; int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0; @@ -1611,11 +1611,11 @@ bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, if (nPageNo < 0 || nPageNo >= pDocument->GetPageCount()) { sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR); - return false; + return FALSE; } CPDF_Dictionary* pPageDict = pDocument->GetPage(nPageNo); - if (!pPageDict) return false; + if (!pPageDict) return FALSE; CPDF_Page page; page.Load(pDocument, pPageDict); @@ -1640,10 +1640,10 @@ bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, vRet = nWords; - return true; + return TRUE; } -bool Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { CJS_Context* pContext = (CJS_Context*)cc; CJS_Runtime* pRuntime = pContext->GetJSRuntime(); @@ -1652,7 +1652,7 @@ bool Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, C // Not implemented yet. vRet = pRetObj; - return true; + return TRUE; } #define ISLATINWORD(u) (u != 0x20 && u <= 0x28FF) @@ -1666,7 +1666,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) CPDF_Font* pFont = pTextObj->GetFont(); if (!pFont) return 0; - bool bIsLatin = false; + FX_BOOL bIsLatin = FALSE; for (int i=0, sz=pTextObj->CountChars(); i<sz; i++) { @@ -1701,7 +1701,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex if (!pFont) return L""; int nWords = 0; - bool bIsLatin = false; + FX_BOOL bIsLatin = FALSE; for (int i=0, sz=pTextObj->CountChars(); i<sz; i++) { @@ -1732,10 +1732,10 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex return swRet; } -bool Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } /** @@ -1748,39 +1748,39 @@ bool Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError (refW, ReflowWidth) */ -bool Document::zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL Document::zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { - return true; + return TRUE; } -bool Document::deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, no supported. - return true; + return TRUE; } -bool Document::extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } -bool Document::getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) +FX_BOOL Document::getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError) { // Unsafe, not supported. - return true; + return TRUE; } void Document::AddDelayData(CJS_DelayData* pData) |