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 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 | 9 |
10 #define FPDFSDK_UNSUPPORT_CALL 100 | 10 #define FPDFSDK_UNSUPPORT_CALL 100 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 void CheckUnSupportAnnot(CPDF_Document * pDoc, CPDF_Annot* pPDFAnnot) | 58 void CheckUnSupportAnnot(CPDF_Document * pDoc, CPDF_Annot* pPDFAnnot) |
59 { | 59 { |
60 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); | 60 CFX_ByteString cbSubType = pPDFAnnot->GetSubType(); |
61 if(cbSubType.Compare("3D") == 0) | 61 if(cbSubType.Compare("3D") == 0) |
62 { | 62 { |
63 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); | 63 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); |
64 } | 64 } |
65 else if(cbSubType.Compare("Screen") ==0) | 65 else if(cbSubType.Compare("Screen") ==0) |
66 { | 66 { |
67 » » CPDF_Dictionary* pAnnotDict = pPDFAnnot->m_pAnnotDict; | 67 » » CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
68 CFX_ByteString cbString; | 68 CFX_ByteString cbString; |
69 if(pAnnotDict->KeyExist("IT")) | 69 if(pAnnotDict->KeyExist("IT")) |
70 cbString = pAnnotDict->GetString("IT"); | 70 cbString = pAnnotDict->GetString("IT"); |
71 if(cbString.Compare("Img") != 0) | 71 if(cbString.Compare("Img") != 0) |
72 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); | 72 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); |
73 } | 73 } |
74 else if(cbSubType.Compare("Movie") ==0) | 74 else if(cbSubType.Compare("Movie") ==0) |
75 { | 75 { |
76 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); | 76 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); |
77 } | 77 } |
78 else if(cbSubType.Compare("Sound") ==0) | 78 else if(cbSubType.Compare("Sound") ==0) |
79 { | 79 { |
80 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); | 80 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); |
81 } | 81 } |
82 else if(cbSubType.Compare("RichMedia") ==0) | 82 else if(cbSubType.Compare("RichMedia") ==0) |
83 { | 83 { |
84 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); | 84 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); |
85 } | 85 } |
86 else if(cbSubType.Compare("FileAttachment") ==0) | 86 else if(cbSubType.Compare("FileAttachment") ==0) |
87 { | 87 { |
88 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); | 88 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); |
89 } | 89 } |
90 else if(cbSubType.Compare("Widget") ==0) | 90 else if(cbSubType.Compare("Widget") ==0) |
91 { | 91 { |
92 » » CPDF_Dictionary* pAnnotDict = pPDFAnnot->m_pAnnotDict; | 92 » » CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
93 CFX_ByteString cbString; | 93 CFX_ByteString cbString; |
94 if(pAnnotDict->KeyExist("FT")) | 94 if(pAnnotDict->KeyExist("FT")) |
95 { | 95 { |
96 cbString = pAnnotDict->GetString("FT"); | 96 cbString = pAnnotDict->GetString("FT"); |
97 } | 97 } |
98 if(cbString.Compare("Sig") == 0) | 98 if(cbString.Compare("Sig") == 0) |
99 { | 99 { |
100 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); | 100 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); |
101 } | 101 } |
102 } | 102 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return PAGEMODE_USETHUMBS; | 232 return PAGEMODE_USETHUMBS; |
233 else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen"))) | 233 else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen"))) |
234 return PAGEMODE_FULLSCREEN; | 234 return PAGEMODE_FULLSCREEN; |
235 else if (strPageMode.EqualNoCase(FX_BSTR("UseOC"))) | 235 else if (strPageMode.EqualNoCase(FX_BSTR("UseOC"))) |
236 return PAGEMODE_USEOC; | 236 return PAGEMODE_USEOC; |
237 else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments"))) | 237 else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments"))) |
238 return PAGEMODE_USEATTACHMENTS; | 238 return PAGEMODE_USEATTACHMENTS; |
239 | 239 |
240 return PAGEMODE_UNKNOWN; | 240 return PAGEMODE_UNKNOWN; |
241 } | 241 } |
OLD | NEW |