Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: fpdfsdk/fpdf_ext.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
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 = pElement->GetElement("adhocwf", cbName); 107 CXML_Element* pVersion =
108 pElement->GetElement("adhocwf", cbName.AsByteStringC());
108 if (!pVersion) 109 if (!pVersion)
109 continue; 110 continue;
110 CFX_WideString wsContent = pVersion->GetContent(0); // == 1.1 111 CFX_WideString wsContent = pVersion->GetContent(0);
111 int nType = wsContent.GetInteger(); 112 int nType = wsContent.GetInteger();
112 switch (nType) { 113 switch (nType) {
113 case 1: 114 case 1:
114 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_ACROBAT); 115 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_ACROBAT);
115 break; 116 break;
116 case 2: 117 case 2:
117 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM); 118 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM);
118 break; 119 break;
119 case 0: 120 case 0:
120 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_EMAIL); 121 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDFORM_EMAIL);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return PAGEMODE_USETHUMBS; 214 return PAGEMODE_USETHUMBS;
214 if (strPageMode.EqualNoCase("FullScreen")) 215 if (strPageMode.EqualNoCase("FullScreen"))
215 return PAGEMODE_FULLSCREEN; 216 return PAGEMODE_FULLSCREEN;
216 if (strPageMode.EqualNoCase("UseOC")) 217 if (strPageMode.EqualNoCase("UseOC"))
217 return PAGEMODE_USEOC; 218 return PAGEMODE_USEOC;
218 if (strPageMode.EqualNoCase("UseAttachments")) 219 if (strPageMode.EqualNoCase("UseAttachments"))
219 return PAGEMODE_USEATTACHMENTS; 220 return PAGEMODE_USEATTACHMENTS;
220 221
221 return PAGEMODE_UNKNOWN; 222 return PAGEMODE_UNKNOWN;
222 } 223 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698