Index: fpdfsdk/fpdf_ext.cpp |
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp |
index d03b4383ca3655daf66d26c784a441448fbd5e72..46bc7e57a48108c6e2636afb5b38dbbf7a083dee 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); |
- } |
} |
} |