| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "../../core/include/fxcrt/fx_xml.h" | 7 #include "../../core/include/fxcrt/fx_xml.h" |
| 8 #include "../../public/fpdf_ext.h" | 8 #include "../../public/fpdf_ext.h" |
| 9 #include "../include/fsdk_define.h" | 9 #include "../include/fsdk_define.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return FALSE; | 51 return FALSE; |
| 52 CFSDK_UnsupportInfo_Adapter* pAdapter = | 52 CFSDK_UnsupportInfo_Adapter* pAdapter = |
| 53 new CFSDK_UnsupportInfo_Adapter(unsp_info); | 53 new CFSDK_UnsupportInfo_Adapter(unsp_info); |
| 54 | 54 |
| 55 CPDF_ModuleMgr::Get()->SetPrivateData((void*)FPDFSDK_UNSUPPORT_CALL, pAdapter, | 55 CPDF_ModuleMgr::Get()->SetPrivateData((void*)FPDFSDK_UNSUPPORT_CALL, pAdapter, |
| 56 &FreeUnsupportInfo); | 56 &FreeUnsupportInfo); |
| 57 | 57 |
| 58 return TRUE; | 58 return TRUE; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot) { | 61 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { |
| 62 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); | 62 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); |
| 63 if (cbSubType.Compare("3D") == 0) { | 63 if (cbSubType.Compare("3D") == 0) { |
| 64 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); | 64 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); |
| 65 } else if (cbSubType.Compare("Screen") == 0) { | 65 } else if (cbSubType.Compare("Screen") == 0) { |
| 66 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 66 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
| 67 CFX_ByteString cbString; | 67 CFX_ByteString cbString; |
| 68 if (pAnnotDict->KeyExist("IT")) | 68 if (pAnnotDict->KeyExist("IT")) |
| 69 cbString = pAnnotDict->GetString("IT"); | 69 cbString = pAnnotDict->GetString("IT"); |
| 70 if (cbString.Compare("Img") != 0) | 70 if (cbString.Compare("Img") != 0) |
| 71 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); | 71 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); |
| 72 } else if (cbSubType.Compare("Movie") == 0) { | 72 } else if (cbSubType.Compare("Movie") == 0) { |
| 73 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); | 73 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); |
| 74 } else if (cbSubType.Compare("Sound") == 0) { | 74 } else if (cbSubType.Compare("Sound") == 0) { |
| 75 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); | 75 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); |
| 76 } else if (cbSubType.Compare("RichMedia") == 0) { | 76 } else if (cbSubType.Compare("RichMedia") == 0) { |
| 77 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); | 77 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); |
| 78 } else if (cbSubType.Compare("FileAttachment") == 0) { | 78 } else if (cbSubType.Compare("FileAttachment") == 0) { |
| 79 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); | 79 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); |
| 80 } else if (cbSubType.Compare("Widget") == 0) { | 80 } else if (cbSubType.Compare("Widget") == 0) { |
| 81 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 81 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
| 82 CFX_ByteString cbString; | 82 CFX_ByteString cbString; |
| 83 if (pAnnotDict->KeyExist("FT")) { | 83 if (pAnnotDict->KeyExist("FT")) { |
| 84 cbString = pAnnotDict->GetString("FT"); | 84 cbString = pAnnotDict->GetString("FT"); |
| 85 } | 85 } |
| 86 if (cbString.Compare("Sig") == 0) { | 86 if (cbString.Compare("Sig") == 0) { |
| 87 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); | 87 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 return PAGEMODE_USETHUMBS; | 198 return PAGEMODE_USETHUMBS; |
| 199 if (strPageMode.EqualNoCase("FullScreen")) | 199 if (strPageMode.EqualNoCase("FullScreen")) |
| 200 return PAGEMODE_FULLSCREEN; | 200 return PAGEMODE_FULLSCREEN; |
| 201 if (strPageMode.EqualNoCase("UseOC")) | 201 if (strPageMode.EqualNoCase("UseOC")) |
| 202 return PAGEMODE_USEOC; | 202 return PAGEMODE_USEOC; |
| 203 if (strPageMode.EqualNoCase("UseAttachments")) | 203 if (strPageMode.EqualNoCase("UseAttachments")) |
| 204 return PAGEMODE_USEATTACHMENTS; | 204 return PAGEMODE_USEATTACHMENTS; |
| 205 | 205 |
| 206 return PAGEMODE_UNKNOWN; | 206 return PAGEMODE_UNKNOWN; |
| 207 } | 207 } |
| OLD | NEW |