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 "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { | 98 FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { |
99 int count = pElement->CountAttrs(); | 99 int count = pElement->CountAttrs(); |
100 int i = 0; | 100 int i = 0; |
101 for (i = 0; i < count; i++) { | 101 for (i = 0; i < count; i++) { |
102 CFX_ByteString space, name; | 102 CFX_ByteString space, name; |
103 CFX_WideString value; | 103 CFX_WideString value; |
104 pElement->GetAttrByIndex(i, space, name, value); | 104 pElement->GetAttrByIndex(i, space, name, value); |
105 if (space == "xmlns" && name == "adhocwf" && | 105 if (space == "xmlns" && name == "adhocwf" && |
106 value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { | 106 value == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { |
107 CXML_Element* pVersion = | 107 CXML_Element* pVersion = |
108 pElement->GetElement("adhocwf", cbName.AsByteStringC()); | 108 pElement->GetElement("adhocwf", cbName.AsStringC()); |
109 if (!pVersion) | 109 if (!pVersion) |
110 continue; | 110 continue; |
111 CFX_WideString wsContent = pVersion->GetContent(0); | 111 CFX_WideString wsContent = pVersion->GetContent(0); |
112 int nType = wsContent.GetInteger(); | 112 int nType = wsContent.GetInteger(); |
113 switch (nType) { | 113 switch (nType) { |
114 case 1: | 114 case 1: |
115 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_ACROBAT); | 115 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_ACROBAT); |
116 break; | 116 break; |
117 case 2: | 117 case 2: |
118 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM); | 118 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return PAGEMODE_USETHUMBS; | 214 return PAGEMODE_USETHUMBS; |
215 if (strPageMode.EqualNoCase("FullScreen")) | 215 if (strPageMode.EqualNoCase("FullScreen")) |
216 return PAGEMODE_FULLSCREEN; | 216 return PAGEMODE_FULLSCREEN; |
217 if (strPageMode.EqualNoCase("UseOC")) | 217 if (strPageMode.EqualNoCase("UseOC")) |
218 return PAGEMODE_USEOC; | 218 return PAGEMODE_USEOC; |
219 if (strPageMode.EqualNoCase("UseAttachments")) | 219 if (strPageMode.EqualNoCase("UseAttachments")) |
220 return PAGEMODE_USEATTACHMENTS; | 220 return PAGEMODE_USEATTACHMENTS; |
221 | 221 |
222 return PAGEMODE_UNKNOWN; | 222 return PAGEMODE_UNKNOWN; |
223 } | 223 } |
OLD | NEW |