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 "public/fpdf_ext.h" | 7 #include "public/fpdf_ext.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info) { | 39 FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info) { |
40 if (!unsp_info || unsp_info->version != 1) | 40 if (!unsp_info || unsp_info->version != 1) |
41 return FALSE; | 41 return FALSE; |
42 | 42 |
43 CPDF_ModuleMgr::Get()->SetUnsupportInfoAdapter( | 43 CPDF_ModuleMgr::Get()->SetUnsupportInfoAdapter( |
44 WrapUnique(new CFSDK_UnsupportInfo_Adapter(unsp_info))); | 44 WrapUnique(new CFSDK_UnsupportInfo_Adapter(unsp_info))); |
45 return TRUE; | 45 return TRUE; |
46 } | 46 } |
47 | 47 |
48 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { | 48 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) { |
49 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); | 49 CFX_ByteString cbSubType = pPDFAnnot->GetSubtype(); |
50 if (cbSubType.Compare("3D") == 0) { | 50 if (cbSubType.Compare("3D") == 0) { |
51 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); | 51 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); |
52 } else if (cbSubType.Compare("Screen") == 0) { | 52 } else if (cbSubType.Compare("Screen") == 0) { |
53 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 53 const CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
54 CFX_ByteString cbString; | 54 CFX_ByteString cbString; |
55 if (pAnnotDict->KeyExist("IT")) | 55 if (pAnnotDict->KeyExist("IT")) |
56 cbString = pAnnotDict->GetStringBy("IT"); | 56 cbString = pAnnotDict->GetStringBy("IT"); |
57 if (cbString.Compare("Img") != 0) | 57 if (cbString.Compare("Img") != 0) |
58 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); | 58 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); |
59 } else if (cbSubType.Compare("Movie") == 0) { | 59 } else if (cbSubType.Compare("Movie") == 0) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 return PAGEMODE_USETHUMBS; | 192 return PAGEMODE_USETHUMBS; |
193 if (strPageMode.EqualNoCase("FullScreen")) | 193 if (strPageMode.EqualNoCase("FullScreen")) |
194 return PAGEMODE_FULLSCREEN; | 194 return PAGEMODE_FULLSCREEN; |
195 if (strPageMode.EqualNoCase("UseOC")) | 195 if (strPageMode.EqualNoCase("UseOC")) |
196 return PAGEMODE_USEOC; | 196 return PAGEMODE_USEOC; |
197 if (strPageMode.EqualNoCase("UseAttachments")) | 197 if (strPageMode.EqualNoCase("UseAttachments")) |
198 return PAGEMODE_USEATTACHMENTS; | 198 return PAGEMODE_USEATTACHMENTS; |
199 | 199 |
200 return PAGEMODE_UNKNOWN; | 200 return PAGEMODE_UNKNOWN; |
201 } | 201 } |
OLD | NEW |