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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 { | 63 { |
64 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); | 64 FPDF_UnSupportError(FPDF_UNSP_ANNOT_3DANNOT); |
65 } | 65 } |
66 else if(cbSubType.Compare("Screen") ==0) | 66 else if(cbSubType.Compare("Screen") ==0) |
67 { | 67 { |
68 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 68 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
69 CFX_ByteString cbString; | 69 CFX_ByteString cbString; |
70 if(pAnnotDict->KeyExist("IT")) | 70 if(pAnnotDict->KeyExist("IT")) |
71 » » » cbString = pAnnotDict->GetString("IT"); | 71 » » » cbString = pAnnotDict->GetStringAt("IT"); |
72 if(cbString.Compare("Img") != 0) | 72 if(cbString.Compare("Img") != 0) |
73 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); | 73 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_MEDIA); |
74 } | 74 } |
75 else if(cbSubType.Compare("Movie") ==0) | 75 else if(cbSubType.Compare("Movie") ==0) |
76 { | 76 { |
77 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); | 77 FPDF_UnSupportError(FPDF_UNSP_ANNOT_MOVIE); |
78 } | 78 } |
79 else if(cbSubType.Compare("Sound") ==0) | 79 else if(cbSubType.Compare("Sound") ==0) |
80 { | 80 { |
81 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); | 81 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SOUND); |
82 } | 82 } |
83 else if(cbSubType.Compare("RichMedia") ==0) | 83 else if(cbSubType.Compare("RichMedia") ==0) |
84 { | 84 { |
85 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); | 85 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA); |
86 } | 86 } |
87 else if(cbSubType.Compare("FileAttachment") ==0) | 87 else if(cbSubType.Compare("FileAttachment") ==0) |
88 { | 88 { |
89 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); | 89 FPDF_UnSupportError(FPDF_UNSP_ANNOT_ATTACHMENT); |
90 } | 90 } |
91 else if(cbSubType.Compare("Widget") ==0) | 91 else if(cbSubType.Compare("Widget") ==0) |
92 { | 92 { |
93 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); | 93 CPDF_Dictionary* pAnnotDict = pPDFAnnot->GetAnnotDict(); |
94 CFX_ByteString cbString; | 94 CFX_ByteString cbString; |
95 if(pAnnotDict->KeyExist("FT")) | 95 if(pAnnotDict->KeyExist("FT")) |
96 { | 96 { |
97 » » » cbString = pAnnotDict->GetString("FT"); | 97 » » » cbString = pAnnotDict->GetStringAt("FT"); |
98 } | 98 } |
99 if(cbString.Compare("Sig") == 0) | 99 if(cbString.Compare("Sig") == 0) |
100 { | 100 { |
101 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); | 101 FPDF_UnSupportError(FPDF_UNSP_ANNOT_SIG); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 } | 105 } |
106 | 106 |
107 FX_BOOL CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName) | 107 FX_BOOL CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return; | 179 return; |
180 } | 180 } |
181 else if (pNameDict && pNameDict->KeyExist("JavaScript")) | 181 else if (pNameDict && pNameDict->KeyExist("JavaScript")) |
182 { | 182 { |
183 CPDF_Dictionary* pJSDict = pNameDict->GetDict("J
avaScript"); | 183 CPDF_Dictionary* pJSDict = pNameDict->GetDict("J
avaScript"); |
184 CPDF_Array * pArray = pJSDict ? pJSDict->GetArra
y("Names") : NULL; | 184 CPDF_Array * pArray = pJSDict ? pJSDict->GetArra
y("Names") : NULL; |
185 if (pArray) { | 185 if (pArray) { |
186 int nCount = pArray->GetCount(); | 186 int nCount = pArray->GetCount(); |
187 for(int i=0; i<nCount; i++) | 187 for(int i=0; i<nCount; i++) |
188 { | 188 { |
189 » » » » » » CFX_ByteString cbStr = pArray->G
etString(i); | 189 » » » » » » CFX_ByteString cbStr = pArray->G
etStringAt(i); |
190 if(cbStr.Compare("com.adobe.acro
bat.SharedReview.Register") == 0) | 190 if(cbStr.Compare("com.adobe.acro
bat.SharedReview.Register") == 0) |
191 { | 191 { |
192 FPDF_UnSupportError(FPDF
_UNSP_DOC_SHAREDREVIEW); | 192 FPDF_UnSupportError(FPDF
_UNSP_DOC_SHAREDREVIEW); |
193 return; | 193 return; |
194 } | 194 } |
195 } | 195 } |
196 } | 196 } |
197 } | 197 } |
198 } | 198 } |
199 } | 199 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return PAGEMODE_USETHUMBS; | 236 return PAGEMODE_USETHUMBS; |
237 if (strPageMode.EqualNoCase("FullScreen")) | 237 if (strPageMode.EqualNoCase("FullScreen")) |
238 return PAGEMODE_FULLSCREEN; | 238 return PAGEMODE_FULLSCREEN; |
239 if (strPageMode.EqualNoCase("UseOC")) | 239 if (strPageMode.EqualNoCase("UseOC")) |
240 return PAGEMODE_USEOC; | 240 return PAGEMODE_USEOC; |
241 if (strPageMode.EqualNoCase("UseAttachments")) | 241 if (strPageMode.EqualNoCase("UseAttachments")) |
242 return PAGEMODE_USEATTACHMENTS; | 242 return PAGEMODE_USEATTACHMENTS; |
243 | 243 |
244 return PAGEMODE_UNKNOWN; | 244 return PAGEMODE_UNKNOWN; |
245 } | 245 } |
OLD | NEW |