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

Side by Side Diff: fpdfsdk/fpdf_ext.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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