| 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 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 return FALSE; | 50 return FALSE; |
| 51 CFSDK_UnsupportInfo_Adapter* pAdapter = | 51 CFSDK_UnsupportInfo_Adapter* pAdapter = |
| 52 new CFSDK_UnsupportInfo_Adapter(unsp_info); | 52 new CFSDK_UnsupportInfo_Adapter(unsp_info); |
| 53 | 53 |
| 54 CPDF_ModuleMgr::Get()->SetPrivateData((void*)FPDFSDK_UNSUPPORT_CALL, pAdapter, | 54 CPDF_ModuleMgr::Get()->SetPrivateData((void*)FPDFSDK_UNSUPPORT_CALL, pAdapter, |
| 55 &FreeUnsupportInfo); | 55 &FreeUnsupportInfo); |
| 56 | 56 |
| 57 return TRUE; | 57 return TRUE; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot) { | 60 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { |
| 61 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); | 61 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); |
| 62 if (cbSubType.Compare("3D") == 0) { | 62 if (cbSubType.Compare("3D") == 0) { |
| 63 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); | 63 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); |
| 64 } else if (cbSubType.Compare("Screen") == 0) { | 64 } else if (cbSubType.Compare("Screen") == 0) { |
| 65 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 65 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
| 66 CFX_ByteString cbString; | 66 CFX_ByteString cbString; |
| 67 if (pAnnotDict->KeyExist("IT")) | 67 if (pAnnotDict->KeyExist("IT")) |
| 68 cbString = pAnnotDict->GetString("IT"); | 68 cbString = pAnnotDict->GetString("IT"); |
| 69 if (cbString.Compare("Img") != 0) | 69 if (cbString.Compare("Img") != 0) |
| 70 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); | 70 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); |
| 71 } else if (cbSubType.Compare("Movie") == 0) { | 71 } else if (cbSubType.Compare("Movie") == 0) { |
| 72 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); | 72 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); |
| 73 } else if (cbSubType.Compare("Sound") == 0) { | 73 } else if (cbSubType.Compare("Sound") == 0) { |
| 74 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); | 74 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); |
| 75 } else if (cbSubType.Compare("RichMedia") == 0) { | 75 } else if (cbSubType.Compare("RichMedia") == 0) { |
| 76 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); | 76 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); |
| 77 } else if (cbSubType.Compare("FileAttachment") == 0) { | 77 } else if (cbSubType.Compare("FileAttachment") == 0) { |
| 78 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); | 78 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); |
| 79 } else if (cbSubType.Compare("Widget") == 0) { | 79 } else if (cbSubType.Compare("Widget") == 0) { |
| 80 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 80 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
| 81 CFX_ByteString cbString; | 81 CFX_ByteString cbString; |
| 82 if (pAnnotDict->KeyExist("FT")) { | 82 if (pAnnotDict->KeyExist("FT")) { |
| 83 cbString = pAnnotDict->GetString("FT"); | 83 cbString = pAnnotDict->GetString("FT"); |
| 84 } | 84 } |
| 85 if (cbString.Compare("Sig") == 0) { | 85 if (cbString.Compare("Sig") == 0) { |
| 86 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); | 86 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 return PAGEMODE_USETHUMBS; | 204 return PAGEMODE_USETHUMBS; |
| 205 if (strPageMode.EqualNoCase("FullScreen")) | 205 if (strPageMode.EqualNoCase("FullScreen")) |
| 206 return PAGEMODE_FULLSCREEN; | 206 return PAGEMODE_FULLSCREEN; |
| 207 if (strPageMode.EqualNoCase("UseOC")) | 207 if (strPageMode.EqualNoCase("UseOC")) |
| 208 return PAGEMODE_USEOC; | 208 return PAGEMODE_USEOC; |
| 209 if (strPageMode.EqualNoCase("UseAttachments")) | 209 if (strPageMode.EqualNoCase("UseAttachments")) |
| 210 return PAGEMODE_USEATTACHMENTS; | 210 return PAGEMODE_USEATTACHMENTS; |
| 211 | 211 |
| 212 return PAGEMODE_UNKNOWN; | 212 return PAGEMODE_UNKNOWN; |
| 213 } | 213 } |
| OLD | NEW |