diff options
Diffstat (limited to 'fpdfsdk/fpdf_ext.cpp')
-rw-r--r-- | fpdfsdk/fpdf_ext.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index d03b4383ca..46bc7e57a4 100644 --- a/fpdfsdk/fpdf_ext.cpp +++ b/fpdfsdk/fpdf_ext.cpp @@ -46,33 +46,31 @@ FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info) { } void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { - CFX_ByteString cbSubType = pPDFAnnot->GetSubtype(); - if (cbSubType.Compare("3D") == 0) { + CPDF_Annot::Subtype nAnnotSubtype = pPDFAnnot->GetSubtype(); + if (nAnnotSubtype == CPDF_Annot::Subtype::THREED) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); - } else if (cbSubType.Compare("Screen") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::SCREEN) { const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); CFX_ByteString cbString; if (pAnnotDict->KeyExist("IT")) cbString = pAnnotDict->GetStringBy("IT"); if (cbString.Compare("Img") != 0) FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); - } else if (cbSubType.Compare("Movie") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::MOVIE) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); - } else if (cbSubType.Compare("Sound") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::SOUND) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); - } else if (cbSubType.Compare("RichMedia") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::RICHMEDIA) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); - } else if (cbSubType.Compare("FileAttachment") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::FILEATTACHMENT) { FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); - } else if (cbSubType.Compare("Widget") == 0) { + } else if (nAnnotSubtype == CPDF_Annot::Subtype::WIDGET) { const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); CFX_ByteString cbString; - if (pAnnotDict->KeyExist("FT")) { + if (pAnnotDict->KeyExist("FT")) cbString = pAnnotDict->GetStringBy("FT"); - } - if (cbString.Compare("Sig") == 0) { + if (cbString.Compare("Sig") == 0) FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); - } } } |