| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 if (pRootDict->KeyExist("Names")) { | 151 if (pRootDict->KeyExist("Names")) { |
| 152 CPDF_Dictionary* pNameDict = pRootDict->GetDictBy("Names"); | 152 CPDF_Dictionary* pNameDict = pRootDict->GetDictBy("Names"); |
| 153 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles")) { | 153 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles")) { |
| 154 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT); | 154 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT); |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 if (pNameDict && pNameDict->KeyExist("JavaScript")) { | 157 if (pNameDict && pNameDict->KeyExist("JavaScript")) { |
| 158 CPDF_Dictionary* pJSDict = pNameDict->GetDictBy("JavaScript"); | 158 CPDF_Dictionary* pJSDict = pNameDict->GetDictBy("JavaScript"); |
| 159 CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayBy("Names") : NULL; | 159 CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayBy("Names") : nullptr; |
| 160 if (pArray) { | 160 if (pArray) { |
| 161 for (size_t i = 0; i < pArray->GetCount(); i++) { | 161 for (size_t i = 0; i < pArray->GetCount(); i++) { |
| 162 CFX_ByteString cbStr = pArray->GetStringAt(i); | 162 CFX_ByteString cbStr = pArray->GetStringAt(i); |
| 163 if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) { | 163 if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) { |
| 164 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW); | 164 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW); |
| 165 return; | 165 return; |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 } | 169 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 return PAGEMODE_USETHUMBS; | 206 return PAGEMODE_USETHUMBS; |
| 207 if (strPageMode.EqualNoCase("FullScreen")) | 207 if (strPageMode.EqualNoCase("FullScreen")) |
| 208 return PAGEMODE_FULLSCREEN; | 208 return PAGEMODE_FULLSCREEN; |
| 209 if (strPageMode.EqualNoCase("UseOC")) | 209 if (strPageMode.EqualNoCase("UseOC")) |
| 210 return PAGEMODE_USEOC; | 210 return PAGEMODE_USEOC; |
| 211 if (strPageMode.EqualNoCase("UseAttachments")) | 211 if (strPageMode.EqualNoCase("UseAttachments")) |
| 212 return PAGEMODE_USEATTACHMENTS; | 212 return PAGEMODE_USEATTACHMENTS; |
| 213 | 213 |
| 214 return PAGEMODE_UNKNOWN; | 214 return PAGEMODE_UNKNOWN; |
| 215 } | 215 } |
| OLD | NEW |