| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 case 2: | 116 case 2: |
| 117 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM); | 117 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM); |
| 118 break; | 118 break; |
| 119 case 0: | 119 case 0: |
| 120 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_EMAIL); | 120 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_EMAIL); |
| 121 break; | 121 break; |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 FX_DWORD nCount = pElement->CountChildren(); | 126 uint32_t nCount = pElement->CountChildren(); |
| 127 for (i = 0; i < (int)nCount; i++) { | 127 for (i = 0; i < (int)nCount; i++) { |
| 128 CXML_Element::ChildType childType = pElement->GetChildType(i); | 128 CXML_Element::ChildType childType = pElement->GetChildType(i); |
| 129 if (childType == CXML_Element::Element) { | 129 if (childType == CXML_Element::Element) { |
| 130 CXML_Element* pChild = pElement->GetElement(i); | 130 CXML_Element* pChild = pElement->GetElement(i); |
| 131 if (CheckSharedForm(pChild, cbName)) | 131 if (CheckSharedForm(pChild, cbName)) |
| 132 return TRUE; | 132 return TRUE; |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 return FALSE; | 135 return FALSE; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) { | 138 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { |
| 139 // Security | 139 // Security |
| 140 if (err_code == FPDF_ERR_SECURITY) { | 140 if (err_code == FPDF_ERR_SECURITY) { |
| 141 FPDF_UnSupportError(FPDF_UNSP_DOC_SECURITY); | 141 FPDF_UnSupportError(FPDF_UNSP_DOC_SECURITY); |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 if (!pDoc) | 144 if (!pDoc) |
| 145 return; | 145 return; |
| 146 | 146 |
| 147 // Portfolios and Packages | 147 // Portfolios and Packages |
| 148 CPDF_Dictionary* pRootDict = pDoc->GetRoot(); | 148 CPDF_Dictionary* pRootDict = pDoc->GetRoot(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return PAGEMODE_USETHUMBS; | 213 return PAGEMODE_USETHUMBS; |
| 214 if (strPageMode.EqualNoCase("FullScreen")) | 214 if (strPageMode.EqualNoCase("FullScreen")) |
| 215 return PAGEMODE_FULLSCREEN; | 215 return PAGEMODE_FULLSCREEN; |
| 216 if (strPageMode.EqualNoCase("UseOC")) | 216 if (strPageMode.EqualNoCase("UseOC")) |
| 217 return PAGEMODE_USEOC; | 217 return PAGEMODE_USEOC; |
| 218 if (strPageMode.EqualNoCase("UseAttachments")) | 218 if (strPageMode.EqualNoCase("UseAttachments")) |
| 219 return PAGEMODE_USEATTACHMENTS; | 219 return PAGEMODE_USEATTACHMENTS; |
| 220 | 220 |
| 221 return PAGEMODE_UNKNOWN; | 221 return PAGEMODE_UNKNOWN; |
| 222 } | 222 } |
| OLD | NEW |