diff options
Diffstat (limited to 'fxjs/cjs_annot.cpp')
-rw-r--r-- | fxjs/cjs_annot.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fxjs/cjs_annot.cpp b/fxjs/cjs_annot.cpp index 4e93dc2516..dda52f629c 100644 --- a/fxjs/cjs_annot.cpp +++ b/fxjs/cjs_annot.cpp @@ -37,23 +37,23 @@ CJS_Annot::CJS_Annot(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime) CJS_Annot::~CJS_Annot() = default; -CJS_Return CJS_Annot::get_hidden(CJS_Runtime* pRuntime) { +CJS_Result CJS_Annot::get_hidden(CJS_Runtime* pRuntime) { if (!m_pAnnot) - return CJS_Return::Failure(JSMessage::kBadObjectError); + return CJS_Result::Failure(JSMessage::kBadObjectError); CPDF_Annot* pPDFAnnot = m_pAnnot->AsBAAnnot()->GetPDFAnnot(); - return CJS_Return::Success(pRuntime->NewBoolean( + return CJS_Result::Success(pRuntime->NewBoolean( CPDF_Annot::IsAnnotationHidden(pPDFAnnot->GetAnnotDict()))); } -CJS_Return CJS_Annot::set_hidden(CJS_Runtime* pRuntime, +CJS_Result CJS_Annot::set_hidden(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { // May invalidate m_pAnnot. bool bHidden = pRuntime->ToBoolean(vp); CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get()); if (!pBAAnnot) - return CJS_Return::Failure(JSMessage::kBadObjectError); + return CJS_Result::Failure(JSMessage::kBadObjectError); uint32_t flags = pBAAnnot->GetFlags(); if (bHidden) { @@ -68,42 +68,42 @@ CJS_Return CJS_Annot::set_hidden(CJS_Runtime* pRuntime, flags |= ANNOTFLAG_PRINT; } pBAAnnot->SetFlags(flags); - return CJS_Return::Success(); + return CJS_Result::Success(); } -CJS_Return CJS_Annot::get_name(CJS_Runtime* pRuntime) { +CJS_Result CJS_Annot::get_name(CJS_Runtime* pRuntime) { CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get()); if (!pBAAnnot) - return CJS_Return::Failure(JSMessage::kBadObjectError); + return CJS_Result::Failure(JSMessage::kBadObjectError); - return CJS_Return::Success( + return CJS_Result::Success( pRuntime->NewString(pBAAnnot->GetAnnotName().AsStringView())); } -CJS_Return CJS_Annot::set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { +CJS_Result CJS_Annot::set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { // May invalidate m_pAnnot. WideString annotName = pRuntime->ToWideString(vp); CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get()); if (!pBAAnnot) - return CJS_Return::Failure(JSMessage::kBadObjectError); + return CJS_Result::Failure(JSMessage::kBadObjectError); pBAAnnot->SetAnnotName(annotName); - return CJS_Return::Success(); + return CJS_Result::Success(); } -CJS_Return CJS_Annot::get_type(CJS_Runtime* pRuntime) { +CJS_Result CJS_Annot::get_type(CJS_Runtime* pRuntime) { CPDFSDK_BAAnnot* pBAAnnot = ToBAAnnot(m_pAnnot.Get()); if (!pBAAnnot) - return CJS_Return::Failure(JSMessage::kBadObjectError); + return CJS_Result::Failure(JSMessage::kBadObjectError); - return CJS_Return::Success(pRuntime->NewString( + return CJS_Result::Success(pRuntime->NewString( WideString::FromLocal( CPDF_Annot::AnnotSubtypeToString(pBAAnnot->GetAnnotSubtype()) .AsStringView()) .AsStringView())); } -CJS_Return CJS_Annot::set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { - return CJS_Return::Failure(JSMessage::kReadOnlyError); +CJS_Result CJS_Annot::set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { + return CJS_Result::Failure(JSMessage::kReadOnlyError); } |